|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.ognl.OgnlContext
public class OgnlContext
This class defines the execution context for an OGNL expression
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
static String |
CLASS_RESOLVER_CONTEXT_KEY
|
static String |
CONTEXT_CONTEXT_KEY
|
static DefaultClassResolver |
DEFAULT_CLASS_RESOLVER
|
static MemberAccess |
DEFAULT_MEMBER_ACCESS
|
static TypeConverter |
DEFAULT_TYPE_CONVERTER
|
static String |
KEEP_LAST_EVALUATION_CONTEXT_KEY
|
static String |
LAST_EVALUATION_CONTEXT_KEY
|
static String |
MEMBER_ACCESS_CONTEXT_KEY
|
static String |
ROOT_CONTEXT_KEY
|
static String |
THIS_CONTEXT_KEY
|
static String |
TRACE_EVALUATIONS_CONTEXT_KEY
|
static String |
TYPE_CONVERTER_CONTEXT_KEY
|
Constructor Summary | |
---|---|
OgnlContext()
Constructs a new OgnlContext with the default class resolver, type converter and member access. |
|
OgnlContext(ClassResolver classResolver,
TypeConverter typeConverter,
MemberAccess memberAccess)
Constructs a new OgnlContext with the given class resolver, type converter and member access. |
|
OgnlContext(ClassResolver classResolver,
TypeConverter typeConverter,
MemberAccess memberAccess,
Map<String,Object> values)
|
|
OgnlContext(Map<String,Object> values)
|
Method Summary | |
---|---|
void |
addLocalReference(String key,
LocalReference reference)
|
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set<Map.Entry<String,Object>> |
entrySet()
|
boolean |
equals(Object o)
|
Object |
get(Object key)
|
ClassResolver |
getClassResolver()
|
Class<?> |
getCurrentAccessor()
|
Evaluation |
getCurrentEvaluation()
Gets the current Evaluation from the top of the stack. |
Node |
getCurrentNode()
|
Object |
getCurrentObject()
|
Class<?> |
getCurrentType()
Gets the current class type being evaluated on the stack, as set by setCurrentType(Class) . |
Evaluation |
getEvaluation(int relativeIndex)
Returns the Evaluation at the relative index given. |
Class<?> |
getFirstAccessor()
|
Class<?> |
getFirstType()
|
boolean |
getKeepLastEvaluation()
Returns true if the last evaluation that was done on this context is retained and available through getLastEvaluation() . |
Evaluation |
getLastEvaluation()
|
Map<String,LocalReference> |
getLocalReferences()
|
MemberAccess |
getMemberAccess()
|
Class<?> |
getPreviousAccessor()
|
Class<?> |
getPreviousType()
Represents the last known object type on the evaluation stack, will be the value of the last known getCurrentType() . |
Object |
getRoot()
|
Evaluation |
getRootEvaluation()
Gets the root of the evaluation stack. |
boolean |
getTraceEvaluations()
|
TypeConverter |
getTypeConverter()
|
Map<String,Object> |
getValues()
|
int |
hashCode()
|
int |
incrementLocalReferenceCounter()
|
boolean |
isEmpty()
|
Set<String> |
keySet()
|
Evaluation |
popEvaluation()
Pops the current Evaluation off of the top of the stack. |
void |
pushEvaluation(Evaluation value)
Pushes a new Evaluation onto the stack. |
Object |
put(String key,
Object value)
|
void |
putAll(Map<? extends String,?> t)
|
void |
recycleLastEvaluation()
This method can be called when the last evaluation has been used and can be returned for reuse in the free pool maintained by the runtime. |
Object |
remove(Object key)
|
void |
setClassResolver(ClassResolver value)
|
void |
setCurrentAccessor(Class<?> type)
|
void |
setCurrentEvaluation(Evaluation value)
|
void |
setCurrentNode(Node value)
|
void |
setCurrentObject(Object value)
|
void |
setCurrentType(Class<?> type)
|
void |
setKeepLastEvaluation(boolean value)
Sets whether the last evaluation that was done on this context is retained and available through getLastEvaluation() . |
void |
setLastEvaluation(Evaluation value)
|
void |
setMemberAccess(MemberAccess value)
|
void |
setPreviousType(Class<?> type)
|
void |
setRoot(Object value)
|
void |
setRootEvaluation(Evaluation value)
|
void |
setTraceEvaluations(boolean value)
|
void |
setTypeConverter(TypeConverter value)
|
void |
setValues(Map<String,Object> value)
|
int |
size()
|
Collection<Object> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONTEXT_CONTEXT_KEY
public static final String ROOT_CONTEXT_KEY
public static final String THIS_CONTEXT_KEY
public static final String TRACE_EVALUATIONS_CONTEXT_KEY
public static final String LAST_EVALUATION_CONTEXT_KEY
public static final String KEEP_LAST_EVALUATION_CONTEXT_KEY
public static final String CLASS_RESOLVER_CONTEXT_KEY
public static final String TYPE_CONVERTER_CONTEXT_KEY
public static final String MEMBER_ACCESS_CONTEXT_KEY
public static final DefaultClassResolver DEFAULT_CLASS_RESOLVER
public static final TypeConverter DEFAULT_TYPE_CONVERTER
public static final MemberAccess DEFAULT_MEMBER_ACCESS
Constructor Detail |
---|
public OgnlContext()
public OgnlContext(ClassResolver classResolver, TypeConverter typeConverter, MemberAccess memberAccess)
public OgnlContext(Map<String,Object> values)
public OgnlContext(ClassResolver classResolver, TypeConverter typeConverter, MemberAccess memberAccess, Map<String,Object> values)
Method Detail |
---|
public void setValues(Map<String,Object> value)
public Map<String,Object> getValues()
public void setClassResolver(ClassResolver value)
public ClassResolver getClassResolver()
public void setTypeConverter(TypeConverter value)
public TypeConverter getTypeConverter()
public void setMemberAccess(MemberAccess value)
public MemberAccess getMemberAccess()
public void setRoot(Object value)
public Object getRoot()
public boolean getTraceEvaluations()
public void setTraceEvaluations(boolean value)
public Evaluation getLastEvaluation()
public void setLastEvaluation(Evaluation value)
public void recycleLastEvaluation()
public boolean getKeepLastEvaluation()
getLastEvaluation()
. The default is true.
public void setKeepLastEvaluation(boolean value)
getLastEvaluation()
. The default is true.
public void setCurrentObject(Object value)
public Object getCurrentObject()
public void setCurrentAccessor(Class<?> type)
public Class<?> getCurrentAccessor()
public Class<?> getPreviousAccessor()
public Class<?> getFirstAccessor()
public Class<?> getCurrentType()
setCurrentType(Class)
.
public void setCurrentType(Class<?> type)
public Class<?> getPreviousType()
getCurrentType()
.
public void setPreviousType(Class<?> type)
public Class<?> getFirstType()
public void setCurrentNode(Node value)
public Node getCurrentNode()
public Evaluation getCurrentEvaluation()
public void setCurrentEvaluation(Evaluation value)
public Evaluation getRootEvaluation()
public void setRootEvaluation(Evaluation value)
public Evaluation getEvaluation(int relativeIndex)
public void pushEvaluation(Evaluation value)
popEvaluation()
.
public Evaluation popEvaluation()
public int incrementLocalReferenceCounter()
public void addLocalReference(String key, LocalReference reference)
public Map<String,LocalReference> getLocalReferences()
public int size()
size
in interface Map<String,Object>
public boolean isEmpty()
isEmpty
in interface Map<String,Object>
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public Object get(Object key)
get
in interface Map<String,Object>
public Object put(String key, Object value)
put
in interface Map<String,Object>
public Object remove(Object key)
remove
in interface Map<String,Object>
public void putAll(Map<? extends String,?> t)
putAll
in interface Map<String,Object>
public void clear()
clear
in interface Map<String,Object>
public Set<String> keySet()
keySet
in interface Map<String,Object>
public Collection<Object> values()
values
in interface Map<String,Object>
public Set<Map.Entry<String,Object>> entrySet()
entrySet
in interface Map<String,Object>
public boolean equals(Object o)
equals
in interface Map<String,Object>
equals
in class Object
public int hashCode()
hashCode
in interface Map<String,Object>
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |