Top Description Fields Constructors Methods
org.apache.commons.jexl2

public final Class ReadonlyContext

extends Object
implements JexlContext
Class Inheritance
All Implemented Interfaces
org.apache.commons.jexl2.JexlContext

A readonly context wrapper.
Since
2.1

Field Summary

Modifier and TypeField and Description
private final JexlContext
wrapped

The wrapped context.

Constructor Summary

AccessConstructor and Description
public
ReadonlyContext(JexlContext
the wrapped context
context
)

Creates a new readonly context.

Method Summary

Modifier and TypeMethod and Description
public Object
get(String
the variable's name
name
)

Implements org.apache.commons.jexl2.JexlContext.get.

Gets the value of a variable.
public boolean
has(String
the variable's name
name
)

Implements org.apache.commons.jexl2.JexlContext.has.

Checks whether a variable is defined in this context.
public void
set(String
the unused variable name
name
,
Object
the unused variable value
value
)

Implements org.apache.commons.jexl2.JexlContext.set.

Will throw an UnsupportedOperationException when called; the JexlEngine deals with it appropriately.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

wrappedback to summary
private final JexlContext wrapped

The wrapped context.

Constructor Detail

ReadonlyContextback to summary
public ReadonlyContext(JexlContext context)

Creates a new readonly context.

Parameters
context:JexlContext

the wrapped context

Method Detail

getback to summary
public Object get(String name)

Implements org.apache.commons.jexl2.JexlContext.get.

Doc from org.apache.commons.jexl2.JexlContext.get.

Gets the value of a variable.

Parameters
name:String

the variable's name

Returns:Object

the value

hasback to summary
public boolean has(String name)

Implements org.apache.commons.jexl2.JexlContext.has.

Doc from org.apache.commons.jexl2.JexlContext.has.

Checks whether a variable is defined in this context.

A variable may be defined with a null value; this method checks whether the value is null or if the variable is undefined.

Parameters
name:String

the variable's name

Returns:boolean

true if it exists, false otherwise

setback to summary
public void set(String name, Object value)

Implements org.apache.commons.jexl2.JexlContext.set.

Will throw an UnsupportedOperationException when called; the JexlEngine deals with it appropriately.

Parameters
name:String

the unused variable name

value:Object

the unused variable value