Add Types method to add annotations

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 9, 10
    • Component/s: core-libs
    • None

      As a follow-up to stripping annotations from type mirrors returned by methods in Types (JDK-8042981), it would be helpful to provide methods to add annotations. Sketch of a proposal:

      <T extends TypeMirror> T withAnnotations(T typeMirror, List<? extends
      AnnotationMirror> annotations)

      <T extends TypeMirror> T withAnnotations(T typeMirror,
      AnnotatedConstruct annotationHost)

      http://mail.openjdk.java.net/pipermail/compiler-dev/2014-May/008782.html

            Assignee:
            Joe Darcy
            Reporter:
            Joe Darcy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: