You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find builders anchored inside the referenced type #317
The resolver only looks up a candidate builder class next to the referenced type (<Simple><builderUsageSuffix> in the same package). A builder that lives inside the referenced type itself — e.g. the common Lombok/Immutables pattern public static PersonBuilder builder() on Person — is never discovered, even though generated code could call it the same way MapStruct does.
Goal
Extend the builder search with a second candidate location, MapStruct DefaultBuilderProvider-style:
Look for an accessible static parameterless method on the referenced type (conventionally builder(), possibly a configurable name) returning a type that satisfies the builder contract.
Verify that returned type against the same capability checks as the same-package candidate (empty/prefilled instantiation, build()).
Decide precedence when both candidates exist (e.g. in-type builder() vs same-package XBuilder) — and whether an ambiguous in-type candidate (several matching methods) warns and skips like MapStruct.
Notes
Keeps the contract checks from the sibling sub-tasks unchanged — only the lookup gains a second location.
Worth deciding whether java.*/javax.* types are excluded from this lookup (MapStruct excludes them).
Activity
Resolve builders anchored inside the referenced type (#317) (#318)