Annotation Interface PropertyBuilderConfig
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(PropertyBuilderConfigs.class)
public @interface PropertyBuilderConfig
While the test classes are capable of auto-detecting JavaProperties you need
to adjust them from time to time. With this annotation you can do this for
builder specific properties. This annotation can only adjust an already
existing
PropertyMetadata
and can not be used stand-alone- Author:
- Oliver Wolff
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionIn case this builderMethodName is set it will be used directly for deriving the write-method.Only needed for builder that deal withIterable
and single elements, seePropertyAccessStrategy.BUILDER_COLLECTION_AND_SINGLE_ELEMENT
for detailsIn case methodPrefix is not set the corresponding build method to be accessed for setting the value is the name of the attribute: propertyName(), in case it is a concrete value, e.g.Defines different ways for reading / writing properties.
-
Element Details
-
name
- Returns:
- the name of the property. Must not null nor empty. Must refer to an
already existing
PropertyMetadata
-
-
-
propertyAccessStrategy
Defines different ways for reading / writing properties.- Returns:
- the
PropertyAccessStrategy
, defaults toPropertyAccessStrategy.BUILDER_DIRECT
- Default:
- BUILDER_DIRECT
-
methodPrefix
In case methodPrefix is not set the corresponding build method to be accessed for setting the value is the name of the attribute: propertyName(), in case it is a concrete value, e.g. 'with' it will taken into account: withPropertName().- Returns:
- the method prefix, defaults to empty string
- Default:
- ""
-
builderMethodName
In case this builderMethodName is set it will be used directly for deriving the write-method.- Returns:
- builderMethodName, defaults to empty string
- Default:
- ""
-
builderSingleAddMethodName
Only needed for builder that deal withIterable
and single elements, seePropertyAccessStrategy.BUILDER_COLLECTION_AND_SINGLE_ELEMENT
for details- Returns:
- builderSingleAddMethodName, defaults to empty string
- Default:
- ""
-