public class AnnotationAttributes extends LinkedHashMap<String,Object>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
AnnotationAttributes()
Create a new, empty
AnnotationAttributes instance. |
AnnotationAttributes(int initialCapacity)
Create a new, empty
AnnotationAttributes instance with the given initial
capacity to optimize performance. |
AnnotationAttributes(Map<String,Object> map)
Create a new
AnnotationAttributes instance, wrapping the provided map
and all its key/value pairs. |
Modifier and Type | Method and Description |
---|---|
static AnnotationAttributes |
fromMap(Map<String,Object> map)
Return an
AnnotationAttributes instance based on the given map; if the map
is already an AnnotationAttributes instance, it is casted and returned
immediately without creating any new instance; otherwise create a new instance by
wrapping the map with the AnnotationAttributes(Map) constructor. |
AnnotationAttributes |
getAnnotation(String attributeName) |
AnnotationAttributes[] |
getAnnotationArray(String attributeName) |
boolean |
getBoolean(String attributeName) |
<T> Class<? extends T> |
getClass(String attributeName) |
Class<?>[] |
getClassArray(String attributeName) |
<E extends Enum<?>> |
getEnum(String attributeName) |
<N extends Number> |
getNumber(String attributeName) |
String |
getString(String attributeName) |
String[] |
getStringArray(String attributeName) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public AnnotationAttributes()
AnnotationAttributes
instance.public AnnotationAttributes(int initialCapacity)
AnnotationAttributes
instance with the given initial
capacity to optimize performance.initialCapacity
- initial size of the underlying mappublic AnnotationAttributes(Map<String,Object> map)
AnnotationAttributes
instance, wrapping the provided map
and all its key/value pairs.map
- original source of annotation attribute key/value pairs to wrapfromMap(Map)
public static AnnotationAttributes fromMap(Map<String,Object> map)
AnnotationAttributes
instance based on the given map; if the map
is already an AnnotationAttributes
instance, it is casted and returned
immediately without creating any new instance; otherwise create a new instance by
wrapping the map with the AnnotationAttributes(Map)
constructor.map
- original source of annotation attribute key/value pairspublic boolean getBoolean(String attributeName)
public AnnotationAttributes getAnnotation(String attributeName)
public AnnotationAttributes[] getAnnotationArray(String attributeName)
Copyright © 2006–2018 TinyGroup. All rights reserved.