Interface ExpressionVisitor<T>
- Type Parameters:
T- Return type
public interface ExpressionVisitor<T>
Generic interface to define expression visitors with arbitrary return types.
-
Method Summary
Modifier and TypeMethodDescriptionvisitAlias(String aliasName) Called for each traversedAliasexpressionvisitBinaryOperator(BinaryOperatorKind operator, T left, List<T> right) Called for each traversedBinaryexpressionvisitBinaryOperator(BinaryOperatorKind operator, T left, T right) Called for each traversedBinaryexpressiondefault TvisitComputeAggregate(AggregateExpression aggregateExpr) Called for each traversedAggregateExpressionvisitEnum(EdmEnumType type, List<String> enumValues) Called for each traversedEnumerationexpressionvisitLambdaExpression(String lambdaFunction, String lambdaVariable, Expression expression) Called for each traversed lambda expressionvisitLambdaReference(String variableName) Called for each traversedLambdaRefvisitLiteral(Literal literal) Called for each traversedLiteralexpressionvisitMember(Member member) Called for each traversedMemberexpressionvisitMethodCall(MethodKind methodCall, List<T> parameters) Called for each traversedMethodexpressionvisitTypeLiteral(EdmType type) Called for each traversedTypeLiteralexpressionvisitUnaryOperator(UnaryOperatorKind operator, T operand) Called for each traversedUnaryexpression
-
Method Details
-
visitBinaryOperator
T visitBinaryOperator(BinaryOperatorKind operator, T left, T right) throws ExpressionVisitException, ODataApplicationException Called for each traversedBinaryexpression- Parameters:
operator- Operator kindleft- Application return value of left sub treeright- Application return value of right sub tree- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitUnaryOperator
T visitUnaryOperator(UnaryOperatorKind operator, T operand) throws ExpressionVisitException, ODataApplicationException Called for each traversedUnaryexpression- Parameters:
operator- Operator kindoperand- return value of sub tree- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitMethodCall
T visitMethodCall(MethodKind methodCall, List<T> parameters) throws ExpressionVisitException, ODataApplicationException Called for each traversedMethodexpression- Parameters:
methodCall- Methodparameters- List of application return values created by visiting each method parameter- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitLambdaExpression
T visitLambdaExpression(String lambdaFunction, String lambdaVariable, Expression expression) throws ExpressionVisitException, ODataApplicationException Called for each traversed lambda expression- Parameters:
lambdaFunction- "ALL" or "ANY"lambdaVariable- Variable name used lambda variableexpression- Lambda expression- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitLiteral
Called for each traversedLiteralexpression- Parameters:
literal- Literal- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitMember
Called for each traversedMemberexpression- Parameters:
member- UriInfoResource object describing the whole path used to access an data value (this includes for example the usage of $root and $it inside the URI)- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitAlias
Called for each traversedAliasexpression- Parameters:
aliasName- Name of the alias- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitTypeLiteral
Called for each traversedTypeLiteralexpression- Parameters:
type- EdmType- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitLambdaReference
T visitLambdaReference(String variableName) throws ExpressionVisitException, ODataApplicationException Called for each traversedLambdaRef- Parameters:
variableName- Name of the used lambda variable- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitEnum
T visitEnum(EdmEnumType type, List<String> enumValues) throws ExpressionVisitException, ODataApplicationException Called for each traversedEnumerationexpression- Parameters:
type- Type used in the URI before the enumeration valuesenumValues- List of enumeration values- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitBinaryOperator
T visitBinaryOperator(BinaryOperatorKind operator, T left, List<T> right) throws ExpressionVisitException, ODataApplicationException Called for each traversedBinaryexpression- Parameters:
operator- Operator kindleft- Application return value of left sub treeright- Application return value of right sub tree- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-
visitComputeAggregate
default T visitComputeAggregate(AggregateExpression aggregateExpr) throws ExpressionVisitException, ODataApplicationException Called for each traversedAggregateExpression- Parameters:
aggregateExpr- the aggregate expression- Returns:
- Application return value of type T
- Throws:
ExpressionVisitException- Thrown if an exception while traversing occurredODataApplicationException- Thrown by the application
-