ASTExpression (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.template.parser, class: ASTExpression

# Class ASTExpression

java.lang.Object
org.apache.cayenne.template.parser.SimpleNode
org.apache.cayenne.template.parser.ASTExpression

All Implemented Interfaces:
  `ExpressionNode, Node`

Direct Known Subclasses:
  `ASTArray`

public class ASTExpression extends SimpleNode implements ExpressionNode

Since:
  4.1

- ## Field Summary

  ### Fields inherited from class SimpleNode

  `children, id, parent`
  Modifier and Type
  Field
  Description
  `protected Node[]`
  `children`
  `protected int`
  `id`
  `protected Node`
  `parent`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ASTExpression(int id)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `evaluate(Context context)`
  `boolean`
  `evaluateAsBoolean(Context context)`
  `double`
  `evaluateAsDouble(Context context)`
  `long`
  `evaluateAsLong(Context context)`
  `Object`
  `evaluateAsObject(Context context)`
  `String`
  `evaluateAsString(Context context)`
  `protected ExpressionNode`
  `getChildAsExpressionNode(int child)`

  ### Methods inherited from class SimpleNode

  `dump, jjtAddChild, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtSetParent, toString, toString`
  Modifier and Type
  Method
  Description
  `void`
  `dump(String prefix)`
  Override this method if you want to customize how the node dumps out its children.
  `void`
  `jjtAddChild(Node n, int i)`
  This method tells the node to add its argument to the node's list of children.
  `Node`
  `jjtGetChild(int i)`
  This method returns a child node.
  `int`
  `jjtGetNumChildren()`
  Return the number of children the node has.
  `Node`
  `jjtGetParent()`
  `void`
  `jjtSetParent(Node n)`
  This pair of methods are used to inform the node of its parent.
  `String`
  `toString()`
  `String`
  `toString(String prefix)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ASTExpression

    public ASTExpression(int id)

- ## Method Details

  - ### getChildAsExpressionNode

    protected ExpressionNode getChildAsExpressionNode(int child)

  - ### evaluate

    public void evaluate(Context context)
    Specified by:
      `evaluate` in interface `Node`

  - ### evaluateAsString

    public String evaluateAsString(Context context)
    Specified by:
      `evaluateAsString` in interface `ExpressionNode`

  - ### evaluateAsObject

    public Object evaluateAsObject(Context context)
    Specified by:
      `evaluateAsObject` in interface `ExpressionNode`

  - ### evaluateAsLong

    public long evaluateAsLong(Context context)
    Specified by:
      `evaluateAsLong` in interface `ExpressionNode`

  - ### evaluateAsDouble

    public double evaluateAsDouble(Context context)
    Specified by:
      `evaluateAsDouble` in interface `ExpressionNode`

  - ### evaluateAsBoolean

    public boolean evaluateAsBoolean(Context context)
    Specified by:
      `evaluateAsBoolean` in interface `ExpressionNode`