Most visited

Recently visited

Added in API level 1

ElementType

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.

Summary

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

Enum values

ANNOTATION_TYPE

Added in API level 1
ElementType ANNOTATION_TYPE

Annotation type declaration

CONSTRUCTOR

Added in API level 1
ElementType CONSTRUCTOR

Constructor declaration

FIELD

Added in API level 1
ElementType FIELD

Field declaration (includes enum constants)

LOCAL_VARIABLE

Added in API level 1
ElementType LOCAL_VARIABLE

Local variable declaration

METHOD

Added in API level 1
ElementType METHOD

Method declaration

PACKAGE

Added in API level 1
ElementType PACKAGE

Package declaration

PARAMETER

Added in API level 1
ElementType PARAMETER

Formal parameter declaration

TYPE

Added in API level 1
ElementType TYPE

Class, interface (including annotation type), or enum declaration

Public methods

valueOf

Added in API level 1
ElementType valueOf (String name)

Parameters
name String
Returns
ElementType

values

Added in API level 1
ElementType[] values ()

Returns
ElementType[]

Hooray!