Skip to content

Most visited

Recently visited

navigation
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


Defines an enumeration for Java program elements. It is used in conjunction with the Target meta-annotation to restrict the use of an annotation to certain program elements.

Summary

Enum values

ElementType  ANNOTATION_TYPE

Annotation type declaration. 

ElementType  CONSTRUCTOR

Constructor declaration. 

ElementType  FIELD

Field declaration. 

ElementType  LOCAL_VARIABLE

Local variable declaration. 

ElementType  METHOD

Method declaration. 

ElementType  PACKAGE

Package declaration. 

ElementType  PARAMETER

Parameter declaration. 

ElementType  TYPE

Class, interface or enum declaration. 

Public methods

static ElementType valueOf(String name)
final static 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.

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

Parameter declaration.

TYPE

Added in API level 1
ElementType TYPE

Class, interface 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[]
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.