|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.eql.expression.ExprNode
public abstract class ExprNode
Superclass for filter nodes in a filter expression tree. Allow validation against stream event types and evaluation of events against filter tree.
Nested Class Summary | |
---|---|
protected static class |
ExprNode.MappedPropertyParseResult
Encapsulates the parse result parsing a mapped property as a class and method name with args. |
Constructor Summary | |
---|---|
ExprNode()
Constructor creates a list of child nodes. |
Method Summary | |
---|---|
void |
accept(ExprNodeVisitor visitor)
Accept the visitor. |
void |
addChildNode(ExprNode childNode)
Adds a child node. |
static boolean |
deepEquals(ExprNode nodeOne,
ExprNode nodeTwo)
Compare two expression nodes and their children in exact child-node sequence, returning true if the 2 expression nodes trees are equals, or false if they are not equals. |
void |
dumpDebug(String prefix)
Recursively print out all nodes. |
abstract boolean |
equalsNode(ExprNode node)
Return true if a expression node semantically equals the current node, or false if not. |
LinkedList<ExprNode> |
getChildNodes()
Returns list of child nodes. |
ExprNode |
getValidatedSubtree(StreamTypeService streamTypeService,
MethodResolutionService methodResolutionService,
ViewResourceDelegate viewResourceDelegate,
TimeProvider timeProvider)
Validates the expression node subtree that has this node as root. |
abstract 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. |
protected static ExprNode.MappedPropertyParseResult |
parseMappedProperty(String property)
Parse the mapped property into classname, method and string argument. |
abstract String |
toExpressionString()
Returns the expression node rendered as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.esper.eql.expression.ExprValidator |
---|
getType, validate |
Methods inherited from interface net.esper.eql.expression.ExprEvaluator |
---|
evaluate |
Constructor Detail |
---|
public ExprNode()
Method Detail |
---|
public abstract String toExpressionString()
public abstract boolean isConstantResult()
public abstract boolean equalsNode(ExprNode node)
Concrete implementations should compare the type and any additional information that impact the evaluation of a node.
node
- to compare to
public ExprNode getValidatedSubtree(StreamTypeService streamTypeService, MethodResolutionService methodResolutionService, ViewResourceDelegate viewResourceDelegate, TimeProvider timeProvider) throws ExprValidationException
streamTypeService
- - serves stream type informationmethodResolutionService
- - for resolving class names in library method invocationsviewResourceDelegate
- - delegates for view resources to expression nodestimeProvider
- - provides engine current time
ExprValidationException
- when the validation failspublic void 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.public final void addChildNode(ExprNode childNode)
childNode
- is the child evaluation tree node to addpublic final LinkedList<ExprNode> getChildNodes()
public final void dumpDebug(String prefix)
prefix
- is printed out for naming the printed infopublic static boolean deepEquals(ExprNode nodeOne, ExprNode nodeTwo)
Recursive call since it uses this method to compare child nodes in the same exact sequence. Nodes are compared using the equalsNode method.
nodeOne
- - first expression top node of the tree to comparenodeTwo
- - second expression top node of the tree to compare
protected static ExprNode.MappedPropertyParseResult parseMappedProperty(String property)
property
- is the string property to be passed as a static method invocation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |