Class ReflectionContextState
java.lang.Object
org.apache.struts2.util.reflection.ReflectionContextState
Manages variables in the reflection context and returns values
to be used by the application.
- Author:
- Gabe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidclearCurrentPropertyPath(Map<String, Object> context) static StringgetCurrentPropertyPath(Map<String, Object> context) Gets the current property path but not completely.static StringgetFullPropertyPath(Map<String, Object> context) static ClassgetLastBeanClassAccessed(Map<String, Object> context) static StringgetLastBeanPropertyAccessed(Map<String, Object> context) static booleanisCreatingNullObjects(Map<String, Object> context) static booleanisDenyMethodExecution(Map<String, Object> context) static booleanisGettingByKeyProperty(Map<String, Object> context) static booleanisReportingConversionErrors(Map<String, Object> context) static voidsetCreatingNullObjects(Map<String, Object> context, boolean creatingNullObjects) static voidsetDenyMethodExecution(Map<String, Object> context, boolean denyMethodExecution) static voidsetFullPropertyPath(Map<String, Object> context, String path) static voidsetGettingByKeyProperty(Map<String, Object> context, boolean gettingByKeyProperty) static voidsetLastBeanClassAccessed(Map<String, Object> context, Class clazz) static voidsetLastBeanPropertyAccessed(Map<String, Object> context, String property) static voidsetReportingConversionErrors(Map<String, Object> context, boolean reportingErrors) static voidstatic voidupdateCurrentPropertyPath(Map<String, Object> context, Object name)
-
Field Details
-
CURRENT_PROPERTY_PATH
- See Also:
-
FULL_PROPERTY_PATH
- See Also:
-
CREATE_NULL_OBJECTS
- See Also:
-
DENY_METHOD_EXECUTION
- See Also:
-
DENY_INDEXED_ACCESS_EXECUTION
@Deprecated(since="7.4.0", forRemoval=true) public static final String DENY_INDEXED_ACCESS_EXECUTIONDeprecated, for removal: This API element is subject to removal in a future version.since 7.4.0, no replacement. Struts core never sets this key, so it has no effect on framework-driven binding. Indexed property access is now identified by inspecting the target type rather than by trusting a method name prefix, which is the check the key was standing in for. Application or plugin code which sets the key itself does still suppress the fast path, which is why this is deprecated rather than removed outright. Scheduled for removal in 8.0.0 by WW-5699.- See Also:
-
-
Constructor Details
-
ReflectionContextState
public ReflectionContextState()
-
-
Method Details
-
isCreatingNullObjects
-
setCreatingNullObjects
-
isGettingByKeyProperty
-
setDenyMethodExecution
-
isDenyMethodExecution
-
setGettingByKeyProperty
-
isReportingConversionErrors
-
setReportingConversionErrors
-
getLastBeanClassAccessed
-
setLastBeanPropertyAccessed
-
getLastBeanPropertyAccessed
-
setLastBeanClassAccessed
-
getCurrentPropertyPath
Gets the current property path but not completely. It does not use the [ and ] used in some representations of Maps and Lists. The reason for this is that the current property path is only currently used for caching purposes so there is no real reason to have an exact replica.
So if the real path is myProp.myMap['myKey'] this would return myProp.myMap.myKey.
- Parameters:
context- context map- Returns:
- current property path
-
getFullPropertyPath
-
setFullPropertyPath
-
updateCurrentPropertyPath
-
setSetMap
-
getSetMap
-
clearCurrentPropertyPath
- Parameters:
context- the context map
-
clear
-