Annotation Interface Parameter


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface Parameter
Annotation to mark a configuration parameter in a configuration bean
Author:
jschalanda
  • Element Details

    • value

      String value
      Name of the configuration option in the Repository
    • required

      boolean required
      Whether this is a required parameter. If the parameter is missing but required JadConfig will throw a ParameterException
      Default:
      false
    • trim

      boolean trim
      Whether this parameter value should be trimmed before processing.
      See Also:
      Default:
      true
    • converter

      Class<? extends Converter<?>> converter
      Specific Converter to use for this parameter. This will override any configured Converter in any ConverterFactory used by JadConfig.
      Default:
      com.github.joschi.jadconfig.converters.NoConverter.class
    • validator

      @Deprecated Class<? extends Validator<?>> validator
      Deprecated.
      Use validators() instead.
      Specific Validator to use for this parameter.
      Default:
      com.github.joschi.jadconfig.validators.NoValidator.class
    • validators

      Class<? extends Validator<?>>[] validators
      Specific Validators to use for this parameter.
      Default:
      {com.github.joschi.jadconfig.validators.NoValidator.class}
    • fallbackPropertyName

      String fallbackPropertyName
      Optional fallback name of the configuration option in the Repository Used only when the original name in value() doesn't deliver any results in the repository. If you have a hardcoded value in the field, it will be used only as a last resort. The order is value(), then fallbackPropertyName() and if there are no values, only then the field value will be used (=stays untouched)
      Default:
      ""