-
@Retention(RUNTIME) @Target(TYPE) public @interface BeanDefinitionAnnotation defining a bean for code generation.This annotation must be used on classes that should be treated as beans.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringbuilderScopeThe scope of the builder class.booleancacheHashCodeWhether to generate code to cache the hash code.java.lang.StringcloneStyleThe configuration for generating clone methods.java.lang.StringconstructorScopeThe scope of the generated constructor.java.lang.StringfactoryNameThe name of the factory method.java.lang.StringhierarchyInformation about the bean hierarchy.java.lang.StringmetaScopeThe scope of the meta-bean class.java.lang.StringstyleThe style of bean generation.
-
-
-
Element Detail
-
style
java.lang.String style
The style of bean generation.By default, this follows 'smart' rules. Set to 'minimal' to generate a minimal amount of code. Set to 'full' to generate the full code. Set to 'light' to generate a light immutable bean using reflection internally.
- Returns:
- the style, defaulted to 'smart'
- Default:
- "smart"
-
-
-
constructorScope
java.lang.String constructorScope
The scope of the generated constructor.Only applicable to immutable beans. By default, this follows 'smart' rules, which generate a private constructor when needed by the builder. Set to 'private' to generate a private constructor. Set to 'package' to generate a package-scoped constructor. Set to 'protected' to generate a protected constructor. Set to 'public' to generate a public constructor. Set to 'public@ConstructorProperties' to generate a public constructor.
- Returns:
- the constructor scope, defaulted to 'smart'
- Default:
- "smart"
-
-
-
metaScope
java.lang.String metaScope
The scope of the meta-bean class.By default, this follows 'smart' rules, which generate a public meta-bean. Set to 'private' to generate a private meta-bean. Set to 'package' to generate a package-scoped meta-bean. Set to 'public' to generate a public meta-bean.
- Returns:
- the meta scope, defaulted to 'smart'
- Default:
- "smart"
-
-
-
builderScope
java.lang.String builderScope
The scope of the builder class.By default, this follows 'smart' rules, which generate a public builder for immutable beans and no builder for mutable beans. Set to 'private' to generate a private builder. Set to 'package' to generate a package-scoped builder. Set to 'public' to generate a public builder.
- Returns:
- the builder scope, defaulted to 'smart'
- Default:
- "smart"
-
-
-
cloneStyle
java.lang.String cloneStyle
The configuration for generating clone methods.This flag controls generation of the
clonemethod. The default is 'smart'.The valid values are:
- 'omit' - omit the clone method
- 'smart' - process intelligently, generating it for mutable and not generating for immutable
- 'generate' - generate the clone method
- Returns:
- the clone style, defaulted to 'smart'
- Default:
- "smart"
-
-