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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 15
    • Affects Version/s: 15
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: