Class OgnlCache
java.lang.Object
ognl.OgnlCache
This class takes care of all the internal caching for OGNL.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CacheFactoryprivate final ClassCache<List<Constructor<?>>> private final Cache<Constructor<?>, Class<?>[]> private final ClassCache<ElementsAccessor> private final ClassCache<Map<String, Field>> (package private) final Cache<GenericMethodParameterTypeCacheEntry, Class<?>[]> private final Cache<PermissionCacheEntry, Permission> private final Cache<Method, MethodAccessEntryValue> 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) Deprecated.since 3.4.6, forRemoval = truegetMethod(DeclaredMethodCacheEntry declaredMethodCacheEntry) getMethodAccess(Method method) getMethodAccessor(Class<?> clazz) Class<?>[]getMethodParameterTypes(Method method) booleangetMethodPerm(Method method) Deprecated.since 3.4.6, forRemoval = truegetNullHandler(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) Deprecated.since 3.4.6, forRemoval = true
-
Field Details
-
cacheFactory
-
methodAccessors
-
propertyAccessors
-
elementsAccessors
-
nullHandlers
-
propertyDescriptorCache
-
constructorCache
-
methodCache
-
invokePermissionCache
-
fieldCache
-
methodParameterTypesCache
-
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
@Deprecated public Permission getInvokePermission(PermissionCacheEntry permissionCacheEntry) throws CacheException Deprecated.since 3.4.6, forRemoval = true- 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
Deprecated.since 3.4.6, forRemoval = true- Throws:
CacheException
-
getMethodAccess
- Throws:
CacheException
-
clear
public void clear() -
getElementsAccessor
- Throws:
OgnlException
-
setElementsAccessor
-
getNullHandler
- Throws:
OgnlException
-
setNullHandler
-
setSecurityManager
Deprecated.since 3.4.6, forRemoval = true
-