Interface PropertyInfo


public interface PropertyInfo
Encapsulates information for a property.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Annotation>
    T
    getAnnotation(Class<T> annotationClass)
    Returns the annotation on the property's member for the annotationClass or null if none exists.
    Returns the generic type represented by the property.
    Returns the initial type in the member declaring class' type hierarchy from which this property info was initiated.
    Returns the encapsulated member or null if none exists.
    Returns the property name.
    Returns the member type.
    Returns the type represented by the property.
  • Method Details

    • 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 or null 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.