# Annotation Interface ConfigMethod

@Documented @Inherited @Retention(RUNTIME) @Target(METHOD) public @interface ConfigMethod
Annotation that prepares a mutator method for use and documentation by the `BeanConfig` class. This annotation is not required for such configuration, but it can be used to improve documentation and make usage easier.

This annotation will normally be applied to a bean-setting method with a signature like `void setXxx(type)`.

Since:
  25 Sep 2020
Author:
  Mark Taylor
See Also:
  - `BeanConfig`

## Required Element Summary

Required Elements
Modifier and Type
Required Element
Description
`String`
`doc`
User-directed documentation.
`String`
`property`
Gives an alternative name for the property defined by this method.

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`String`
`example`
String representation of an example value for this property, suitable for use in documentation.
`boolean`
`hide`
If true, the setting should not be documented under normal circumstances.
`int`
`sequence`
Gives a sequence index indicating the order in which the different ConfigMethods in a given class should be listed.
`String`
`usage`
Usage string.

## Element Details

### property

String property
Gives an alternative name for the property defined by this method. If the annotated method is named `setXxx` and the property value is `yyy`, this configuration defined by this method can be addressed as either the property `xxx` or `yyy`.

Returns:
  property name

### doc

String doc
User-directed documentation. The format is not specified here, but if the return value starts with a "<" the content is probably XML, and if it doesn't it's probably plain text.

Returns:
  user-directed documentation

### example

String example
String representation of an example value for this property, suitable for use in documentation.

Returns:
  example setting

Default:
  `""`

### usage

String usage
Usage string. Only required if there is something more to say than the data type.

Returns:
  short user-directed plain text usage string

Default:
  `""`

### hide

boolean hide
If true, the setting should not be documented under normal circumstances.

Returns:
  true to hide

Default:
  `false`

### sequence

int sequence
Gives a sequence index indicating the order in which the different ConfigMethods in a given class should be listed.

Returns:
  sequence index for listing in documentation

Default:
  `1000`