private static final class JexlOne.ContextAdapter extends java.lang.Object implements JexlContext
Modifier and Type | Field and Description |
---|---|
private JexlContext |
legacy
The Jexl1.x context.
|
Constructor and Description |
---|
ContextAdapter(JexlContext ctxt10)
Creates a jexl2.JexlContext from a jexl.JexlContext.
|
Modifier and Type | Method and Description |
---|---|
(package private) static JexlContext |
adapt(JexlContext aContext)
Adapts a Jexl-1.x context to a Jexl-2.0 context.
|
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)
Sets the value of a variable.
|
private final JexlContext legacy
ContextAdapter(JexlContext ctxt10)
ctxt10
- public 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 variable's namevalue
- the variable's 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 namestatic final JexlContext adapt(JexlContext aContext)
aContext
- a oac.jexl context