com.espertech.esper.epl.declexpr
Class ExprDeclaredNodeImpl

java.lang.Object
  extended by com.espertech.esper.epl.expression.core.ExprNodeBase
      extended by com.espertech.esper.epl.declexpr.ExprDeclaredNodeImpl
All Implemented Interfaces:
ExprDeclaredNode, ExprDeclaredOrLambdaNode, ExprConstantNode, ExprFilterOptimizableNode, ExprNode, ExprNodeInnerNodeProvider, ExprValidator, MetaDefItem, java.io.Serializable

public class ExprDeclaredNodeImpl
extends ExprNodeBase
implements ExprDeclaredNode, ExprDeclaredOrLambdaNode, ExprFilterOptimizableNode, ExprNodeInnerNodeProvider, ExprConstantNode

Expression instance as declared elsewhere.

See Also:
Serialized Form

Constructor Summary
ExprDeclaredNodeImpl(ExpressionDeclItem prototype, java.util.List<ExprNode> chainParameters, ContextDescriptor contextDescriptor)
           
 
Method Summary
 void accept(ExprNodeVisitor visitor)
          Accept the visitor.
 void accept(ExprNodeVisitorWithParent visitor)
          Accept the visitor.
 void acceptChildnodes(ExprNodeVisitorWithParent visitor, ExprNode parent)
          Accept a visitor that receives both parent and child node.
 boolean equalsNode(ExprNode node)
          Return true if a expression node semantically equals the current node, or false if not.
 java.util.List<ExprNode> getAdditionalNodes()
           
 ExprNode getBody()
           
 java.util.List<ExprNode> getChainParameters()
           
 java.lang.Class getConstantType()
           
 java.lang.Object getConstantValue(ExprEvaluatorContext context)
           
 ExprNode getExpressionBodyCopy()
           
 ExprEvaluator getExprEvaluator()
           
 FilterSpecLookupable getFilterLookupable()
           
 boolean getFilterLookupEligible()
           
 java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getOuterStreamNames(java.util.Map<java.lang.String,java.lang.Integer> outerStreamNames)
           
 ExprPrecedenceEnum getPrecedence()
          Returns precedence.
 ExpressionDeclItem getPrototype()
           
 boolean isConstantResult()
          Returns true if the expression node's evaluation value doesn't depend on any events data, as must be determined at validation time, which is bottom-up and therefore reliably allows each node to determine constant value.
 boolean isConstantValue()
           
 void toPrecedenceFreeEPL(java.io.StringWriter writer)
           
 ExprNode validate(ExprValidationContext validationContext)
           
 boolean validated()
           
 
Methods inherited from class com.espertech.esper.epl.expression.core.ExprNodeBase
addChildNode, addChildNodes, addChildNodeToFront, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.epl.expression.core.ExprNode
addChildNode, addChildNodes, getChildNodes, replaceUnlistedChildNode, setChildNode, setChildNodes, toEPL
 

Constructor Detail

ExprDeclaredNodeImpl

public ExprDeclaredNodeImpl(ExpressionDeclItem prototype,
                            java.util.List<ExprNode> chainParameters,
                            ContextDescriptor contextDescriptor)
Method Detail

getBody

public ExprNode getBody()
Specified by:
getBody in interface ExprDeclaredNode

getAdditionalNodes

public java.util.List<ExprNode> getAdditionalNodes()
Specified by:
getAdditionalNodes in interface ExprNodeInnerNodeProvider

validated

public boolean validated()
Specified by:
validated in interface ExprDeclaredOrLambdaNode

getConstantType

public java.lang.Class getConstantType()
Specified by:
getConstantType in interface ExprConstantNode

getConstantValue

public java.lang.Object getConstantValue(ExprEvaluatorContext context)
Specified by:
getConstantValue in interface ExprConstantNode

isConstantValue

public boolean isConstantValue()
Specified by:
isConstantValue in interface ExprConstantNode

getOuterStreamNames

public java.util.LinkedHashMap<java.lang.String,java.lang.Integer> getOuterStreamNames(java.util.Map<java.lang.String,java.lang.Integer> outerStreamNames)
                                                                                throws ExprValidationException
Specified by:
getOuterStreamNames in interface ExprDeclaredNode
Throws:
ExprValidationException

validate

public ExprNode validate(ExprValidationContext validationContext)
                  throws ExprValidationException
Specified by:
validate in interface ExprValidator
Throws:
ExprValidationException

getFilterLookupEligible

public boolean getFilterLookupEligible()
Specified by:
getFilterLookupEligible in interface ExprFilterOptimizableNode

getFilterLookupable

public FilterSpecLookupable getFilterLookupable()
Specified by:
getFilterLookupable in interface ExprFilterOptimizableNode

isConstantResult

public boolean isConstantResult()
Description copied from interface: ExprNode
Returns true if the expression node's evaluation value doesn't depend on any events data, as must be determined at validation time, which is bottom-up and therefore reliably allows each node to determine constant value.

Specified by:
isConstantResult in interface ExprNode
Returns:
true for constant evaluation value, false for non-constant evaluation value

equalsNode

public boolean equalsNode(ExprNode node)
Description copied from interface: ExprNode
Return true if a expression node semantically equals the current node, or false if not.

Concrete implementations should compare the type and any additional information that impact the evaluation of a node.

Specified by:
equalsNode in interface ExprNode
Parameters:
node - to compare to
Returns:
true if semantically equal, or false if not equals

accept

public void accept(ExprNodeVisitor visitor)
Description copied from interface: ExprNode
Accept the visitor. The visitor will first visit the parent then visit all child nodes, then their child nodes.

The visitor can decide to skip child nodes by returning false in isVisit.

Specified by:
accept in interface ExprNode
Overrides:
accept in class ExprNodeBase
Parameters:
visitor - to visit each node and each child node.

accept

public void accept(ExprNodeVisitorWithParent visitor)
Description copied from interface: ExprNode
Accept the visitor. The visitor will first visit the parent then visit all child nodes, then their child nodes.

The visitor can decide to skip child nodes by returning false in isVisit.

Specified by:
accept in interface ExprNode
Overrides:
accept in class ExprNodeBase
Parameters:
visitor - to visit each node and each child node.

acceptChildnodes

public void acceptChildnodes(ExprNodeVisitorWithParent visitor,
                             ExprNode parent)
Description copied from interface: ExprNode
Accept a visitor that receives both parent and child node.

Specified by:
acceptChildnodes in interface ExprNode
Overrides:
acceptChildnodes in class ExprNodeBase
Parameters:
visitor - to apply
parent - node

getExpressionBodyCopy

public ExprNode getExpressionBodyCopy()

getPrototype

public ExpressionDeclItem getPrototype()
Specified by:
getPrototype in interface ExprDeclaredNode

getChainParameters

public java.util.List<ExprNode> getChainParameters()
Specified by:
getChainParameters in interface ExprDeclaredNode

getExprEvaluator

public ExprEvaluator getExprEvaluator()
Specified by:
getExprEvaluator in interface ExprNode

toPrecedenceFreeEPL

public void toPrecedenceFreeEPL(java.io.StringWriter writer)
Specified by:
toPrecedenceFreeEPL in class ExprNodeBase

getPrecedence

public ExprPrecedenceEnum getPrecedence()
Description copied from interface: ExprNode
Returns precedence.

Specified by:
getPrecedence in interface ExprNode
Returns:
precedence

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com