ariba.util.fieldvalue
Class ExpressionEvaluator

java.lang.Object
  extended by ariba.util.fieldvalue.ExpressionEvaluator
Direct Known Subclasses:
AribaExprEvaluator

public abstract class ExpressionEvaluator
extends java.lang.Object

Abstraction of a factory class for creating Expressions.


Constructor Summary
ExpressionEvaluator()
           
 
Method Summary
abstract  Expression compile(java.lang.String stringRepresentation)
          Creates, compiles and returns a new Expression based off the supplied stringRepresentation.
 java.lang.Object evaluate(java.lang.String expression, java.lang.Object object)
          Evaluate the given expression against the specified object.
 java.lang.Object evaluate(java.lang.String expression, java.lang.Object object, FieldValue fieldvalue)
          Evaluate the given expression against the specified object.
 java.util.Collection getFieldPaths(java.lang.String expression)
          Given an expression, return the field paths.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEvaluator

public ExpressionEvaluator()
Method Detail

compile

public abstract Expression compile(java.lang.String stringRepresentation)
                            throws ExpressionException
Creates, compiles and returns a new Expression based off the supplied stringRepresentation.

Throws:
ExpressionException

getFieldPaths

public final java.util.Collection getFieldPaths(java.lang.String expression)
                                         throws ExpressionException
Given an expression, return the field paths.

Parameters:
expression - the specified expression, must not be null
Returns:
a list of field paths represented as Strings.
Throws:
ExpressionEvaluatorException
ExpressionException

evaluate

public final java.lang.Object evaluate(java.lang.String expression,
                                       java.lang.Object object,
                                       FieldValue fieldvalue)
                                throws ExpressionException
Evaluate the given expression against the specified object.

Parameters:
expression - the expression to evaluate, must not be null
object - the specified object to apply the expression to, must not be null
fieldvalue - an optional field value insance that can be used to evaluate the given expression. Can be null condition, false otherwise
Returns:
the evaluated result
Throws:
ExpressionEvaluatorException
ExpressionException

evaluate

public final java.lang.Object evaluate(java.lang.String expression,
                                       java.lang.Object object)
                                throws ExpressionEvaluatorException
Evaluate the given expression against the specified object. This is equivalent to calling evaluate(String, Object, null)

Parameters:
expression - the expression to evaluate, must not be null
object - the specified object to apply the expression to, must not be null
Returns:
the evaluated result
Throws:
ExpressionEvaluatorException


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.