org.apache.olingo.odata2.api.uri.expression
Interface Visitable

All Known Subinterfaces:
BinaryExpression, CommonExpression, FilterExpression, LiteralExpression, MemberExpression, MethodExpression, OrderByExpression, OrderExpression, PropertyExpression, UnaryExpression

public interface Visitable

The interface Visitable is part of the visitor pattern used to traverse the expression tree build from a $filter expression string or $orderby expression string. It is implemented by each class used as node in an expression tree.

See Also:
ExpressionVisitor

Method Summary
 Object accept(ExpressionVisitor visitor)
          Method accept(ExpressionVisitor) is called when traversing the expression tree.
 

Method Detail

accept

Object accept(ExpressionVisitor visitor)
              throws ExceptionVisitExpression,
                     ODataApplicationException
Method accept(ExpressionVisitor) is called when traversing the expression tree. This method is invoked on each expression used as node in an expression tree. The implementations should behave as follows:
  • Call accept on all sub nodes and store the returned Objects
  • Call the appropriate method on the ExpressionVisitor instance and provide the stored objects to that instance
  • Return the object which should be passed to the processing algorithm of the parent expression node

    Parameters:
    visitor - Object ( implementing ExpressionVisitor) whose methods are called during traversing a expression node of the expression tree.
    Returns:
    Object which should be passed to the processing algorithm of the parent expression node
    Throws:
    ExceptionVisitExpression - Exception occurred the OData library while traversing the tree
    ODataApplicationException - Exception thrown by the application who implemented the visitor


  • Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.