Repository navigation
Generate JavaDoc usage examples in builders + processor model refactor - #229
Merged
Merged
Conversation
…or that it checks if there is a builder or a parameterless constructor
…method-definition and to map them afterwards to generation specific classes
…initionCreator, only on fallback cases it is in RoasterCodeGenerator
…condition, use imports Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Resolve PR #229 divergence: adopt main's strict-mode reporting and per-class rendering-exception isolation alongside the branch's JavaDoc-example generation and model refactor. Generated example builders relocated to example/generated-example-builder/ per main. Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…parameterize method-example tests (S5976) Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
…ple value Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
…els (S1172) Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
…tors (CodeQL expose-internal-representation) Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
…eratorUtil javadoc Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
…de-block list Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
|
AndreasIgel
pushed a commit
that referenced
this pull request
Aug 5, 2026
Bring the default-value feature up to date with current main (PR #229 JavaDoc-example generation + model refactor is now merged there). Conflicts resolved by taking main's version of the JavaDoc-example / model-refactor code and re-applying the default-value feature on top: - TrackedValue.valueOr / ifSet(...).orElse(...) fluent default API - FieldDto default-value field + isRequired() - CoreMethodsEnhancer applies defaults in build() - BuilderDefinitionCreator + FieldAnnotationExtractor extract @Default/@DefaultValue - README Default Values section, example DTOs, DefaultValueTest Generated example builders regenerated via 'mvn -pl example clean compile' (CI-consistent, no fmt); BookDtoBuilder is byte-identical to main, only the new OrderWithDefaultsBuilder/ProductWithDefaultsBuilder are added. main's strict-mode, resilience and exception-isolation retained. Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
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
Generates JavaDoc usage examples into the generated builder sources. Each generated builder class and each builder method now carries an
<h4>Example:</h4><pre>{@code ...}</pre>block showing a realistic fluent chain (basic setters,String.formatoverloads, suppliers, consumers, collection helpers), so consumers see copy-pasteable usage directly in their IDE tooltips.To support this, the processor's internal model was restructured:
BuilderMethodDto,CodeTemplateDto,BuilderToGenerationTypeMapper,BuilderNestedTypeDto, andjavadocDTOs (JavadocDto,JavadocCodeBlockDto).JavadocExampleValuesand assembled viaMethodGeneratorUtilinto per-method and per-class example chains.BuilderDefinitionCreator, withRoasterCodeGeneratoronly as a fallback.Changes
generators/util/JavadocExampleValues.java,MethodGeneratorUtil.java— example-value synthesis and chain assembly.model/method/{BuilderMethodDto,CodeTemplateDto,MethodCodeDto,MethodDto}.java,model/core/{BuilderDefinitionDto,BuilderToGenerationTypeMapper,GenerationTargetClassDto,...},model/javadoc/*,model/type/*— model split + mapping to generation types.generators/builder/*andgenerators/field/*— enhancers/field generators emit example fragments.processing/BuilderDefinitionCreator.java— conflict resolution + example wiring.BuilderJavadocExampleTest, expandedComprehensiveFeatureIntegrationTest,CustomizingDocumentationTest, plus committedexample/target/generated-sources/**snapshots showing the produced JavaDoc.Notes
No public runtime API change; this affects generated JavaDoc and the processor's internal structure.
closes #135