|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.CachedIntrospectionResults
Class to cache PropertyDescriptor information for a Java class. Package-visible; not for use by application code.
Necessary as Introspector.getBeanInfo() in JDK 1.3 will return a new deep copy of the BeanInfo every time we ask for it. We take the opportunity to hash property descriptors by method name for fast lookup. Furthermore, we do our own caching of descriptors here, rather than rely on the JDK's system-wide BeanInfo cache (to avoid leaks on class loader shutdown).
Information is cached statically, so we don't need to create new
objects of this class for every JavaBean we manipulate. Thus this class
implements the factory design pattern, using a private constructor
and a static forClass
method to obtain instances.
Method Summary | |
(package private) static CachedIntrospectionResults |
forClass(Class clazz)
We might use this from the EJB tier, so we don't want to use synchronization. |
(package private) Class |
getBeanClass()
|
(package private) BeanInfo |
getBeanInfo()
|
(package private) PropertyDescriptor |
getPropertyDescriptor(String propertyName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
static CachedIntrospectionResults forClass(Class clazz) throws BeansException
BeansException
BeanInfo getBeanInfo()
Class getBeanClass()
PropertyDescriptor getPropertyDescriptor(String propertyName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |