Package org.apache.commons.ognl
Class OgnlCache
java.lang.Object
org.apache.commons.ognl.OgnlCache
This class takes care of all the internal caching for OGNL.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Cache<Constructor<?>, Class<?>[]> private final ClassCache<Map<String, Field>> private final Cache<GenericMethodParameterTypeCacheEntry, Class<?>[]> private final Cache<PermissionCacheEntry, Permission> private final Cache<Method, MethodAccessEntryValue> private final CacheFactoryprivate final ClassCache<List<Constructor<?>>> private final ClassCache<ElementsAccessor> private final ClassCache<MethodAccessor> private final MethodPermCacheEntryFactoryprivate final ClassCache<NullHandler> private final ClassCache<PropertyAccessor> (package private) final ClassCache<Map<String, PropertyDescriptor>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()List<Constructor<?>> getConstructor(Class<?> clazz) getElementsAccessor(Class<?> clazz) Class<?>[]getInvokePermission(PermissionCacheEntry permissionCacheEntry) getMethod(DeclaredMethodCacheEntry declaredMethodCacheEntry) getMethodAccess(Method method) getMethodAccessor(Class<?> clazz) Class<?>[]getMethodParameterTypes(Method method) booleangetMethodPerm(Method method) getNullHandler(Class<?> clazz) Class<?>[]getParameterTypes(Constructor<?> constructor) getPropertyAccessor(Class<?> clazz) getPropertyDescriptor(Class<?> clazz) voidsetClassCacheInspector(ClassCacheInspector inspector) Registers the specifiedClassCacheInspectorwith all class reflection based internal caches.voidsetElementsAccessor(Class<?> clazz, ElementsAccessor accessor) voidsetMethodAccessor(Class<?> clazz, MethodAccessor accessor) voidsetNullHandler(Class<?> clazz, NullHandler handler) voidsetPropertyAccessor(Class<?> clazz, PropertyAccessor accessor) voidsetSecurityManager(SecurityManager securityManager)
-
Field Details
-
cacheFactory
-
methodAccessors
-
propertyAccessors
-
elementsAccessors
-
nullHandlers
-
propertyDescriptorCache
-
constructorCache
-
_methodCache
-
_invokePermissionCache
-
_fieldCache
-
_methodParameterTypesCache
-
_genericMethodParameterTypesCache
private final Cache<GenericMethodParameterTypeCacheEntry,Class<?>[]> _genericMethodParameterTypesCache -
_ctorParameterTypesCache
-
_methodAccessCache
-
methodPermCacheEntryFactory
-
_methodPermCache
-
-
Constructor Details
-
OgnlCache
public OgnlCache()
-
-
Method Details
-
getMethodParameterTypes
- Throws:
CacheException
-
getParameterTypes
- Throws:
CacheException
-
getConstructor
- Throws:
CacheException
-
getField
- Throws:
CacheException
-
getMethod
public Map<String,List<Method>> getMethod(DeclaredMethodCacheEntry declaredMethodCacheEntry) throws CacheException - Throws:
CacheException
-
getPropertyDescriptor
- Throws:
CacheException
-
getInvokePermission
public Permission getInvokePermission(PermissionCacheEntry permissionCacheEntry) throws CacheException - Throws:
CacheException
-
getMethodAccessor
- Throws:
OgnlException
-
setMethodAccessor
-
setPropertyAccessor
-
getPropertyAccessor
- Throws:
OgnlException
-
setClassCacheInspector
Registers the specifiedClassCacheInspectorwith all class reflection based internal caches. This may have a significant performance impact so be careful using this in production scenarios.- Parameters:
inspector- The inspector instance that will be registered with all internal cache instances.
-
getGenericMethodParameterTypes
public Class<?>[] getGenericMethodParameterTypes(GenericMethodParameterTypeCacheEntry key) throws CacheException - Throws:
CacheException
-
getMethodPerm
- Throws:
CacheException
-
getMethodAccess
- Throws:
CacheException
-
clear
public void clear() -
getElementsAccessor
- Throws:
OgnlException
-
setElementsAccessor
-
getNullHandler
- Throws:
OgnlException
-
setNullHandler
-
setSecurityManager
-