Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8129356

Typo in "Retrieving Annotations"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • docs
    • None

      In http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html

      Retrieving Annotations

      There are several methods available in the Reflection API that can be used to retrieve annotations. The behavior of the methods that return a single annotation, such as AnnotatedElement.getAnnotationByType(Class<T>), are unchanged in that they only return a single annotation if one annotation of the requested type is present. If more than one annotation of the requested type is present, you can obtain them by first getting their container annotation. In this way, legacy code continues to work. Other methods were introduced in Java SE 8 that scan through the container annotation to return multiple annotations at once, such as AnnotatedElement.getAnnotations(Class<T>). See the AnnotatedElement class specification for information on all of the available methods.

      Switch AnnotatedElement.getAnnotationByType(Class<T>) and AnnotatedElement.getAnnotations(Class<T>)

            bhoran Bernard Horan (Inactive)
            rgallard Raymond Gallardo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: