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

Merge support for AnnotationType builders/writers into support for other types

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 15
    • 15
    • tools

      ClassBuilder/ClassWriter/ClassWriterImpl already support enums, records, interfaces and classes. But annotation types are still handled separately, in AnnotationTypeBuilder/AnnotationTypeWriter/AnnotationTypeWriterImpl.
      This leads to duplicated code and duplicated effort to maintain the parts of the code that are similar. For example, fields in annotation types are handled as ANNOTATION_FIELD, even though they are logically the same as FIELD.

      ClassBuilder and friends have the ability to handle different flavors of members, such as enum constants, as distinct from fields. We can leverage that ability to handle required and optional elements of annotation types.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: