Repository navigation
Support annotations as members of annotations - #499
igel-devin-ai wants to merge 8 commits into
Conversation
- AnnotationMember: new Kind.ANNOTATION carrying a nested AnnotationDto; constructor derives the simple-name source expression and referenced type from it; equals/hashCode extended - AnnotationDto.addMemberAnnotation + builder helper with consumer style for the nested annotation - rendering: nested annotations render recursively in RoasterMapper, inheriting collision qualification of the annotation type and typed members - ImportCollector recurses into nested annotations for import collection - tests: plain nested member, typed members inside nested annotation, collision qualification of the nested annotation type
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Strict reviewchanges needed Reviewed head
Verification and scope
Other-PR integration reviewRead bodies/file lists for #430, #480, #482, #483, #484, #492, #497, #498, and #500. Read-only pairwise merge-tree checks find one textual conflict: #480, Recheck at
|
| # | Original finding (short) | Status | Remaining action |
|---|---|---|---|
| 1 | ANNOTATION without payload | fixed | — |
| 2 | Recursive annotation regression coverage | partially fixed — minor | Compile nested annotation output; test no-op copy (RoasterCodeGeneratorTest.java:872–906). |
| 3 | Expected-expression text blocks | fixed | — |
Build: Java 17 module install — BUILD SUCCESS; 479 tests, 0 failures/errors; recursive-annotation probe passes without warnings.
Recheck at 2a8e3fa2 (2026-12-06)
Verdict: ready
| Severity | What is missing | Where (file:line) |
|---|---|---|
| — | None. | — |
…cursion/equality regression tests, text blocks
… review) - Regression: generated nested annotation usage compiles against real annotation definitions (OuterMeta/InnerMeta/DeepMeta stubs), verified with the JDK compiler - No-op copy test: copying an AnnotationDto with nested members through the builder reproduces an equal instance, guarding the copy path the With-pattern relies on
|
Recheck items addressed (finding 2 completed):
|
|



Fixes #494 — annotations as members of annotations:
@OuterMeta(inner = @InnerMeta(text = "x")).AnnotationMember: newKind.ANNOTATIONcarrying a nestedAnnotationDto. The deriving constructor sets the simple-name source expression and uses the annotation type as referenced type — so import collection and collision qualification come for free.equals/hashCodeextendedAnnotationDto.addMemberAnnotation(name, dto)and builderaddMemberAnnotation(key, a -> a.annotationType(...)...)in consumer style, matching the other helpersRoasterMapper— the nested annotation renders through the samemapAnnotationpath, so typed members inside it (class literals, enum constants) get collision-qualified tooImportCollectorrecurses into nested annotationsDesign note: annotation arrays (
inner = {@A, @B}) are expressible today by combining RAW array braces with nested members per element in the common case; a dedicated array kind can follow if real usage demands it.