Interface TypeField

  • All Superinterfaces:
    Named

    public interface TypeField
    extends Named
    A representation of a Type field. Implementations are expected to implement equals() and hashCode() methods.
    • Method Detail

      • getDeclaringType

        Type<?> getDeclaringType()
        Returns the type on which this TypeField is declared.
        Returns:
        the declaring type of the TypeField
      • getValueType

        Class<?> getValueType()
        Returns the value type of the TypeField.
        Returns:
        the class representing the value type of the TypeField
      • readValue

        <T> T readValue​(Object subject)
        Reads the value of a field from the given subject object.
        Type Parameters:
        T - the type of the field value
        Parameters:
        subject - the Java object from which to read the field value
        Returns:
        the field value