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 traversedAlias
expressionvisitBinaryOperator
(BinaryOperatorKind operator, T left, List<T> right) Called for each traversedBinary
expressionvisitBinaryOperator
(BinaryOperatorKind operator, T left, T right) Called for each traversedBinary
expressiondefault T
visitComputeAggregate
(AggregateExpression aggregateExpr) Called for each traversedAggregateExpression
visitEnum
(EdmEnumType type, List<String> enumValues) Called for each traversedEnumeration
expressionvisitLambdaExpression
(String lambdaFunction, String lambdaVariable, Expression expression) Called for each traversed lambda expressionvisitLambdaReference
(String variableName) Called for each traversedLambdaRef
visitLiteral
(Literal literal) Called for each traversedLiteral
expressionvisitMember
(Member member) Called for each traversedMember
expressionvisitMethodCall
(MethodKind methodCall, List<T> parameters) Called for each traversedMethod
expressionvisitTypeLiteral
(EdmType type) Called for each traversedTypeLiteral
expressionvisitUnaryOperator
(UnaryOperatorKind operator, T operand) Called for each traversedUnary
expression
-
Method Details
-
visitBinaryOperator
T visitBinaryOperator(BinaryOperatorKind operator, T left, T right) throws ExpressionVisitException, ODataApplicationException Called for each traversedBinary
expression- 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 traversedUnary
expression- 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 traversedMethod
expression- 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 traversedLiteral
expression- 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 traversedMember
expression- 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 traversedAlias
expression- 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 traversedTypeLiteral
expression- 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 traversedEnumeration
expression- 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 traversedBinary
expression- 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
-