-
Enhancement
-
Resolution: Fixed
-
P3
-
15
-
b18
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.
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.
- duplicates
-
JDK-8237451 Merge AnnotationTypeWriter[Impl] into ClassWriter[Impl]
-
- Closed
-
-
JDK-8181506 javadoc does not list nested classes in annotation types
-
- Closed
-
- relates to
-
JDK-8181506 javadoc does not list nested classes in annotation types
-
- Closed
-