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 alpha-numerically 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
PropertyDescriptor s from the wrapped BeanInfo
object as well as PropertyDescriptor s for each non-void returning setter
method found during construction. |
private java.lang.Object |
getterMethodNameFor(java.lang.String name) |
private static java.lang.reflect.Method |
indexedReadMethodFor(java.beans.IndexedPropertyDescriptor ipd) |
private static java.lang.reflect.Method |
indexedWriteMethodFor(java.beans.IndexedPropertyDescriptor ipd) |
private java.lang.String |
propertyNameFor(java.lang.reflect.Method method) |
private static java.lang.reflect.Method |
readMethodFor(java.beans.PropertyDescriptor pd) |
private static java.lang.reflect.Method |
resolveMethod(java.lang.reflect.Method method) |
private static java.lang.reflect.Method |
writeMethodFor(java.beans.PropertyDescriptor pd) |
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 PropertyDescriptors
getPropertyDescriptors()
private static java.lang.reflect.Method resolveMethod(java.lang.reflect.Method method)
private static java.lang.reflect.Method readMethodFor(java.beans.PropertyDescriptor pd)
private static java.lang.reflect.Method writeMethodFor(java.beans.PropertyDescriptor pd)
private static java.lang.reflect.Method indexedReadMethodFor(java.beans.IndexedPropertyDescriptor ipd)
private static java.lang.reflect.Method indexedWriteMethodFor(java.beans.IndexedPropertyDescriptor ipd)
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.IntrospectionException
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) throws java.beans.IntrospectionException
java.beans.IntrospectionException
private 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.BeanInfo
public java.beans.BeanDescriptor getBeanDescriptor()
getBeanDescriptor
in interface java.beans.BeanInfo
public int getDefaultEventIndex()
getDefaultEventIndex
in interface java.beans.BeanInfo
public int getDefaultPropertyIndex()
getDefaultPropertyIndex
in interface java.beans.BeanInfo
public java.beans.EventSetDescriptor[] getEventSetDescriptors()
getEventSetDescriptors
in interface java.beans.BeanInfo
public java.awt.Image getIcon(int arg0)
getIcon
in interface java.beans.BeanInfo
public java.beans.MethodDescriptor[] getMethodDescriptors()
getMethodDescriptors
in interface java.beans.BeanInfo
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
PropertyDescriptor
s from the wrapped BeanInfo
object as well as PropertyDescriptor
s for each non-void returning setter
method found during construction.getPropertyDescriptors
in interface java.beans.BeanInfo
ExtendedBeanInfo(BeanInfo)