Package org.camunda.bpm.engine.impl.juel
Class Tree
- java.lang.Object
-
- org.camunda.bpm.engine.impl.juel.Tree
-
public class Tree extends 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, Collection<FunctionNode> functions, 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.Iterable<FunctionNode>
getFunctionNodes()
Get function nodes (in no particular order)Iterable<IdentifierNode>
getIdentifierNodes()
Get identifier nodes (in no particular order)ExpressionNode
getRoot()
boolean
isDeferred()
String
toString()
-
-
-
Constructor Detail
-
Tree
public Tree(ExpressionNode root, Collection<FunctionNode> functions, Collection<IdentifierNode> identifiers, boolean deferred)
Constructor.- Parameters:
root
- root nodefunctions
- collection of function nodesidentifiers
- collection of identifier nodes
-
-
Method Detail
-
getFunctionNodes
public Iterable<FunctionNode> getFunctionNodes()
Get function nodes (in no particular order)
-
getIdentifierNodes
public Iterable<IdentifierNode> getIdentifierNodes()
Get identifier nodes (in no particular order)
-
getRoot
public ExpressionNode getRoot()
- Returns:
- root node
-
isDeferred
public boolean isDeferred()
-
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
-
-