refactor(generator): util tidying, dispatch unification, predicate cleanup (C34)#1135
Merged
Conversation
…ification (C34) Util consolidation: - Rename PrimitiveTypeHelper → PrimitiveTypeUtil for naming consistency - Move getTypeName/getUnionTypeName from AbstractJavaStage → TypeNameUtil - Remove unused singularize() from AbstractStage (callers use ctx.) - Remove unused methods from AbstractJavaStage: getUnionValueInterfaceFQN, getMappedNodeInterfaceFQN, hasNamedMethod, primitiveTypeToClass - Replace all fully-qualified type casts with proper imports (20+ files) - Clean up empty @param javadoc tags (14 files) Dispatch unification: - Add isUnionListType()/isUnionMapType() to Type interface (completes existing pattern alongside isPrimitiveListType/isEntityListType) - Simplify AbstractStage predicates to delegate to Type methods - Centralize AbstractIOStage dispatch via PropertyBlockKind.fromResolvedType() - Simplify AbstractCreateMethodsStage with method references and new Type convenience methods AbstractJavaStage: 405 → 354 lines. Net -249 lines across 47 files.
…sStage Replace resolvedTypeIs(property, predicate) with inherited AbstractStage predicates (isEntity, isEntityList, isUnionList, etc.) for consistency. Remove the now-unused resolvedTypeIs helper and Predicate import.
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
Util consolidation
PrimitiveTypeHelper→PrimitiveTypeUtilgetTypeName/getUnionTypeNamefromAbstractJavaStage→ newTypeNameUtilAbstractJavaStage:getUnionValueInterfaceFQN,getMappedNodeInterfaceFQN,hasNamedMethod,primitiveTypeToClasssingularize()fromAbstractStage@paramjavadoc tags (14 files)Dispatch unification
isUnionListType()/isUnionMapType()toTypeinterfaceAbstractStagepredicates to delegate to Type methodsAbstractIOStagedispatch viaPropertyBlockKind.fromResolvedType()resolvedTypeIsinAbstractCreateMethodsStagewith inherited predicatesContext
C34 polish in #1042.
Test plan