public final class ReadonlyContext extends java.lang.Object implements JexlContext
Modifier and Type | Field and Description |
---|---|
private JexlContext |
wrapped
The wrapped context.
|
Constructor and Description |
---|
ReadonlyContext(JexlContext context)
Creates a new readonly context.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.String name)
Gets the value of a variable.
|
boolean |
has(java.lang.String name)
Checks whether a variable is defined in this context.
|
void |
set(java.lang.String name,
java.lang.Object value)
Will throw an UnsupportedOperationException when called; the JexlEngine deals with it appropriately.
|
private final JexlContext wrapped
public ReadonlyContext(JexlContext context)
context
- the wrapped contextpublic java.lang.Object get(java.lang.String name)
get
in interface JexlContext
name
- the variable's namepublic void set(java.lang.String name, java.lang.Object value)
set
in interface JexlContext
name
- the unused variable namevalue
- the unused variable valuepublic boolean has(java.lang.String name)
A variable may be defined with a null value; this method checks whether the value is null or if the variable is undefined.
has
in interface JexlContext
name
- the variable's name