org.apache.commons.ognl
Class OgnlCache

java.lang.Object
  extended by org.apache.commons.ognl.OgnlCache

public class OgnlCache
extends Object

This class takes care of all the internal caching for OGNL.


Constructor Summary
OgnlCache()
           
 
Method Summary
 void clear()
           
 List<Constructor<?>> getConstructor(Class<?> clazz)
           
 ElementsAccessor getElementsAccessor(Class<?> clazz)
           
 Map<String,Field> getField(Class<?> clazz)
           
 Class<?>[] getGenericMethodParameterTypes(GenericMethodParameterTypeCacheEntry key)
           
 Permission getInvokePermission(PermissionCacheEntry permissionCacheEntry)
           
 Map<String,List<Method>> getMethod(DeclaredMethodCacheEntry declaredMethodCacheEntry)
           
 MethodAccessEntryValue getMethodAccess(Method method)
           
 MethodAccessor getMethodAccessor(Class<?> clazz)
           
 Class<?>[] getMethodParameterTypes(Method method)
           
 boolean getMethodPerm(Method method)
           
 NullHandler getNullHandler(Class<?> clazz)
           
 Class<?>[] getParameterTypes(Constructor<?> constructor)
           
 PropertyAccessor getPropertyAccessor(Class<?> clazz)
           
 Map<String,PropertyDescriptor> getPropertyDescriptor(Class<?> clazz)
           
 void setClassCacheInspector(ClassCacheInspector inspector)
          Registers the specified ClassCacheInspector with all class reflection based internal caches.
 void setElementsAccessor(Class<?> clazz, ElementsAccessor accessor)
           
 void setMethodAccessor(Class<?> clazz, MethodAccessor accessor)
           
 void setNullHandler(Class<?> clazz, NullHandler handler)
           
 void setPropertyAccessor(Class<?> clazz, PropertyAccessor accessor)
           
 void setSecurityManager(SecurityManager securityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OgnlCache

public OgnlCache()
Method Detail

getMethodParameterTypes

public Class<?>[] getMethodParameterTypes(Method method)
                                   throws CacheException
Throws:
CacheException

getParameterTypes

public Class<?>[] getParameterTypes(Constructor<?> constructor)
                             throws CacheException
Throws:
CacheException

getConstructor

public List<Constructor<?>> getConstructor(Class<?> clazz)
                                    throws CacheException
Throws:
CacheException

getField

public Map<String,Field> getField(Class<?> clazz)
                           throws CacheException
Throws:
CacheException

getMethod

public Map<String,List<Method>> getMethod(DeclaredMethodCacheEntry declaredMethodCacheEntry)
                                   throws CacheException
Throws:
CacheException

getPropertyDescriptor

public Map<String,PropertyDescriptor> getPropertyDescriptor(Class<?> clazz)
                                                     throws CacheException
Throws:
CacheException

getInvokePermission

public Permission getInvokePermission(PermissionCacheEntry permissionCacheEntry)
                               throws CacheException
Throws:
CacheException

getMethodAccessor

public MethodAccessor getMethodAccessor(Class<?> clazz)
                                 throws OgnlException
Throws:
OgnlException

setMethodAccessor

public void setMethodAccessor(Class<?> clazz,
                              MethodAccessor accessor)

setPropertyAccessor

public void setPropertyAccessor(Class<?> clazz,
                                PropertyAccessor accessor)

getPropertyAccessor

public PropertyAccessor getPropertyAccessor(Class<?> clazz)
                                     throws OgnlException
Throws:
OgnlException

setClassCacheInspector

public void setClassCacheInspector(ClassCacheInspector inspector)
Registers the specified ClassCacheInspector with 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

public boolean getMethodPerm(Method method)
                      throws CacheException
Throws:
CacheException

getMethodAccess

public MethodAccessEntryValue getMethodAccess(Method method)
                                       throws CacheException
Throws:
CacheException

clear

public void clear()

getElementsAccessor

public ElementsAccessor getElementsAccessor(Class<?> clazz)
                                     throws OgnlException
Throws:
OgnlException

setElementsAccessor

public void setElementsAccessor(Class<?> clazz,
                                ElementsAccessor accessor)

getNullHandler

public NullHandler getNullHandler(Class<?> clazz)
                           throws OgnlException
Throws:
OgnlException

setNullHandler

public void setNullHandler(Class<?> clazz,
                           NullHandler handler)

setSecurityManager

public void setSecurityManager(SecurityManager securityManager)


Copyright © 1997-2013 The Apache Software Foundation. All Rights Reserved.