Repository navigation
fix: support wildcard type arguments in the processor (#435) - #436
Merged
AndreasIgel merged 6 commits intoNov 22, 2026
Merged
AndreasIgel merged 6 commits into
AndreasIgel merged 6 commits into
Conversation
This was referenced Nov 22, 2026
AndreasIgel
reviewed
Nov 22, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
devin-ai-integration Bot
added a commit
to igel-devin-ai/simple-builders-devin-fork
that referenced
this pull request
Nov 24, 2026
…dcard handling, suppress CodeQL override warning - ProcessorDtoBuildersTest: add MIT license header (fixes license:check CI failure) - ImportCollector: revert early-return for TypeNameWildcard; addImport already unwraps bounds since java-helpers#436, so the block was a no-op - BuilderToStringStyle: justify and suppress java/confusing-method-signature; the exact @OverRide is required to unwrap TrackedValue fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #435.
JavaLangMapper.extractType()maps?,? extends Xand? super Xrecursively.TypeNameWildcardin codegen-core, rendered byRoasterMapper.ImportCollectorfollows the wildcard bounds instead of treating the wildcard as a class name.add2List,Supplier-based element creation) are not generated for a direct wildcard argument, becauseList<? extends Number>cannot accept elements. Setter, supplier and consumer/updater signatures keep the exact wildcard type. Nested cases such asList<Foo<?>>keep the collection helpers.Tests: exact generated declarations, plus compilation, for 8 wildcard variants. Also model, mapper, Roaster and import tests. With the old mapper restored, all 8 processor tests fail.
Verified:
mvn clean verifyandmvn -pl example clean compilepass. Generated examples are unchanged.Prerequisite for #429 (codegen DTO builders with collection setters).
Wildcard check:
TypeName.hasWildcardArguments()returnsfalseby default and is overridden byTypeNameGeneric. Each helper generator skips wildcard types with one line,if (field.getFieldType().hasWildcardArguments()) return false;, and keeps its own reason as a comment. No dispatcher-level filter is used, because the setter, supplier and updater generators must still apply to wildcard types.