Repository navigation
processing: split ProcessingContext into generic AnnotationProcessingContext base (#348) - #362
Merged
AndreasIgel merged 12 commits intoOct 22, 2026
Conversation
…lder-only state left)
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.



Implements #348 — second step of the codegen extraction tracked in #233.
What
AnnotationProcessingContextbase class inprocessing: wrapsProcessingEnvironment,Elements/Typeshelpers, logger and the performance tracker with domain-agnostic element/type operations.ProcessingContextis renamed toBuilderProcessingContextand extends the base, keeping only builder state: configuration reader, builder scope resolver, generator registry, processing target, strict-mode reporting. (rename commit, history preserved)PerformanceTracker(compiler-argument reading stays builder-side in a private static factory), so the base carries no builder vocabulary.isAccessibleFromGeneratedPackage(Element)— generic semantics ("can generated code call this member") implemented via aprotected abstract getGeneratedPackageName()hook.BuilderProcessingContextsuppliesgetBuilderPackageName();isMemberAccessibleFromBuilderPackageremains as a delegating alias for its existing callers.Signature migration
JavaLangAnalyser: all signatures now takeAnnotationProcessingContext— it only ever used generic helpers (getTypeElement,getAllMembers,getElementValuesWithDefaults,isSameType, accessibility check).JavaLangMapper/FieldAnnotationExtractoralready take the narrowerTypeMappingContextinterface — unchanged.BuilderDefinitionCreatorandBuilderScopeResolverstay onBuilderProcessingContext: they usegetConfiguration,getGeneratorRegistryandgetBuilderPackageName.Verification
Pure rename/extraction, no behavior change: all 528 processor tests pass,
example/generated-example-builderoutput is byte-identical to before the change.