java.lang.Object | ||
↳ | java.lang.Enum<java.lang.annotation.RetentionPolicy> | |
↳ | java.lang.annotation.RetentionPolicy |
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.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Enum
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
|
Annotation is available in the source code and in the class file, but not at runtime. This is the default policy.
Annotation is available in the source code, the class file and is available at runtime.
Annotation is only available in the source code.