Inherited


Inherited java.lang.annotation

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

When an annotation type that has an @Inherited meta-annotation is applied to a class, that annotation should be inherited by subclasses and descendants of the annotated class. The inheritance is only for classes and their subclasses. If an @Inherited annotation type is applied to a method or program element other than a class, no inheritance applies. If the @Inherited annotation type also has runtime Retention , reflective access to the annotation through java.lang.reflect.AnnotatedElement manages the inheritance of the annotation.

Figure 10-79. java.lang.annotation.Inherited

 public @interface  Inherited  { } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net