Class AttributeMetadata

  • All Implemented Interfaces:
    Serializable

    @Immutable
    public class AttributeMetadata
    extends Object
    implements Serializable
    Contains metadata about the attribute for which a value is being assigned.

    This class is available to all strategies and it allows users to customise behaviour of a strategy depending on the metadata of the attribute to which a value is being assigned. For instance, clients might assign different values based on the attribute name.

    Author:
    mtedone
    See Also:
    Serialized Form
    • Field Detail

      • attributeName

        private final String attributeName
        The attribute name
      • attributeType

        private final Class<?> attributeType
        The attribute type
      • attributeGenericType

        private final Type attributeGenericType
        The attribute generic type
      • attrGenericArgs

        private final Type[] attrGenericArgs
        The attribute type generic arguments
      • attributeAnnotations

        private final List<Annotation> attributeAnnotations
        The attribute annotations
      • pojoClass

        private final Class<?> pojoClass
        Type of class that owns the attribute
      • pojoInstance

        private final Object pojoInstance
        POJO that owns the attribute
    • Constructor Detail

      • AttributeMetadata

        public AttributeMetadata​(String attributeName,
                                 Class<?> attributeType,
                                 Type attributeGenericType,
                                 Type[] attrGenericArgs,
                                 List<Annotation> attributeAnnotations,
                                 Class<?> declaringClass,
                                 Object declaringInstance)
        Full constructor.
        Parameters:
        attributeName - The attribute name
        attributeType - The attribute type
        attributeGenericType - The attribute generic type
        attrGenericArgs - The attribute type generic arguments
        attributeAnnotations - The attribute annotations
        declaringClass - The type of class that owns the attribute
        declaringInstance - If available, instance of the declaring class or null otherwise
      • AttributeMetadata

        public AttributeMetadata​(Class<?> attributeType,
                                 Type attributeGenericType,
                                 Type[] attrGenericArgs,
                                 Class<?> declaringClass,
                                 Object declaringInstance)
        Constructor for method parameters metadata
        Parameters:
        attributeType - The attribute type
        attributeGenericType - The attribute generic type
        attrGenericArgs - The attribute type generic arguments
        declaringClass - The type of class that owns the attribute
        declaringInstance - If available, instance of the declaring class or null otherwise
    • Method Detail

      • getAttributeName

        public String getAttributeName()
      • getAttributeType

        public Class<?> getAttributeType()
      • getAttributeGenericType

        public Type getAttributeGenericType()
      • getAttrGenericArgs

        public Type[] getAttrGenericArgs()
      • getAttributeAnnotations

        public List<Annotation> getAttributeAnnotations()
      • getPojoClass

        public Class<?> getPojoClass()
      • getPojoInstance

        public Object getPojoInstance()