@Target(value={CONSTRUCTOR,TYPE}) @Retention(value=SOURCE) public @interface Buildable
Builder.
The annotation may be added to either the type or constructor.
When added to a constructor all fields of the constructor will be exposed to the builder.
Additionally, fields (both declared and inherited) that are writeable via setter will be taken into account.
To exclude fields from the builder you can use the `ignore` property.
When the annotation is added to interfaces or abstract classes, fluent interfaces and implementation will be
generated but no builder. Buildable classes that extend, implement buildable abstract classes or interfaces respectively
will reuse the generated fluent types.
Generic fields are meant to be processed at the level they are resolved.| Modifier and Type | Optional Element and Description |
|---|---|
String |
builderPackage |
boolean |
editableEnabled |
boolean |
generateBuilderPackage |
String[] |
ignore
Properties to ignore
In most cases the sturcture of the class will designate the properties to expose to the builder.
|
Inline[] |
inline |
boolean |
lazyCollectionInitEnabled |
boolean |
lazyMapInitEnabled |
BuildableReference[] |
refs |
boolean |
validationEnabled |
public abstract String builderPackage
public abstract BuildableReference[] refs
public abstract Inline[] inline
public abstract String[] ignore
Copyright © 2023. All rights reserved.