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

type annotations are not visible to javac plugins across compilation boundaries

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P3
    • 22
    • tools
    • None
    • behavioral
    • low
    • Hide
      Annotation processors will be able to access new type annotations for elements loaded from the classpath. This can have observable side effects, for example if an annotation processor includes `TypeMirror#toString` output in diagnostics or generated code that output may now include additional annotations.
      Show
      Annotation processors will be able to access new type annotations for elements loaded from the classpath. This can have observable side effects, for example if an annotation processor includes `TypeMirror#toString` output in diagnostics or generated code that output may now include additional annotations.
    • Java API
    • Implementation

    Description

      Summary

      Update javac's implementation of TypeMirror to allow accessing type use annotations on types loaded from class files.

      Problem

      The implementation currently does not associate type use annotations loaded from class files with the corresponding types. This means that TypeMirror APIs including getAnnotationMirrors and toString do not accurately report type use annotations for types loaded from class files.

      Solution

      If a type annotation is present on a type read from a class file, the implementation should associate the annotation with its type.

      Specification

      No specification change; behavioral change only.

      Attachments

        Issue Links

          Activity

            People

              cushon Liam Miller-Cushon
              cushon Liam Miller-Cushon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: