Interface PatternExpr

All Superinterfaces:
Serializable
All Known Implementing Classes:
PatternAndExpr, PatternEveryDistinctExpr, PatternEveryExpr, PatternExprBase, PatternExprPlaceholder, PatternFilterExpr, PatternFollowedByExpr, PatternGuardExpr, PatternMatchUntilExpr, PatternNotExpr, PatternObserverExpr, PatternOrExpr

public interface PatternExpr extends Serializable
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 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

      void setChildren(List<PatternExpr> children)
      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 use
      parentPrecedence - precedence
      formatter - formatter
    • getTreeObjectName

      String getTreeObjectName()
      Returns the id for the pattern expression, for use by tools.
      Returns:
      id
    • setTreeObjectName

      void setTreeObjectName(String objectName)
      Sets and id for the pattern expression, for use by tools.
      Parameters:
      objectName - id