Skip to content

refactor(generator): util tidying, dispatch unification, predicate cleanup (C34)#1135

Merged
jsenko merged 2 commits into
mainfrom
c34-cleanup
Jun 29, 2026
Merged

refactor(generator): util tidying, dispatch unification, predicate cleanup (C34)#1135
jsenko merged 2 commits into
mainfrom
c34-cleanup

Conversation

@jsenko

@jsenko jsenko commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Util consolidation

  • Renamed PrimitiveTypeHelperPrimitiveTypeUtil
  • Moved getTypeName/getUnionTypeName from AbstractJavaStage → new TypeNameUtil
  • Removed unused methods from AbstractJavaStage: getUnionValueInterfaceFQN, getMappedNodeInterfaceFQN, hasNamedMethod, primitiveTypeToClass
  • Removed unused singularize() from AbstractStage
  • Replaced all FQN type casts with proper imports (20+ files)
  • Cleaned up empty @param javadoc tags (14 files)

Dispatch unification

  • Added isUnionListType()/isUnionMapType() to Type interface
  • Simplified AbstractStage predicates to delegate to Type methods
  • Centralized AbstractIOStage dispatch via PropertyBlockKind.fromResolvedType()
  • Replaced resolvedTypeIs in AbstractCreateMethodsStage with inherited predicates

Context

C34 polish in #1042.

Test plan

  • All 1129 data-models tests pass
  • Generated output unchanged

jsenko added 2 commits June 29, 2026 11:02
…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.
@jsenko jsenko merged commit 6283920 into main Jun 29, 2026
2 checks passed
@jsenko jsenko deleted the c34-cleanup branch June 29, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant