Class IBeanFieldMetaInfo


  • public class IBeanFieldMetaInfo
    extends Object
    Meta description of a field belonging to an IBean, more precisely does it provide name, type, getter method and setter method of the field.

    This class is created via constructor and is then immutable.

    • Constructor Detail

      • IBeanFieldMetaInfo

        public IBeanFieldMetaInfo​(String fieldName,
                                  Class<?> fieldType,
                                  Method getterMethod,
                                  Method setterMethod,
                                  int ordinal)
        Creates a new IBeanFieldMetaInfo by providing all required meta information.
        Parameters:
        fieldName - the case-sensitive name of the field
        fieldType - the type of the field
        getterMethod - the related getter method in the bean type
        setterMethod - the related setter method in the bean type
        ordinal - the sorting index of the field within its IBeanTypeMetaInfo
    • Method Detail

      • fieldName

        public String fieldName()
        Provides the name of the field belonging to the IBean type.
        Returns:
        some label that complies to the rules for field names defined in the bean style; usually some camel case string
      • getterMethod

        public Method getterMethod()
        Provides the getter method in the bean type related to the field.
        Returns:
        a Method contained in the bean interface
      • setterMethod

        public Method setterMethod()
        Provides the setter method in the bean type related to the field.
        Returns:
        a Method contained in the bean interface
      • fieldType

        public Class<?> fieldType()
        Provides the type of the field.
        Returns:
        any allowed primitive or object type that complies to the bean style. Usually only void is forbidden.
      • ordinal

        public int ordinal()
        Provides the sorting index of the field within its IBeanTypeMetaInfo.
        Returns:
        some zero based positive integer
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Compares this instance with any other object, preferably with another IBeanFieldMetaInfo. Two IBeanFieldMetaInfo are considered equal if field name, field type and ordinal are equal.
        Overrides:
        equals in class Object
        See Also:
        Object.equals(java.lang.Object)