Android APIs
public final enum

ElementType

extends Enum<ElementType>
java.lang.Object
   ↳ java.lang.Enum<java.lang.annotation.ElementType>
     ↳ java.lang.annotation.ElementType

Class Overview

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()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final ElementType ANNOTATION_TYPE

Added in API level 1

Annotation type declaration.

public static final ElementType CONSTRUCTOR

Added in API level 1

Constructor declaration.

public static final ElementType FIELD

Added in API level 1

Field declaration.

public static final ElementType LOCAL_VARIABLE

Added in API level 1

Local variable declaration.

public static final ElementType METHOD

Added in API level 1

Method declaration.

public static final ElementType PACKAGE

Added in API level 1

Package declaration.

public static final ElementType PARAMETER

Added in API level 1

Parameter declaration.

public static final ElementType TYPE

Added in API level 1

Class, interface or enum declaration.

Public Methods

public static ElementType valueOf (String name)

Added in API level 1

Parameters
name
Returns
ElementType

public static final ElementType[] values ()

Added in API level 1

Returns
ElementType[]