Package org.camunda.bpm.engine.impl.juel
Class Tree
- java.lang.Object
-
- org.camunda.bpm.engine.impl.juel.Tree
-
public class Tree extends java.lang.Object
Parsed expression, usually created by aTreeBuilder
. Thebind(FunctionMapper, VariableMapper)
method is used to createBindings
, which are needed at evaluation time to lookup functions and variables. The tree itself does not contain such information, because it would make the tree depend on the function/variable mapper supplied at parse time.- Author:
- Christoph Beck
-
-
Constructor Summary
Constructors Constructor Description Tree(ExpressionNode root, java.util.Collection<FunctionNode> functions, java.util.Collection<IdentifierNode> identifiers, boolean deferred)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bindings
bind(FunctionMapper fnMapper, VariableMapper varMapper)
Create a bindings.Bindings
bind(FunctionMapper fnMapper, VariableMapper varMapper, TypeConverter converter)
Create a bindings.java.lang.Iterable<FunctionNode>
getFunctionNodes()
Get function nodes (in no particular order)java.lang.Iterable<IdentifierNode>
getIdentifierNodes()
Get identifier nodes (in no particular order)ExpressionNode
getRoot()
boolean
isDeferred()
java.lang.String
toString()
-
-
-
Constructor Detail
-
Tree
public Tree(ExpressionNode root, java.util.Collection<FunctionNode> functions, java.util.Collection<IdentifierNode> identifiers, boolean deferred)
Constructor.- Parameters:
root
- root nodefunctions
- collection of function nodesidentifiers
- collection of identifier nodes
-
-
Method Detail
-
getFunctionNodes
public java.lang.Iterable<FunctionNode> getFunctionNodes()
Get function nodes (in no particular order)
-
getIdentifierNodes
public java.lang.Iterable<IdentifierNode> getIdentifierNodes()
Get identifier nodes (in no particular order)
-
getRoot
public ExpressionNode getRoot()
- Returns:
- root node
-
isDeferred
public boolean isDeferred()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
bind
public Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper)
Create a bindings.- Parameters:
fnMapper
- the function mapper to usevarMapper
- the variable mapper to use- Returns:
- tree bindings
-
bind
public Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper, TypeConverter converter)
Create a bindings.- Parameters:
fnMapper
- the function mapper to usevarMapper
- the variable mapper to useconverter
- custom type converter- Returns:
- tree bindings
-
-