public static final class JexlEngine.Scope extends java.lang.Object
Constructor | Description |
---|---|
Scope(java.lang.String... parameters) |
Creates a new scope with a list of parameters.
|
Modifier and Type | Method | Description |
---|---|---|
JexlEngine.Frame |
createFrame(java.lang.Object... values) |
Creates a frame by copying values up to the number of parameters.
|
java.lang.Integer |
declareVariable(java.lang.String name) |
Declares a local variable.
|
boolean |
equals(java.lang.Object o) |
|
boolean |
equals(JexlEngine.Scope frame) |
Whether this frame is equal to another.
|
int |
getArgCount() |
Gets the (maximum) number of arguments this script expects.
|
java.lang.String[] |
getLocalVariables() |
Gets this script local variable, i.e.
|
java.lang.String[] |
getParameters() |
Gets this script parameters, i.e.
|
java.lang.Integer |
getRegister(java.lang.String name) |
Checks whether an identifier is a local variable or argument, ie stored in a register.
|
java.lang.String[] |
getRegisters() |
Gets this script registers, i.e.
|
int |
hashCode() |
public Scope(java.lang.String... parameters)
parameters
- the list of parameterspublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(JexlEngine.Scope frame)
frame
- the frame to compare topublic java.lang.Integer getRegister(java.lang.String name)
name
- the register namepublic java.lang.Integer declareVariable(java.lang.String name)
This method creates an new entry in the named register map.
name
- the variable namepublic JexlEngine.Frame createFrame(java.lang.Object... values)
values
- the argument valuespublic int getArgCount()
public java.lang.String[] getRegisters()
public java.lang.String[] getParameters()
public java.lang.String[] getLocalVariables()