Package org.modelmapper.spi
Interface PropertyInfo
-
public interface PropertyInfo
Encapsulates information for a property.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Annotation>
TgetAnnotation(Class<T> annotationClass)
Returns the annotation on the property's member for theannotationClass
ornull
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 ornull
if none exists.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 theannotationClass
ornull
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.- For properties of type
PropertyType.FIELD
this will be the field'sgeneric type
. - For accessors of type
PropertyType.METHOD
this will be the method'sreturn type
. - For mutators of type
PropertyType.METHOD
this will be the single parameter'sgeneric type
. - For properties of type
PropertyType.GENERIC
this will be the same asgetType()
.
- For properties of 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 ornull
if none exists.
-
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.
-
-