Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
77a2494
Refactoring code to not use one big class for creation of builderDto …
AndreasIgel Dec 31, 2025
17294e6
Splitting ConsumerMethodGenerator into multiple Generators
AndreasIgel Dec 31, 2025
f81f599
Refactoring code of Generators for separtion of concepts, using TypeN…
AndreasIgel Jan 1, 2026
bb36013
Reactoring to use service registry for build-in generators too
AndreasIgel Jan 1, 2026
ab207e0
Adding a helper function in ProcessingContext to support warning with…
AndreasIgel Jan 1, 2026
d758f9c
Adding an extension point for Enhancing generated builders
AndreasIgel Jan 1, 2026
02d3d76
Moving creation of with-interface to Enhancer
AndreasIgel Jan 1, 2026
44374e3
Moving logic on BuilderClass from JavaCodeGenerator to Enhancers
AndreasIgel Jan 1, 2026
589a2b6
Adding helper function for full qualified names in Types and replacin…
AndreasIgel Jan 1, 2026
5b2edf1
Fixing Support of generics in DTOs
AndreasIgel Jan 1, 2026
e252e60
fixing code of generic typed fields
AndreasIgel Jan 2, 2026
4ab33e6
Fixing Jackson-Annotation (without prefix the attribute "withPrefix" …
AndreasIgel Jan 2, 2026
d82ce4b
Adapting full generated texts with changes of ordering and extended j…
AndreasIgel Jan 2, 2026
e446bf9
Swapping empty constructor with constructor by instance in ordering i…
AndreasIgel Jan 2, 2026
1b58221
Extending generated javadoc in generated Builders
AndreasIgel Jan 2, 2026
f029d25
Revert "Extending generated javadoc in generated Builders"
AndreasIgel Jan 2, 2026
8a9bae9
Removing example usage from Builders-JavaDoc (as long as we do not ha…
AndreasIgel Jan 2, 2026
8b1d8d3
Adding documentation to Generators and Enhancers regarding the genera…
AndreasIgel Jan 2, 2026
4d7b60c
Fixing code smells in branch
AndreasIgel Jan 2, 2026
77ce323
Code style: reducing parameter names in createFieldSetterWithTransform
AndreasIgel Jan 2, 2026
53fca5f
Refactoring setBuilderAndConstructorInfo to reduce complexity
AndreasIgel Jan 2, 2026
85a7c09
Revert "Code style: reducing parameter names in createFieldSetterWith…
AndreasIgel Jan 2, 2026
5091464
Extracting duplicated code into MethodGeneratorUtil
AndreasIgel Jan 2, 2026
6488656
Fixing codestyle issues
AndreasIgel Jan 2, 2026
d726a7c
Moving creation of Consumer-TypeNameGeneric into MethodGeneratorUtil
AndreasIgel Jan 2, 2026
89e1779
Adding functionality to filter components for builder-generation
AndreasIgel Jan 2, 2026
a1c36c4
Extending documentation for configuration and customizing
AndreasIgel Jan 2, 2026
b7cf8f1
Splitting CollectionHelperGenerator into 3 different generators
AndreasIgel Jan 2, 2026
9fe2c53
Fixing codesmells
AndreasIgel Jan 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
* <p>Example:
*
* <pre>{@code
* @Generated("org.javahelpers.simple.builders.processor.BuilderProcessor")
* @Generated("Generated by org.javahelpers.simple.builders.processor.BuilderProcessor")
* public class PersonDtoBuilder {
* // ...
* }
Expand Down Expand Up @@ -542,6 +542,8 @@
*
* Default: ENABLED <br>
* Compiler option: -Asimplebuilder.implementsBuilderBase
*
* @return the option state for implementing BuilderBase interface
*/
OptionState implementsBuilderBase() default OptionState.UNSET;

Expand All @@ -565,6 +567,8 @@
*
* Default: ENABLED <br>
* Compiler option: -Asimplebuilder.generateWithInterface
*
* @return the option state for generating With interface
*/
OptionState generateWithInterface() default OptionState.UNSET;

Expand All @@ -586,6 +590,8 @@
*
* Default: DISABLED <br>
* Compiler option: -Asimplebuilder.usingJacksonDeserializerAnnotation
*
* @return the option state for using Jackson deserializer annotation
*/
OptionState usingJacksonDeserializerAnnotation() default OptionState.UNSET;

Expand All @@ -600,6 +606,8 @@
*
* <p>Default: DISABLED <br>
* Compiler option: -Asimplebuilder.generateJacksonModule
*
* @return the option state for generating Jackson module
*/
OptionState generateJacksonModule() default OptionState.UNSET;

Expand All @@ -614,6 +622,8 @@
*
* <p>Default: "" (empty - generate one module per package) <br>
* Compiler option: -Asimplebuilder.jacksonModulePackage
*
* @return the package name for the Jackson module
*/
String jacksonModulePackage() default "";

Expand All @@ -635,6 +645,8 @@
*
* Default: "Builder" <br>
* Compiler option: -Asimplebuilder.builderSuffix
*
* @return the suffix for the builder class name
*/
String builderSuffix() default "Builder";

Expand All @@ -661,6 +673,8 @@
*
* Default: "" (empty - no suffix) <br>
* Compiler option: -Asimplebuilder.setterSuffix
*
* @return the suffix for setter method names
*/
String setterSuffix() default "";
}
Expand Down
32 changes: 32 additions & 0 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Simple-builders supports fine-grained configuration through the `@SimpleBuilder.
- [Conditional Logic](#conditional-logic)
- [Access Control](#access-control)
- [Collection Helpers](#collection-helpers)
- [Component Filtering](#component-filtering)
- [Integration](#integration)
- [Examples](#examples)
- [Minimal Builder](#minimal-builder)
Expand Down Expand Up @@ -599,6 +600,34 @@ Generates methods using `HashMapBuilder` for fluent Map construction.

---

### Component Filtering

#### `deactivateGenerationComponents`

**Default**: `""` (empty) | **Compiler Option**: `-Asimplebuilder.deactivateGenerationComponents=pattern1,pattern2,...`

Deactivates specific method generators and builder enhancers by class name pattern. This allows you to override default generators/enhancers with your own custom implementations.

**Primary Use Case**: Override Default Components

When you want to replace a built-in generator or enhancer with your own custom implementation, you first deactivate the default component, then register your custom one via ServiceLoader.

For detailed instructions on creating custom generators and enhancers, see [**CUSTOMIZING.md**](CUSTOMIZING.md).

**Pattern Matching**:
- **Exact match**: `ConditionalEnhancer` - deactivates exactly this class
- **Wildcard suffix**: `*HelperGenerator` - deactivates all classes ending with HelperGenerator
- **Wildcard prefix**: `String*` - deactivates all classes starting with String
- **Wildcard anywhere**: `*Consumer*` - deactivates all classes containing Consumer

**Feature Toggling vs Component Override**:
- **Feature toggling**: Use `@SimpleBuilder.Options(generateConditionalHelper = DISABLED)`
- **Component override**: Use `deactivateGenerationComponents` + custom ServiceLoader implementation

See [**CUSTOMIZING.md**](CUSTOMIZING.md) for complete implementation examples and best practices.

---

### Integration & Annotations

#### `generateWithInterface`
Expand Down Expand Up @@ -1183,6 +1212,9 @@ methodAccess = AccessModifier.PRIVATE
-Asimplebuilder.usingHashSetBuilderWithElementBuilders=ENABLED|DISABLED
-Asimplebuilder.usingHashMapBuilder=ENABLED|DISABLED

# Component Filtering
-Asimplebuilder.deactivateGenerationComponents=pattern1,pattern2,...

# Integration & Annotations
-Asimplebuilder.generateWithInterface=ENABLED|DISABLED
-Asimplebuilder.implementsBuilderBase=ENABLED|DISABLED
Expand Down
Loading
Loading