org.springframework.expression.spel.support
Class BeanTypeDescriptor

java.lang.Object
  extended by org.springframework.core.convert.TypeDescriptor
      extended by org.springframework.expression.spel.support.BeanTypeDescriptor

public class BeanTypeDescriptor
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. org.springframework.beans.BeanTypeDescriptor (beans module) is very similar to this but depending on that would introduce a beans dependency from the SpEL module.

Since:
3.0
Author:
Juergen Hoeller, Andy Clement

Field Summary
 
Fields inherited from class org.springframework.core.convert.TypeDescriptor
NULL
 
Constructor Summary
BeanTypeDescriptor(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, forObject, getAnnotation, getElementType, getElementTypeDescriptor, getField, getMapKeyType, getMapKeyTypeDescriptor, getMapValueType, getMapValueTypeDescriptor, getMethodParameter, getName, getObjectType, getType, isArray, isAssignableTo, isCollection, isMap, isMapEntryTypeKnown, isPrimitive, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanTypeDescriptor

public BeanTypeDescriptor(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