org.springframework.core.convert.support
Class PropertyTypeDescriptor

java.lang.Object
  extended by org.springframework.core.convert.TypeDescriptor
      extended by org.springframework.core.convert.support.PropertyTypeDescriptor

public class PropertyTypeDescriptor
extends TypeDescriptor

TypeDescriptor extension that exposes additional annotations as conversion metadata: namely, annotations on other accessor methods (getter/setter) and on the underlying field, if found.

Since:
3.0.2
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.core.convert.TypeDescriptor
NULL
 
Constructor Summary
PropertyTypeDescriptor(PropertyDescriptor propertyDescriptor, MethodParameter methodParameter)
          Create a new BeanTypeDescriptor for the given bean property.
PropertyTypeDescriptor(PropertyDescriptor propertyDescriptor, MethodParameter methodParameter, Class<?> type)
          Create a new BeanTypeDescriptor for the given bean property.
 
Method Summary
 Annotation[] getAnnotations()
          Obtain the annotations associated with the wrapped parameter/field, if any.
 PropertyDescriptor getPropertyDescriptor()
          Return the underlying PropertyDescriptor.
 
Methods inherited from class org.springframework.core.convert.TypeDescriptor
asString, equals, forElementType, forObject, getAnnotation, getElementType, getElementTypeDescriptor, getElementTypeDescriptor, getField, getMapKeyType, getMapKeyTypeDescriptor, getMapKeyTypeDescriptor, getMapValueType, getMapValueTypeDescriptor, getMapValueTypeDescriptor, getMethodParameter, getName, getObjectType, getType, hashCode, isArray, isAssignableTo, isCollection, isMap, isMapEntryTypeKnown, isPrimitive, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyTypeDescriptor

public PropertyTypeDescriptor(PropertyDescriptor propertyDescriptor,
                              MethodParameter methodParameter)
Create a new BeanTypeDescriptor for the given bean property.

Parameters:
propertyDescriptor - the corresponding JavaBean PropertyDescriptor
methodParameter - the target method parameter

PropertyTypeDescriptor

public PropertyTypeDescriptor(PropertyDescriptor propertyDescriptor,
                              MethodParameter methodParameter,
                              Class<?> type)
Create a new BeanTypeDescriptor for the given bean property.

Parameters:
propertyDescriptor - the corresponding JavaBean PropertyDescriptor
methodParameter - the target method parameter
type - the specific type to expose (may be an array/collection element)
Method Detail

getPropertyDescriptor

public PropertyDescriptor getPropertyDescriptor()
Return the underlying PropertyDescriptor.


getAnnotations

public Annotation[] getAnnotations()
Description copied from class: TypeDescriptor
Obtain the annotations associated with the wrapped parameter/field, if any.

Overrides:
getAnnotations in class TypeDescriptor