Annotation Interface BeanProperties


@Documented @Target({ANNOTATION_TYPE,TYPE}) @Retention(CLASS) @Inherited public @interface BeanProperties
Bean properties configuration annotation. The annotation allows to change different options how beans should be detected. This configuration is used directly to produce bean properties for: introspection, configuration reader and configuration factory.
Since:
4.0.0
Author:
Denis Stepanov
  • Field Details

  • Element Details

    • accessKind

      The default access type is BeanProperties.AccessKind.METHOD which treats only public JavaBean getters or Java record components as properties. By specifying BeanProperties.AccessKind.FIELD, public or package-protected fields will be used instead.

      If both BeanProperties.AccessKind.FIELD and BeanProperties.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

      Allows specifying the visibility policy to use to control which fields and methods are included.
      Returns:
      The visibility policies
      Default:
      {DEFAULT}
    • includes

      String[] includes
      The property names to include. Defaults to all properties.
      Returns:
      The names of the properties
      Default:
      {}
    • excludes

      String[] excludes
      The property names to excludes. Defaults to excluding none.
      Returns:
      The names of the properties
      Default:
      {}
    • allowWriteWithZeroArgs

      boolean allowWriteWithZeroArgs

      Some 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 as withDebug()

      Returns:
      True if zero arg setters should be processed
      Default:
      false
    • allowWriteWithMultipleArgs

      boolean allowWriteWithMultipleArgs
      Some APIs allow multiple argument setters to convert the value withDuration(long, TimeUnit).
      Returns:
      True if multiple arg setters should be processed
      Default:
      false
    • excludedAnnotations

      Class<? extends Annotation>[] excludedAnnotations
      The annotation types that if present on the property cause the property to be excluded from results.
      Returns:
      The annotation types
      Default:
      {}