Class ClassInfo

  • All Implemented Interfaces:
    Serializable

    @Immutable
    public class ClassInfo
    extends Object
    implements Serializable
    This class wraps fields and setters information about a given class

    The purpose of this class is to work as a sort of cache which stores the list of declared fields and setter methods of a given class. These information will then be analysed to compose the list of setters which can be invoked to create the state of a given POJO.

    Since:
    1.0.0
    Author:
    mtedone
    See Also:
    Serialized Form
    • Field Detail

      • className

        private final Class<?> className
        The Class name whose info are stored in this class
      • classAttributes

        private final Set<ClassAttribute> classAttributes
        The Set of fields belonging to this class
      • extraMethods

        private final List<Method> extraMethods
    • Constructor Detail

      • ClassInfo

        public ClassInfo​(Class<?> className,
                         Collection<ClassAttribute> classAttributes)
        Partial constructor.
        Parameters:
        className - The class name
        classAttributes - The collection of attributes belonging to this class
      • ClassInfo

        public ClassInfo​(Class<?> className,
                         Collection<ClassAttribute> classAttributes,
                         Collection<Method> extraMethods)
        Full constructor.
        Parameters:
        className - The class name
        classAttributes - The collection of attributes belonging to this class
        extraMethods - The collection of extra methods to execute
    • Method Detail

      • getClassAttributes

        public Set<ClassAttribute> getClassAttributes()
        Returns:
        the classSetters
      • getClassName

        public Class<?> getClassName()
        It returns the class name.
        Returns:
        the className
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object