java.lang.Object
org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl
All Implemented Interfaces:
Expression, Literal, VisitableExpression

public class LiteralImpl extends Object implements Literal
  • Constructor Details

  • Method Details

    • getText

      public String getText()
      Specified by:
      getText in interface Literal
      Returns:
      Literal
    • getType

      public EdmType getType()
      Description copied from interface: Literal
      Numeric literals without an dot and without an e return the smallest possible Edm Integer type. Numeric literals without an dot, without an e and larger than 2^63 - 1 are considered as Edm.Decimal Numeric literals with an e, are considered to be Edm.Double Numeric literals with an dot and without an e, are supposed to be Edm.Decimal
      Specified by:
      getType in interface Literal
      Returns:
      Type of the literal if detected. The type of the literal is guessed by the parser.
    • accept

      public <T> T accept(ExpressionVisitor<T> visitor) throws ExpressionVisitException, ODataApplicationException
      Description copied from interface: VisitableExpression
      Method VisitableExpression.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 which are of the generic type T
    • Call the appropriate method on the ExpressionVisitor instance and provide the stored return objects to that instance
    • Return the object which should be passed to the processing algorithm of the parent expression node

    • Specified by:
      accept in interface VisitableExpression
      Parameters:
      visitor - Visitor object (implementing ExpressionVisitor) whose methods are called during traversing a expression node of the expression tree.
      Returns:
      Object of type T which should be passed to the processing algorithm of the parent expression node
      Throws:
      ExpressionVisitException - Exception occurred in the OData library while traversing the tree
      ODataApplicationException - Exception thrown by the application who implemented the visitor
    • toString

      public String toString()
      Overrides:
      toString in class Object