public interface IAnnotationHandle
AnnotationNodes at runtime and mirror annotations in the AP
at compile time.| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Get whether the annotation inside the handle actually exists, if the
contained element is null, returns false.
|
IAnnotationHandle |
getAnnotation(java.lang.String key)
Get an annotation value as an annotation handle
|
java.util.List<IAnnotationHandle> |
getAnnotationList(java.lang.String key)
Retrieve an annotation key as a list of annotation handles
|
java.lang.String |
getDesc()
Get the annotation descriptor
|
<T> java.util.List<T> |
getList(java.lang.String key)
Retrieve the annotation value with the specified key as a list with
values of the specified type.
|
java.util.List<org.objectweb.asm.Type> |
getTypeList(java.lang.String key)
Retrieve an annotation key as a list of Types.
|
org.objectweb.asm.Type |
getTypeValue(java.lang.String key)
Get an annotation value as an ASM
Type. |
<T> T |
getValue()
Get the annotation value or return null if not present or not set
|
<T> T |
getValue(java.lang.String key)
Get the annotation value with the specified key or return null if not
present or not set
|
<T> T |
getValue(java.lang.String key,
T defaultValue)
Get a value with the specified key from this annotation, return the
specified default value if the key is not set or is not present
|
boolean exists()
java.lang.String getDesc()
java.util.List<IAnnotationHandle> getAnnotationList(java.lang.String key)
key - key to fetchorg.objectweb.asm.Type getTypeValue(java.lang.String key)
Type. This is special-cased
because the different APIs return class literals in different ways. Under
ASM we will receieve Type instances, but at compile time we will
get TypeMirrors instead. This overload is provided so that
subclasses have to marshal everything into Type for consistency.key - key to fetchjava.util.List<org.objectweb.asm.Type> getTypeList(java.lang.String key)
Type instances, but at compile time we will
get TypeMirrors instead. This overload is provided so that
subclasses have to marshal everything into Type for consistency.key - key to fetchIAnnotationHandle getAnnotation(java.lang.String key)
key - key to search for in the value map<T> T getValue(java.lang.String key,
T defaultValue)
T - duck typekey - keydefaultValue - value to return if the key is not set or not present<T> T getValue()
T - duck type<T> T getValue(java.lang.String key)
T - duck typekey - key to fetch<T> java.util.List<T> getList(java.lang.String key)
T - list element duck typekey - key to fetch