public abstract class ExpressionBase extends java.lang.Object implements Expression
Constructor and Description |
---|
ExpressionBase()
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Expression expression)
Adds a new child expression to the current expression.
|
java.util.List<Expression> |
getChildren()
Returns the list of sub-expressions to the current expression.
|
java.lang.String |
getTreeObjectName()
Returns the tree of object name, for use by tools to assign an identifier to an expression.
|
void |
setChildren(java.util.List<Expression> children)
Sets the list of sub-expressions (child expressions) to the current expression node.
|
void |
setTreeObjectName(java.lang.String treeObjectName)
Sets the tree of object name, for use by tools to assign an identifier to an expression.
|
void |
toEPL(java.io.StringWriter writer,
ExpressionPrecedenceEnum parentPrecedence)
Write expression considering precedence.
|
abstract void |
toPrecedenceFreeEPL(java.io.StringWriter writer)
Renders the expressions and all it's child expression, in full tree depth, as a string in
language syntax.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPrecedence
public java.lang.String getTreeObjectName()
Expression
getTreeObjectName
in interface Expression
public void setTreeObjectName(java.lang.String treeObjectName)
Expression
setTreeObjectName
in interface Expression
treeObjectName
- tree object idpublic java.util.List<Expression> getChildren()
getChildren
in interface Expression
public void addChild(Expression expression)
expression
- to addpublic void setChildren(java.util.List<Expression> children)
Expression
setChildren
in interface Expression
children
- child expressions or empty list if there are no child expressionspublic final void toEPL(java.io.StringWriter writer, ExpressionPrecedenceEnum parentPrecedence)
Expression
toEPL
in interface Expression
writer
- to useparentPrecedence
- precedencepublic abstract void toPrecedenceFreeEPL(java.io.StringWriter writer)
writer
- is the output to use