org.springframework.beans
Class GenericTypeAwarePropertyDescriptor

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by java.beans.PropertyDescriptor
          extended by org.springframework.beans.GenericTypeAwarePropertyDescriptor

 class GenericTypeAwarePropertyDescriptor
extends java.beans.PropertyDescriptor

Extension of the standard JavaBeans PropertyDescriptor class, overriding getPropertyType() such that a generically declared type will be resolved against the containing bean class.

Since:
2.5.2
Author:
Juergen Hoeller

Field Summary
private  java.util.Set<java.lang.reflect.Method> ambiguousWriteMethods
           
private  java.lang.Class beanClass
           
private  java.lang.Class propertyEditorClass
           
private  java.lang.Class propertyType
           
private  java.lang.reflect.Method readMethod
           
private  java.lang.reflect.Method writeMethod
           
private  MethodParameter writeMethodParameter
           
 
Constructor Summary
GenericTypeAwarePropertyDescriptor(java.lang.Class beanClass, java.lang.String propertyName, java.lang.reflect.Method readMethod, java.lang.reflect.Method writeMethod, java.lang.Class propertyEditorClass)
           
 
Method Summary
 java.lang.Class<?> getBeanClass()
           
 java.lang.Class getPropertyEditorClass()
           
 java.lang.Class getPropertyType()
           
 java.lang.reflect.Method getReadMethod()
           
 java.lang.reflect.Method getWriteMethod()
           
 java.lang.reflect.Method getWriteMethodForActualAccess()
           
 MethodParameter getWriteMethodParameter()
           
 
Methods inherited from class java.beans.PropertyDescriptor
createPropertyEditor, equals, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beanClass

private final java.lang.Class beanClass

readMethod

private final java.lang.reflect.Method readMethod

writeMethod

private final java.lang.reflect.Method writeMethod

propertyEditorClass

private final java.lang.Class propertyEditorClass

ambiguousWriteMethods

private volatile java.util.Set<java.lang.reflect.Method> ambiguousWriteMethods

propertyType

private java.lang.Class propertyType

writeMethodParameter

private MethodParameter writeMethodParameter
Constructor Detail

GenericTypeAwarePropertyDescriptor

public GenericTypeAwarePropertyDescriptor(java.lang.Class beanClass,
                                          java.lang.String propertyName,
                                          java.lang.reflect.Method readMethod,
                                          java.lang.reflect.Method writeMethod,
                                          java.lang.Class propertyEditorClass)
                                   throws java.beans.IntrospectionException
Throws:
java.beans.IntrospectionException
Method Detail

getBeanClass

public java.lang.Class<?> getBeanClass()

getReadMethod

public java.lang.reflect.Method getReadMethod()
Overrides:
getReadMethod in class java.beans.PropertyDescriptor

getWriteMethod

public java.lang.reflect.Method getWriteMethod()
Overrides:
getWriteMethod in class java.beans.PropertyDescriptor

getWriteMethodForActualAccess

public java.lang.reflect.Method getWriteMethodForActualAccess()

getPropertyEditorClass

public java.lang.Class getPropertyEditorClass()
Overrides:
getPropertyEditorClass in class java.beans.PropertyDescriptor

getPropertyType

public java.lang.Class getPropertyType()
Overrides:
getPropertyType in class java.beans.PropertyDescriptor

getWriteMethodParameter

public MethodParameter getWriteMethodParameter()