public
final
enum
ElementType
extends Enum<ElementType>
java.lang.Object | ||
↳ | java.lang.Enum<java.lang.annotation.ElementType> | |
↳ | java.lang.annotation.ElementType |
A program element type. The constants of this enumerated type provide a simple classification of the declared elements in a Java program.
These constants are used with the Target
meta-annotation type
to specify where it is legal to use an annotation type.
Enum values | |
---|---|
ElementType |
ANNOTATION_TYPE
Annotation type declaration |
ElementType |
CONSTRUCTOR
Constructor declaration |
ElementType |
FIELD
Field declaration (includes enum constants) |
ElementType |
LOCAL_VARIABLE
Local variable declaration |
ElementType |
METHOD
Method declaration |
ElementType |
PACKAGE
Package declaration |
ElementType |
PARAMETER
Formal parameter declaration |
ElementType |
TYPE
Class, interface (including annotation type), or enum declaration |
Public methods | |
---|---|
static
ElementType
|
valueOf(String name)
|
static
final
ElementType[]
|
values()
|
Inherited methods | |
---|---|
From
class
java.lang.Enum
| |
From
class
java.lang.Object
| |
From
interface
java.lang.Comparable
|
ElementType TYPE
Class, interface (including annotation type), or enum declaration
ElementType valueOf (String name)
Parameters | |
---|---|
name |
String
|
Returns | |
---|---|
ElementType |