Interface PatternExpr
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PatternAndExpr
,PatternEveryDistinctExpr
,PatternEveryExpr
,PatternExprBase
,PatternExprPlaceholder
,PatternFilterExpr
,PatternFollowedByExpr
,PatternGuardExpr
,PatternMatchUntilExpr
,PatternNotExpr
,PatternObserverExpr
,PatternOrExpr
Interface representing a pattern expression.
Pattern expressions are organized into a tree-like structure with nodes representing sub-expressions (composite).
Certain types of nodes have certain requirements towards the number or types of nodes that are expected as pattern sub-expressions to an pattern expression.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of pattern sub-expressions (child expressions) to the current pattern expression node.Returns the precedence.Returns the id for the pattern expression, for use by tools.void
setChildren
(List<PatternExpr> children) Sets the list of pattern sub-expressions (child expressions) to the current pattern expression node.void
setTreeObjectName
(String objectName) Sets and id for the pattern expression, for use by tools.void
toEPL
(StringWriter writer, PatternExprPrecedenceEnum parentPrecedence, EPStatementFormatter formatter) Renders the pattern expression and all it's child expressions, in full tree depth, as a string in language syntax.
-
Method Details
-
getChildren
List<PatternExpr> getChildren()Returns the list of pattern sub-expressions (child expressions) to the current pattern expression node.- Returns:
- pattern child expressions or empty list if there are no child expressions
-
setChildren
Sets the list of pattern sub-expressions (child expressions) to the current pattern expression node.- Parameters:
children
- pattern child expressions or empty list if there are no child expressions
-
getPrecedence
PatternExprPrecedenceEnum getPrecedence()Returns the precedence.- Returns:
- precedence
-
toEPL
void toEPL(StringWriter writer, PatternExprPrecedenceEnum parentPrecedence, EPStatementFormatter formatter) Renders the pattern expression and all it's child expressions, in full tree depth, as a string in language syntax.- Parameters:
writer
- is the output to useparentPrecedence
- precedenceformatter
- formatter
-
getTreeObjectName
String getTreeObjectName()Returns the id for the pattern expression, for use by tools.- Returns:
- id
-
setTreeObjectName
Sets and id for the pattern expression, for use by tools.- Parameters:
objectName
- id
-