Annotation Interface BeanProperties
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The access type for bean properties.static enum
Visibility policy for bean properties and fields. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe default access type isBeanProperties.AccessKind.METHOD
which treats only public JavaBean getters or Java record components as properties.boolean
Some APIs allow multiple argument setters to convert the valuewithDuration(long, TimeUnit)
.boolean
Some APIs allow zero argument setters to set boolean flags such assetDebug()
.Class<? extends Annotation>[]
The annotation types that if present on the property cause the property to be excluded from results.String[]
The property names to excludes.String[]
The property names to include.Allows specifying the visibility policy to use to control which fields and methods are included. -
Field Summary
-
Field Details
-
MEMBER_ACCESS_KIND
- See Also:
-
MEMBER_VISIBILITY
- See Also:
-
MEMBER_INCLUDES
- See Also:
-
MEMBER_EXCLUDES
- See Also:
-
MEMBER_ALLOW_WRITE_WITH_ZERO_ARGS
- See Also:
-
MEMBER_ALLOW_WRITE_WITH_MULTIPLE_ARGS
- See Also:
-
MEMBER_EXCLUDED_ANNOTATIONS
- See Also:
-
-
Element Details
-
accessKind
BeanProperties.AccessKind[] accessKindThe default access type is
BeanProperties.AccessKind.METHOD
which treats only public JavaBean getters or Java record components as properties. By specifyingBeanProperties.AccessKind.FIELD
, public or package-protected fields will be used instead.If both
BeanProperties.AccessKind.FIELD
andBeanProperties.AccessKind.METHOD
are specified then the order as they appear in the annotation will be used to determine whether the field or method will be used in the case where both exist.- Returns:
- The access type. Defaults to
BeanProperties.AccessKind.METHOD
- Default:
- {METHOD}
-
visibility
BeanProperties.Visibility[] visibilityAllows specifying the visibility policy to use to control which fields and methods are included.- Returns:
- The visibility policies
- Default:
- {DEFAULT}
-
includes
String[] includesThe property names to include. Defaults to all properties.- Returns:
- The names of the properties
- Default:
- {}
-
excludes
String[] excludesThe property names to excludes. Defaults to excluding none.- Returns:
- The names of the properties
- Default:
- {}
-
allowWriteWithZeroArgs
boolean allowWriteWithZeroArgsSome APIs allow zero argument setters to set boolean flags such as
setDebug()
. These by default are not processed unless the value of this annotation is set to true.Note that this attribute works in conjunction with
AccessorsStyle.writePrefixes()
to allow other styles such aswithDebug()
- Returns:
- True if zero arg setters should be processed
- Default:
- false
-
allowWriteWithMultipleArgs
boolean allowWriteWithMultipleArgsSome APIs allow multiple argument setters to convert the valuewithDuration(long, TimeUnit)
.- Returns:
- True if multiple arg setters should be processed
- Default:
- false
-
excludedAnnotations
Class<? extends Annotation>[] excludedAnnotationsThe annotation types that if present on the property cause the property to be excluded from results.- Returns:
- The annotation types
- Default:
- {}
-