Package org.apache.commons.jexl3
Class ObjectContext<T>
java.lang.Object
org.apache.commons.jexl3.ObjectContext<T>
- Type Parameters:
- T- the wrapped object type to use
- All Implemented Interfaces:
- JexlContext,- JexlContext.NamespaceResolver
Wraps an Object as a JEXL context and NamespaceResolver.
- Since:
- 3.0
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jexl3.JexlContextJexlContext.AnnotationProcessor, JexlContext.CancellationHandle, JexlContext.ClassNameResolver, JexlContext.ModuleProcessor, JexlContext.NamespaceFunctor, JexlContext.NamespaceResolver, JexlContext.OptionsHandle, JexlContext.PragmaProcessor, JexlContext.ThreadLocal
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the value of a variable.protected JexlEnginegetJexl()Gets the Jexl engineprotected TGets the object exposed by this contextbooleanChecks whether a variable is defined in this context.resolveNamespace(String name) Resolves a namespace by its name.voidSets the value of a variable.
- 
Constructor Details- 
ObjectContextCreates a new ObjectContext.- Parameters:
- engine- the jexl engine to use to solve properties
- wrapped- the object to wrap in this context
 
 
- 
- 
Method Details- 
getDescription copied from interface:JexlContextGets the value of a variable.- Specified by:
- getin interface- JexlContext
- Parameters:
- name- the variable's name
- Returns:
- the value
 
- 
getJexlGets the Jexl engine- Returns:
- the Jexl engine
 
- 
getObjectGets the object exposed by this context- Returns:
- the object exposed by this context
 
- 
hasDescription copied from interface:JexlContextChecks 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. - Specified by:
- hasin interface- JexlContext
- Parameters:
- name- the variable's name
- Returns:
- true if it exists, false otherwise
 
- 
resolveNamespaceDescription copied from interface:JexlContext.NamespaceResolverResolves a namespace by its name.- Specified by:
- resolveNamespacein interface- JexlContext.NamespaceResolver
- Parameters:
- name- the name
- Returns:
- the namespace object
 
- 
setDescription copied from interface:JexlContextSets the value of a variable.- Specified by:
- setin interface- JexlContext
- Parameters:
- name- the variable's name
- value- the variable's value
 
 
-