Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 293
نمايش فراداده

Retentionjava.lang.annotation

Java 5.0@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) annotation

A meta-annotation of this type specifies how long the annotated annotation type should be retained. The value( ) of this annotation type is one of the three RetentionPolicy enumerated constants. See RetentionPolicy for details. If an annotation type does not have an @Retention meta-annotation, its default retention is RetentionPolicy.CLASS.

Figure 10-80. java.lang.annotation.Retention

public @interface

Retention { // Public Instance Methods RetentionPolicy

value ( ); }