1. /*
  2. * @(#)Inherited.java 1.4 04/02/03
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang.annotation;
  8. /**
  9. * Indicates that an annotation type is automatically inherited. If
  10. * an Inherited meta-annotation is present on an annotation type
  11. * declaration, and the user queries the annotation type on a class
  12. * declaration, and the class declaration has no annotation for this type,
  13. * then the class's superclass will automatically be queried for the
  14. * annotation type. This process will be repeated until an annotation for this
  15. * type is found, or the top of the class hierarchy (Object)
  16. * is reached. If no superclass has an annotation for this type, then
  17. * the query will indicate that the class in question has no such annotation.
  18. *
  19. * <p>Note that this meta-annotation type has no effect if the annotated
  20. * type is used to annotate anything other than a class. Note also
  21. * that this meta-annotation only causes annotations to be inherited
  22. * from superclasses; annotations on implemented interfaces have no
  23. * effect.
  24. *
  25. * @author Joshua Bloch
  26. * @since 1.5
  27. */
  28. @Documented
  29. @Retention(RetentionPolicy.RUNTIME)
  30. @Target(ElementType.ANNOTATION_TYPE)
  31. public @interface Inherited {
  32. }