public interface ExprNode extends ExprValidator, MetaDefItem, Serializable
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addChildNode(ExprNode childNode)
Adds a child node.
|
void |
addChildNodes(Collection<ExprNode> childNodes)
Adds child nodes.
|
boolean |
equalsNode(ExprNode node,
boolean ignoreStreamPrefix)
Return true if a expression node semantically equals the current node, or false if not.
|
ExprNode[] |
getChildNodes()
Returns list of child nodes.
|
ExprEvaluator |
getExprEvaluator() |
ExprPrecedenceEnum |
getPrecedence()
Returns precedence.
|
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.
|
void |
replaceUnlistedChildNode(ExprNode nodeToReplace,
ExprNode newNode) |
void |
setChildNode(int index,
ExprNode newNode) |
void |
setChildNodes(ExprNode... nodes) |
void |
toEPL(StringWriter writer,
ExprPrecedenceEnum parentPrecedence) |
validate
ExprEvaluator getExprEvaluator()
void toEPL(StringWriter writer, ExprPrecedenceEnum parentPrecedence)
ExprPrecedenceEnum getPrecedence()
boolean isConstantResult()
boolean equalsNode(ExprNode node, boolean ignoreStreamPrefix)
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
node
- to compare toignoreStreamPrefix
- when the equals-comparison can ignore prefix of event propertiesvoid accept(ExprNodeVisitor visitor)
The visitor can decide to skip child nodes by returning false in isVisit.
visitor
- to visit each node and each child node.void accept(ExprNodeVisitorWithParent visitor)
The visitor can decide to skip child nodes by returning false in isVisit.
visitor
- to visit each node and each child node.void acceptChildnodes(ExprNodeVisitorWithParent visitor, ExprNode parent)
visitor
- to applyparent
- nodevoid addChildNode(ExprNode childNode)
childNode
- is the child evaluation tree node to addvoid addChildNodes(Collection<ExprNode> childNodes)
childNodes
- are the child evaluation tree node to addExprNode[] getChildNodes()
void setChildNode(int index, ExprNode newNode)
void setChildNodes(ExprNode... nodes)