public class Annotations
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Annotations.AnnotationValueGetter<T>
Knows how to get the value of a specified annotation element on a
target class.
|
Constructor and Description |
---|
Annotations() |
Modifier and Type | Method and Description |
---|---|
static Annotations.AnnotationValueGetter<java.lang.Object[]> |
arrayGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Byte> |
byteGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Character> |
charGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<JavaType> |
classGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Double> |
doubleGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<JavaField> |
enumGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Float> |
floatGetter(JavaType type,
java.lang.String elementName) |
static <S> Annotations.AnnotationValueGetter<S> |
getter(JavaType type,
java.lang.String elementName)
Returns a getter that knows how to retrieve the specified
annotation value from a target class.
|
static Annotations.AnnotationValueGetter<java.lang.Integer> |
integerGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Long> |
longGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.Short> |
shortGetter(JavaType type,
java.lang.String elementName) |
static Annotations.AnnotationValueGetter<java.lang.String> |
stringGetter(JavaType type,
java.lang.String elementName) |
public static <S> Annotations.AnnotationValueGetter<S> getter(JavaType type, java.lang.String elementName)
type
- Must be non-null AND be a valid annotation type.elementName
- Must be non-null, non-empty, and refer to an
annotation element in the given annotation type.java.lang.IllegalArgumentException
- if type or elementName do not match
the written requirements.public static Annotations.AnnotationValueGetter<java.lang.Byte> byteGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Character> charGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Short> shortGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Integer> integerGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Long> longGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Float> floatGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Double> doubleGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.String> stringGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<JavaType> classGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<java.lang.Object[]> arrayGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)
public static Annotations.AnnotationValueGetter<JavaField> enumGetter(JavaType type, java.lang.String elementName)
getter(oracle.javatools.parser.java.v2.model.JavaType, java.lang.String)