org.modelmapper.spi
Interface PropertyInfo


public interface PropertyInfo

Encapsulates information for a property.

Author:
Jonathan Halterman

Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotationClass)
          Returns the annotation on the property's member for the annotationClass or null if none exists.
 Type getGenericType()
          Returns the generic type represented by the property.
 Class<?> getInitialType()
          Returns the initial type in the member declaring class' type hierarchy from which this property info was initiated.
 Member getMember()
          Returns the encapsulated member.
 String getName()
          Returns the property name.
 PropertyType getPropertyType()
          Returns the member type.
 Class<?> getType()
          Returns the type represented by the property.
 

Method Detail

getAnnotation

<T extends Annotation> T getAnnotation(Class<T> annotationClass)
Returns the annotation on the property's member for the annotationClass or null if none exists.

Type Parameters:
T - annotation type
Parameters:
annotationClass - to get annotation for

getGenericType

Type getGenericType()
Returns the generic type represented by the property. For fields this will be the field's generic type. For accessor methods this will be the generic return type. For mutator methods this will be the single parameter's generic type.


getInitialType

Class<?> getInitialType()
Returns the initial type in the member declaring class' type hierarchy from which this property info was initiated. This is useful in resolving generic type information for the property where the type parameter may have been declared on the initial type.


getMember

Member getMember()
Returns the encapsulated member.


getName

String getName()
Returns the property name.


getPropertyType

PropertyType getPropertyType()
Returns the member type.


getType

Class<?> getType()
Returns the type represented by the property. For fields this will be the field type. For accessor methods this will be the return type. For mutator methods this will be the single parameter type.



Copyright © 2011. All Rights Reserved.