@Immutable public class AttributeMetadata extends Object implements Serializable
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.
| Modifier and Type | Field and Description |
|---|---|
private Type[] |
attrGenericArgs
The attribute type generic arguments
|
private List<Annotation> |
attributeAnnotations
The attribute annotations
|
private Type |
attributeGenericType
The attribute generic type
|
private String |
attributeName
The attribute name
|
private Class<?> |
attributeType
The attribute type
|
private Class<?> |
pojoClass
Type of class that owns the attribute
|
private Object |
pojoInstance
POJO that owns the attribute
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
AttributeMetadata(Class<?> attributeType,
Type attributeGenericType,
Type[] attrGenericArgs,
Class<?> declaringClass,
Object declaringInstance)
Constructor for method parameters metadata
|
AttributeMetadata(String attributeName,
Class<?> attributeType,
Type attributeGenericType,
Type[] attrGenericArgs,
List<Annotation> attributeAnnotations,
Class<?> declaringClass,
Object declaringInstance)
Full constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Type[] |
getAttrGenericArgs() |
List<Annotation> |
getAttributeAnnotations() |
Type |
getAttributeGenericType() |
String |
getAttributeName() |
Class<?> |
getAttributeType() |
Class<?> |
getPojoClass() |
Object |
getPojoInstance() |
String |
toString() |
private static final long serialVersionUID
private final String attributeName
private final Class<?> attributeType
private final Type attributeGenericType
private final Type[] attrGenericArgs
private final List<Annotation> attributeAnnotations
private final Class<?> pojoClass
private final Object pojoInstance
public AttributeMetadata(String attributeName, Class<?> attributeType, Type attributeGenericType, Type[] attrGenericArgs, List<Annotation> attributeAnnotations, Class<?> declaringClass, Object declaringInstance)
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 otherwisepublic AttributeMetadata(Class<?> attributeType, Type attributeGenericType, Type[] attrGenericArgs, Class<?> declaringClass, Object declaringInstance)
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 otherwisepublic String getAttributeName()
public Class<?> getAttributeType()
public Type getAttributeGenericType()
public Type[] getAttrGenericArgs()
public List<Annotation> getAttributeAnnotations()
public Class<?> getPojoClass()
public Object getPojoInstance()
Copyright © 2016. All rights reserved.