Class LexicalFrame
java.lang.Object
org.apache.commons.jexl3.internal.LexicalScope
org.apache.commons.jexl3.internal.LexicalFrame
The set of valued symbols defined in a lexical frame.
The functional scope determines the symbol identifiers. Since the frame contains values of all symbols in the functional scope, the lexical frame preserves values of symbols reused for local definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FrameThe script frame.protected final LexicalFramePrevious frame.The stack of values in the lexical frame.Fields inherited from class org.apache.commons.jexl3.internal.LexicalScope
BITS_PER_LONG, BITS_PER_SYMBOL, count, moreSymbols, SYMBOL_MASK, SYMBOL_SHIFT, symbols -
Constructor Summary
ConstructorsConstructorDescriptionLexicalFrame(Frame scriptf, LexicalFrame outerf) Lexical frame ctor.LexicalFrame(LexicalFrame src) Copy ctor. -
Method Summary
Modifier and TypeMethodDescriptionDefine the arguments.booleandefineSymbol(int symbol, boolean capture) Defines a symbol.pop()Pops back values and lexical frame.Methods inherited from class org.apache.commons.jexl3.internal.LexicalScope
addConstant, addSymbol, clearSymbols, getSymbolCount, hasSymbol, isConstant
-
Field Details
-
frame
The script frame. -
previous
Previous frame. -
stack
The stack of values in the lexical frame.[symbol identifier, value] are stacked in pairs
-
-
Constructor Details
-
LexicalFrame
Lexical frame ctor.- Parameters:
scriptf- The script frameouterf- The previous lexical frame
-
LexicalFrame
Copy ctor.- Parameters:
src- The frame to copy
-
-
Method Details
-
defineArgs
Define the arguments.- Returns:
- this frame
-
defineSymbol
public boolean defineSymbol(int symbol, boolean capture) Defines a symbol.- Parameters:
symbol- The symbol to definecapture- whether this redefines a captured symbol- Returns:
- true if the symbol is defined, false otherwise
-
pop
Pops back values and lexical frame.- Returns:
- The previous frame
-