Class ClassAttribute

  • All Implemented Interfaces:
    Serializable

    @Immutable
    public class ClassAttribute
    extends Object
    implements Serializable
    This class wraps fields, getters and setters information of the same attribute

    The purpose of this class is to carry information about single attribute of POJO class.

    Since:
    5.1.0
    Author:
    daivanov
    See Also:
    Serialized Form
    • Field Detail

      • name

        private final String name
        The attribute's name
      • attribute

        private Field attribute
        The field belonging to this class
      • getters

        private final Set<Method> getters
        The Set of getters for this attribute in the class
      • setters

        private final Set<Method> setters
        The Set of setters for this attribute in the class
    • Constructor Detail

      • ClassAttribute

        public ClassAttribute​(String name,
                              Field attribute,
                              Set<Method> getters,
                              Set<Method> setters)
        Full constructor
        Parameters:
        name - attribute's name, must be filled
        attribute - attribute, can be null
        getters - The set of getters for this attributes
        setters - The set of setters for this attributes
    • Method Detail

      • getName

        public String getName()
        It returns the attribute's name
        Returns:
        the atrribute's name
      • getAttribute

        public Field getAttribute()
        It returns the attribute
        Returns:
        the classFields
      • setAttribute

        void setAttribute​(Field attribute)
        It sets the attribute
        Parameters:
        attribute - The attribute to set
      • getGetters

        public Set<Method> getGetters()
        It returns the attribute getters
        Returns:
        the getters
      • getSetters

        public Set<Method> getSetters()
        It returns the attribute setters
        Returns:
        the setters
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object