Enum RetentionPolicy
java.lang.annotation
java.lang.Object
  java.lang.Enum<RetentionPolicy>
      java.lang.annotation.RetentionPolicy
All Implemented Interfaces:

public enum RetentionPolicy
extends Enum<RetentionPolicy>
Annotation retention policy. The constants of this enumerated type describe the various policies for retaining annotations. They are used in conjunction with the Retention meta-annotation type to specify how long annotations are to be retained.
Since:
1.5
Author:
Joshua Bloch

Enum Constant Summary
CLASS
Annotations are to be recorded in the class file by the compiler but need not be retained by the VM at run time.
RUNTIME
Annotations are to be recorded in the class file by the compiler and retained by the VM at run time, so they may be read reflectively.
SOURCE
Annotations are to be discarded by the compiler.
Method Summary
valueOf(String name)
values()
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Enum Constant Detail
SOURCE
public static final RetentionPolicy SOURCE
Annotations are to be discarded by the compiler.

CLASS
public static final RetentionPolicy CLASS
Annotations are to be recorded in the class file by the compiler but need not be retained by the VM at run time. This is the default behavior.

RUNTIME
public static final RetentionPolicy RUNTIME
Annotations are to be recorded in the class file by the compiler and retained by the VM at run time, so they may be read reflectively.
See Also:
Method Detail
values
public static RetentionPolicy[] values()

valueOf
public static RetentionPolicy valueOf(String name)
Java API documentation generated with DocFlex/Doclet v1.5.6
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com