| |
|
| java.lang.annotation.RetentionPolicy
RetentionPolicy | public enum RetentionPolicy (Code) | | 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.
author: Joshua Bloch since: 1.5 |
Field Summary | |
Enum Constant | CLASS Annotations are to be recorded in the class file by the compiler
but need not be retained by the VM at run time. | Enum Constant | 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. | Enum Constant | SOURCE Annotations are to be discarded by the compiler. |
CLASS | Enum Constant CLASS(Code) | | 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 | Enum Constant RUNTIME(Code) | | 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: java.lang.reflect.AnnotatedElement |
SOURCE | Enum Constant SOURCE(Code) | | Annotations are to be discarded by the compiler.
|
|
|
|