public static enum Annotation.ElementType extends java.lang.Enum<Annotation.ElementType>
We use this instead of java.lang.annotation.ElementType so we can reference element types introduced in versions of Java later than the current compile/runtime version of Java.
Enum Constant and Description |
---|
ANNOTATION_TYPE |
CONSTRUCTOR |
FIELD |
LOCAL_VARIABLE |
METHOD |
MODULE |
PACKAGE |
PARAMETER |
TYPE |
TYPE_PARAMETER |
TYPE_USE |
Modifier and Type | Method and Description |
---|---|
static Annotation.ElementType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Annotation.ElementType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Annotation.ElementType TYPE
public static final Annotation.ElementType FIELD
public static final Annotation.ElementType METHOD
public static final Annotation.ElementType PARAMETER
public static final Annotation.ElementType CONSTRUCTOR
public static final Annotation.ElementType LOCAL_VARIABLE
public static final Annotation.ElementType ANNOTATION_TYPE
public static final Annotation.ElementType PACKAGE
public static final Annotation.ElementType TYPE_PARAMETER
public static final Annotation.ElementType TYPE_USE
public static final Annotation.ElementType MODULE
public static Annotation.ElementType[] values()
for (Annotation.ElementType c : Annotation.ElementType.values()) System.out.println(c);
public static Annotation.ElementType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null