Skip to content

Adding with-Interface functionality and improving basic functionality - #88

Merged
AndreasIgel merged 24 commits into
mainfrom
feature/with-interface
Oct 27, 2025
Merged

AndreasIgel merged 24 commits into
mainfrom
feature/with-interface

Conversation

@AndreasIgel

@AndreasIgel AndreasIgel commented Oct 27, 2025

Copy link
Copy Markdown
Collaborator

Added features

providing a with-Interface by which existing objects could be used to initialize a builder and creating new, extended objects:

Person person = PersonBuilder.create()
    .name("John Doe")
    .age(30)
    .build();

// Create a modified copy using the With interface
Person olderPerson = PersonBuilder.create()
    .with(person)
    .age(31)  // Only change the age
    .build();

// By implementing the With interface, you can create modified copies of objects in a type-safe way
Person youngerPerson = person.with(p -> p.age(29));

Closes #67

Bugfixes

  • in generation of code the types would may be mixed up, when the types are used several times and their usage in code does not follow an ordering
  • the initialistion of builders from records did not find any getter, so the fields got not initialized

Basics

  • improving README.md and moving insights for contributers into CONTRIBUTION.md
  • adding an acknowledgement section in README.md
  • adding logging capabilities in tests so that the builder debug-notes could be logged directly in test-logs
  • adding logging of generated sources before asserting them, so that it is easy to compare with assertions

@github-actions

github-actions Bot commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 4f1f86c.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@codecov

codecov Bot commented Oct 27, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.24460% with 8 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ple/builders/processor/util/JavaCodeGenerator.java 76.47% 1 Missing and 7 partials ⚠️

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@AndreasIgel
AndreasIgel merged commit 43fe1d7 into main Oct 27, 2025
8 checks passed
@AndreasIgel
AndreasIgel deleted the feature/with-interface branch October 27, 2025 21:45
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.

With-Interface as suggested by Benji Weber

1 participant