Android APIs
public final enum

RetentionPolicy

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ java.lang.annotation.RetentionPolicy

Class Overview

Defines an enumeration for annotation retention policies. Used in conjunction with the Retention annotation to specify an annotation's time-to-live in the overall development life cycle.

Summary

Enum Values
RetentionPolicy  CLASS  Annotation is available in the source code and in the class file, but not at runtime. 
RetentionPolicy  RUNTIME  Annotation is available in the source code, the class file and is available at runtime. 
RetentionPolicy  SOURCE  Annotation is only available in the source code. 
Public Methods
static RetentionPolicy valueOf(String name)
final static RetentionPolicy[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final RetentionPolicy CLASS

Added in API level 1

Annotation is available in the source code and in the class file, but not at runtime. This is the default policy.

public static final RetentionPolicy RUNTIME

Added in API level 1

Annotation is available in the source code, the class file and is available at runtime.

public static final RetentionPolicy SOURCE

Added in API level 1

Annotation is only available in the source code.

Public Methods

public static RetentionPolicy valueOf (String name)

Added in API level 1

public static final RetentionPolicy[] values ()

Added in API level 1