Class Engine.VarCollector
java.lang.Object
org.apache.commons.jexl3.internal.Engine.VarCollector
- Enclosing class:
- Engine
Utility class to collect variables.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
Whether constant array-access is considered equivalent to dot-access; if so, > 1 means collect any constant (set,map,...) instead of just strings and numbers.The current variable being collected.The collected variables represented as a set of list of strings.private JexlNode
The node that started the collect. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
refs
The collected variables represented as a set of list of strings. -
ref
The current variable being collected. -
root
The node that started the collect. -
mode
final int modeWhether constant array-access is considered equivalent to dot-access; if so, > 1 means collect any constant (set,map,...) instead of just strings and numbers.
-
-
Constructor Details
-
VarCollector
protected VarCollector(int constaa) Constructor.- Parameters:
constaa
- whether constant array-access is considered equivalent to dot-access
-
-
Method Details
-
collect
Starts/stops a variable collect.- Parameters:
node
- starts if not null, stop if null
-
isCollecting
public boolean isCollecting()- Returns:
- true if currently collecting a variable, false otherwise
-
add
Adds a 'segment' to the variable being collected.- Parameters:
name
- the name
-
collected
- Returns:
- the collected variables
-