Annotation Type Options
-
@Retention(RUNTIME) @Target(TYPE) public @interface Options
Annotation for a class which has fields or methods with anOption
annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
deprecatedPrefix
When the prefix needs to be renamed, often it is desirable to maintain the backwards compatibility with the previous config.String
description
An optional text, that describes the current options.String
prefix
An optional prefix for all configuration options of the class annotated with this type.
-
-
-
Element Detail
-
prefix
String prefix
An optional prefix for all configuration options of the class annotated with this type. Prefix and name of the option will be separated by a dot.- Default:
- ""
-
-
-
deprecatedPrefix
String deprecatedPrefix
When the prefix needs to be renamed, often it is desirable to maintain the backwards compatibility with the previous config. In that case, the previous prefix can be moved to the fielddeprecatedPrefix
. Both normal and deprecated prefixes would work, with latter printing the deprecation warning.However, note that if a
Option.deprecatedName()
is defined for an option, then the deprecated prefix works only in combination with that deprecated name.Summary what works if a deprecated prefix is set:
- If
Option.deprecatedName()
is set, then "current prefix + current option name" and "deprecated prefix + deprecated option name" work. - If d
Option.deprecatedName()
is not set, then "current prefix + current option name" and "deprecated prefix + current option name" work.
- Default:
- "<NO_DEPRECATION>"
- If
-
-
-
description
String description
An optional text, that describes the current options.- Default:
- ""
-
-