Prev Next

Java / Annotations

List few meta-annotations defined in Java SDK.

@Retention meta-annotation indicates how long the annotation to be retained or visible.

@Documented indicates that the annotated element be documented using the Javadoc tool since annotations are not included by Javadoc tool by default.

@Inherited specifies that an annotation types is automatically inherited. If an inherited meta-annotation exists on an annotation type declaration, when the user queries the annotation type on a class declaration that has no annotation for this type, then class's super class be automatically queried for this annotation type.

@Repeatable indicates that the marked annotation can be applied more than once on the same declaration.

More Related questions...

Show more question and Answers...

XML

Comments & Discussions