Skip to content

feat(SimpleBuilderFor): generate builders for all classes of a package (#323) - #324

Merged
AndreasIgel merged 4 commits into
java-helpers:mainfrom
igel-devin-ai:devin/1791067263-package-scanning
Oct 3, 2026
Merged

AndreasIgel merged 4 commits into
java-helpers:mainfrom
igel-devin-ai:devin/1791067263-package-scanning

Conversation

@igel-devin-ai

@igel-devin-ai igel-devin-ai commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Implements #323 (Option A from the issue).

What changed

  • @SimpleBuilderFor gains a String[] sourcePackages() member; value() is now default {}, so a declaration can list types, packages, or both. A declaration resolving no types still warns and generates nothing. The name is sourcePackages (not packages) to stay distinct from options.packageName, the target package.
  • BuilderProcessor.extractExternalTargetTypes merges two sources per annotation instance, deduplicated by qualified name: explicit value types keep declaration order and win overlaps, then each sourcePackages entry is resolved via Elements.getPackageElement and contributes its top-level TypeElements sorted by qualified name (deterministic output).
  • Non-constructible package members (interfaces, abstract classes, enums, annotations) are skipped with a debug note naming the member kind; unresolvable package names warn on the holder (strict mode escalates as usual). Nested types are not discovered — they keep requiring an explicit value entry, matching the issue.
  • sourcePackages composes with options exactly like value does: repeat @SimpleBuilderFor for different option sets, packageName routes the whole scanned set.

Tests

5 new cases in SimpleBuilderForTest: mixed-member package (interface/enum/abstract skipped), nested-type exclusion, sourcePackages+options routing, value/package overlap dedupe, unresolvable-package warning. 513 processor tests green.

Docs

CONFIGURATION.md section "Generating Builders for External Types" documents the new member.

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@AndreasIgel
AndreasIgel merged commit 1c15513 into java-helpers:main Oct 3, 2026
6 checks passed
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.

2 participants