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

Add Types method to add annotations

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9, 10
    • 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

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

              Created:
              Updated: