| java.lang.Object org.springframework.beans.CachedIntrospectionResults
Field Summary | |
final static Set | acceptedClassLoaders Set of ClassLoaders that this CachedIntrospectionResults class will always
accept classes from, even if the classes do not qualify as cache-safe. | final static Map | classCache Map keyed by class containing CachedIntrospectionResults. |
Method Summary | |
public static void | acceptClassLoader(ClassLoader classLoader) Accept the given ClassLoader as cache-safe, even if its classes would
not qualify as cache-safe in this CachedIntrospectionResults class.
This configuration method is only relevant in scenarios where the Spring
classes reside in a 'common' ClassLoader (e.g. | public static void | clearClassLoader(ClassLoader classLoader) Clear the introspection cache for the given ClassLoader, removing the
introspection results for all classes underneath that ClassLoader,
and deregistering the ClassLoader (and any of its children) from the
acceptance list. | static CachedIntrospectionResults | forClass(Class beanClass) Create CachedIntrospectionResults for the given bean class.
We don't want to use synchronization here. | Class | getBeanClass() | BeanInfo | getBeanInfo() | PropertyDescriptor | getPropertyDescriptor(String propertyName) |
acceptedClassLoaders | final static Set acceptedClassLoaders(Code) | | Set of ClassLoaders that this CachedIntrospectionResults class will always
accept classes from, even if the classes do not qualify as cache-safe.
|
classCache | final static Map classCache(Code) | | Map keyed by class containing CachedIntrospectionResults.
Needs to be a WeakHashMap with WeakReferences as values to allow
for proper garbage collection in case of multiple class loaders.
|
acceptClassLoader | public static void acceptClassLoader(ClassLoader classLoader)(Code) | | Accept the given ClassLoader as cache-safe, even if its classes would
not qualify as cache-safe in this CachedIntrospectionResults class.
This configuration method is only relevant in scenarios where the Spring
classes reside in a 'common' ClassLoader (e.g. the system ClassLoader)
whose lifecycle is not coupled to the application. In such a scenario,
CachedIntrospectionResults would by default not cache any of the application's
classes, since they would create a leak in the common ClassLoader.
Any acceptClassLoader call at application startup should
be paired with a
CachedIntrospectionResults.clearClassLoader call at application shutdown.
Parameters: classLoader - the ClassLoader to accept |
clearClassLoader | public static void clearClassLoader(ClassLoader classLoader)(Code) | | Clear the introspection cache for the given ClassLoader, removing the
introspection results for all classes underneath that ClassLoader,
and deregistering the ClassLoader (and any of its children) from the
acceptance list.
Parameters: classLoader - the ClassLoader to clear the cache for |
forClass | static CachedIntrospectionResults forClass(Class beanClass) throws BeansException(Code) | | Create CachedIntrospectionResults for the given bean class.
We don't want to use synchronization here. Object references are atomic,
so we can live with doing the occasional unnecessary lookup at startup only.
Parameters: beanClass - the bean class to analyze the corresponding CachedIntrospectionResults throws: BeansException - in case of introspection failure |
|
|