public interface AttributeMetadata
| Modifier and Type | Method and Description |
|---|---|
<A extends java.lang.annotation.Annotation> |
annotation(java.lang.Class<A> annoType)
Get the given annotation.
|
java.util.Collection<?> |
asCollection(java.lang.Object target)
Get the path of this attribute as a
Collection. |
java.util.Map |
asMap(java.lang.Object target)
Get the path of this attribute as a
Map. |
java.util.Set<?> |
asSet(java.lang.Object target)
Get the path of this attribute as a
Set. |
java.lang.Class<?> |
elementType()
The element type of this attribute, if this attribute is a "plural"-like attribute (a Collection, Map, etc...).
|
java.lang.Object |
get(java.lang.Object target)
Get the path of this attribute.
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annoType)
Does this attribute have the given annotation on it?
|
boolean |
isCollectionLike()
Can this attribute look like a
Collection? |
boolean |
isMapLike()
Can this attribute look like a
Map? |
boolean |
isNullable()
Whether this attribute can be nulled or not.
|
boolean |
isSetLike()
Can this attribute look like a
Set? |
java.lang.Class<?> |
keyType()
The type of this map's key, if it's map-like.
|
java.lang.String |
name()
Name of the attribute.
|
AttributeMetadata |
set(java.lang.Object value,
java.lang.Object target)
Set the path of this attribute.
|
java.lang.Class<?> |
type()
The type of this attribute.
|
java.lang.String name()
java.lang.Class<?> type()
java.lang.Class<?> keyType()
java.lang.Class<?> elementType()
boolean isNullable()
boolean isCollectionLike()
Collection?java.util.Collection<?> asCollection(java.lang.Object target)
Collection.target - The entity to inspect for this attribute.Collectionboolean isSetLike()
Set?java.util.Set<?> asSet(java.lang.Object target)
Set.target - The entity to inspect for this attribute.Setboolean isMapLike()
Map?java.util.Map asMap(java.lang.Object target)
Map.target - The entity to inspect for this attribute.Mapboolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annoType)
annoType - The type of annotation to search for.<A extends java.lang.annotation.Annotation> A annotation(java.lang.Class<A> annoType)
A - annoType - The type of annotation to get.java.lang.Object get(java.lang.Object target)
target - The entity to inspect for this attribute.AttributeMetadata set(java.lang.Object value, java.lang.Object target)
value - Value to set on this attribute.target - The entity to set this attribute's value on.