Repository navigation
codegen: move PrefillCall from generic TypeInstantiation to simple-builder - #389
Merged
AndreasIgel merged 1 commit intoNov 10, 2026
Conversation
…ilder (java-helpers#371) PrefillCall is produced and consumed only by the builder domain, so it leaves codegen-core and becomes a top-level record next to ResolvedBuilder. TypeInstantiation is no longer sealed: Java permits sealed subtypes only in the same package, and nothing switches over the family.
devin-ai-integration
Bot
deleted the
devin/1794265370-prefillcall-builder-side
branch
November 22, 2026 14:24
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.
Summary
Resolves #371 with the strict boundary (Option B): codegen-core keeps only what other code generators can use.
TypeInstantiation.PrefillCallis produced (BuilderScopeResolver) and consumed (FieldPrefillEnhancer,MethodGeneratorUtil) only by the builder domain, so it leavescodegen-core:FieldandfieldMethodFor); references change fromTypeInstantiation.PrefillCalltoPrefillCall.TypeInstantiationis no longersealed: Java permits sealed subtypes only in the same package, so the move forces it. Nothing switches over the family — all consumers callinstantiationCode(..)/methodReference(..)polymorphically, and the two existing type tests (instanceof StaticFactoryCall,PrefillCall.class::isInstance) keep working.git mv'd, soPrefillCallshows as removed lines inTypeInstantiation.javaplus a new file.No behavior change:
mvn clean installis green (568 tests) and the committedexample/generated-example-buildersources are regenerated byte-identical.Written by Devin