ariba.util.expr
Class AribaExprEvaluator

java.lang.Object
  extended by ariba.util.fieldvalue.ExpressionEvaluator
      extended by ariba.util.expr.AribaExprEvaluator

public class AribaExprEvaluator
extends ExpressionEvaluator

Factory for Expr-based expressions


Nested Class Summary
static class AribaExprEvaluator.Expression
           
static class AribaExprEvaluator.NodeVisitor
           
 
Constructor Summary
AribaExprEvaluator()
           
 
Method Summary
 void checkReturnType(Environment env, Expression expression, java.lang.String expectedType, java.lang.String containerType, boolean exactMatch, boolean skipForObjectType)
          Check the return type of the expression.
 Expression compile(Environment env, java.lang.String rootType, java.lang.String stringRepresentation)
           
 Expression compile(Environment env, java.lang.String rootType, java.lang.String fieldName, java.lang.String stringRepresentation)
           
 Expression compile(Environment env, java.lang.String rootType, java.lang.String expectedType, java.lang.String containerType, boolean exactMatch, java.lang.String stringRepresentation)
           
 Expression compile(Environment env, java.lang.String rootType, java.lang.String fieldName, java.lang.String expectedType, java.lang.String containerType, boolean exactMatch, java.lang.String stringRepresentation, java.util.List errorCollector)
           
 Expression compile(java.lang.String stringRepresentation)
          Creates, compiles and returns a new Expression based off the supplied stringRepresentation.
static TypeInfo getTypeInfo(Expression expr)
           
static AribaExprEvaluator instance()
           
 Expression parse(Environment env, java.lang.String stringRepresentation, java.util.List errorCollector)
          This method parses a string expression into an expression tree.
 Expression parse(java.lang.String stringRepresentation)
          This method parses a string expression into an expression tree.
 void typeCheck(Environment env, java.lang.String rootType, java.lang.String fieldName, Expression expression, java.lang.String expectedType, java.lang.String containerType, boolean exactMatch, java.util.List errorCollector)
           
static java.lang.Object visitNodes(Node root, AribaExprEvaluator.NodeVisitor visitor)
           
 
Methods inherited from class ariba.util.fieldvalue.ExpressionEvaluator
evaluate, evaluate, getFieldPaths
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AribaExprEvaluator

public AribaExprEvaluator()
Method Detail

instance

public static AribaExprEvaluator instance()

parse

public Expression parse(java.lang.String stringRepresentation)
                 throws ExpressionException
This method parses a string expression into an expression tree. This method should only be used for unit test. Use compile(String) instead.

Parameters:
stringRepresentation -
Returns:
an expression tree
Throws:
ExpressionException

parse

public Expression parse(Environment env,
                        java.lang.String stringRepresentation,
                        java.util.List errorCollector)
                 throws ExpressionException
This method parses a string expression into an expression tree. This method should only be used for unit test. Use compile(String) instead.

Parameters:
stringRepresentation -
Returns:
an expression tree
Throws:
ExpressionException

compile

public Expression compile(java.lang.String stringRepresentation)
                   throws ExpressionException
Description copied from class: ExpressionEvaluator
Creates, compiles and returns a new Expression based off the supplied stringRepresentation.

Specified by:
compile in class ExpressionEvaluator
Throws:
ExpressionException

compile

public Expression compile(Environment env,
                          java.lang.String rootType,
                          java.lang.String fieldName,
                          java.lang.String stringRepresentation)
                   throws ExpressionException
Throws:
ExpressionException

compile

public Expression compile(Environment env,
                          java.lang.String rootType,
                          java.lang.String fieldName,
                          java.lang.String expectedType,
                          java.lang.String containerType,
                          boolean exactMatch,
                          java.lang.String stringRepresentation,
                          java.util.List errorCollector)
                   throws ExpressionException
Throws:
ExpressionException

compile

public Expression compile(Environment env,
                          java.lang.String rootType,
                          java.lang.String stringRepresentation)
                   throws ExpressionException
Throws:
ExpressionException

compile

public Expression compile(Environment env,
                          java.lang.String rootType,
                          java.lang.String expectedType,
                          java.lang.String containerType,
                          boolean exactMatch,
                          java.lang.String stringRepresentation)
                   throws ExpressionException
Throws:
ExpressionException

typeCheck

public void typeCheck(Environment env,
                      java.lang.String rootType,
                      java.lang.String fieldName,
                      Expression expression,
                      java.lang.String expectedType,
                      java.lang.String containerType,
                      boolean exactMatch,
                      java.util.List errorCollector)
               throws ExpressionException
Throws:
ExpressionException

checkReturnType

public void checkReturnType(Environment env,
                            Expression expression,
                            java.lang.String expectedType,
                            java.lang.String containerType,
                            boolean exactMatch,
                            boolean skipForObjectType)
Check the return type of the expression.

Parameters:
env -
expression -
expectedType -
containerType -
exactMatch -
skipForObjectType -

getTypeInfo

public static TypeInfo getTypeInfo(Expression expr)

visitNodes

public static java.lang.Object visitNodes(Node root,
                                          AribaExprEvaluator.NodeVisitor visitor)


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