Package uk.co.jemos.podam.api
Class AttributeMetadata
- java.lang.Object
-
- uk.co.jemos.podam.api.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 Summary
Fields Modifier and Type Field Description private Type[]attrGenericArgsThe attribute type generic argumentsprivate List<Annotation>attributeAnnotationsThe attribute annotationsprivate TypeattributeGenericTypeThe attribute generic typeprivate StringattributeNameThe attribute nameprivate Class<?>attributeTypeThe attribute typeprivate Class<?>pojoClassType of class that owns the attributeprivate ObjectpojoInstancePOJO that owns the attributeprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description AttributeMetadata(Class<?> attributeType, Type attributeGenericType, Type[] attrGenericArgs, Class<?> declaringClass, Object declaringInstance)Constructor for method parameters metadataAttributeMetadata(String attributeName, Class<?> attributeType, Type attributeGenericType, Type[] attrGenericArgs, List<Annotation> attributeAnnotations, Class<?> declaringClass, Object declaringInstance)Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type[]getAttrGenericArgs()List<Annotation>getAttributeAnnotations()TypegetAttributeGenericType()StringgetAttributeName()Class<?>getAttributeType()Class<?>getPojoClass()ObjectgetPojoInstance()StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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 nameattributeType- The attribute typeattributeGenericType- The attribute generic typeattrGenericArgs- The attribute type generic argumentsattributeAnnotations- The attribute annotationsdeclaringClass- The type of class that owns the attributedeclaringInstance- 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 typeattributeGenericType- The attribute generic typeattrGenericArgs- The attribute type generic argumentsdeclaringClass- The type of class that owns the attributedeclaringInstance- 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()
-
-