class ExtendedBeanInfo
extends java.lang.Object
implements java.beans.BeanInfo
BeanInfo object (likely created created by
Introspector.getBeanInfo(Class)) by including non-void returning setter
methods in the collection of property descriptors.
Both regular and
indexed properties are fully supported.
The wrapped BeanInfo object is not modified in any way.
CachedIntrospectionResults| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ExtendedBeanInfo.PropertyDescriptorComparator
Sorts PropertyDescriptor instances alphanumerically to emulate the behavior of
BeanInfo.getPropertyDescriptors(). |
| Modifier and Type | Field and Description |
|---|---|
private java.beans.BeanInfo |
delegate |
private Log |
logger |
private java.util.SortedSet<java.beans.PropertyDescriptor> |
propertyDescriptors |
| Constructor and Description |
|---|
ExtendedBeanInfo(java.beans.BeanInfo delegate)
Wrap the given delegate
BeanInfo instance and find any non-void returning
setter methods, creating and adding a PropertyDescriptor for each. |
| Modifier and Type | Method and Description |
|---|---|
private void |
addOrUpdatePropertyDescriptor(java.beans.PropertyDescriptor pd,
java.lang.String propertyName,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod) |
private void |
addOrUpdatePropertyDescriptor(java.beans.PropertyDescriptor pd,
java.lang.String propertyName,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod,
java.lang.reflect.Method indexedReadMethod,
java.lang.reflect.Method indexedWriteMethod) |
java.beans.BeanInfo[] |
getAdditionalBeanInfo() |
java.beans.BeanDescriptor |
getBeanDescriptor() |
int |
getDefaultEventIndex() |
int |
getDefaultPropertyIndex() |
java.beans.EventSetDescriptor[] |
getEventSetDescriptors() |
java.awt.Image |
getIcon(int arg0) |
java.beans.MethodDescriptor[] |
getMethodDescriptors() |
java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
Return the set of
PropertyDescriptors from the wrapped BeanInfo
object as well as PropertyDescriptors for each non-void returning setter
method found during construction. |
private java.lang.Object |
getterMethodNameFor(java.lang.String name) |
private java.lang.String |
propertyNameFor(java.lang.reflect.Method method) |
private final Log logger
private final java.beans.BeanInfo delegate
private final java.util.SortedSet<java.beans.PropertyDescriptor> propertyDescriptors
public ExtendedBeanInfo(java.beans.BeanInfo delegate)
throws java.beans.IntrospectionException
BeanInfo instance and find any non-void returning
setter methods, creating and adding a PropertyDescriptor for each.
Note that the wrapped BeanInfo is modified by this process.
java.beans.IntrospectionException - if any problems occur creating and adding new PropertyDescriptorsgetPropertyDescriptors()private void addOrUpdatePropertyDescriptor(java.beans.PropertyDescriptor pd,
java.lang.String propertyName,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod)
throws java.beans.IntrospectionException
java.beans.IntrospectionExceptionprivate void addOrUpdatePropertyDescriptor(java.beans.PropertyDescriptor pd,
java.lang.String propertyName,
java.lang.reflect.Method readMethod,
java.lang.reflect.Method writeMethod,
java.lang.reflect.Method indexedReadMethod,
java.lang.reflect.Method indexedWriteMethod)
throws java.beans.IntrospectionException
java.beans.IntrospectionExceptionprivate java.lang.String propertyNameFor(java.lang.reflect.Method method)
private java.lang.Object getterMethodNameFor(java.lang.String name)
public java.beans.BeanInfo[] getAdditionalBeanInfo()
getAdditionalBeanInfo in interface java.beans.BeanInfopublic java.beans.BeanDescriptor getBeanDescriptor()
getBeanDescriptor in interface java.beans.BeanInfopublic int getDefaultEventIndex()
getDefaultEventIndex in interface java.beans.BeanInfopublic int getDefaultPropertyIndex()
getDefaultPropertyIndex in interface java.beans.BeanInfopublic java.beans.EventSetDescriptor[] getEventSetDescriptors()
getEventSetDescriptors in interface java.beans.BeanInfopublic java.awt.Image getIcon(int arg0)
getIcon in interface java.beans.BeanInfopublic java.beans.MethodDescriptor[] getMethodDescriptors()
getMethodDescriptors in interface java.beans.BeanInfopublic java.beans.PropertyDescriptor[] getPropertyDescriptors()
PropertyDescriptors from the wrapped BeanInfo
object as well as PropertyDescriptors for each non-void returning setter
method found during construction.getPropertyDescriptors in interface java.beans.BeanInfoExtendedBeanInfo(BeanInfo)