@Retention(value=RUNTIME) @Target(value=FIELD) public @interface ConfigurationParameter
boolean
, boolean[]
, int
, int[]
,
float
, float[]
Boolean
, Boolean
[]
,
Integer
, Integer
[]
, Float
, Float
[]
String
, String
[]
Enum
)Locale
Pattern
File
, URL
, URI
...ConfigurationParameterInitializer
Modifier and Type | Fields and Description |
---|---|
static String |
NO_DEFAULT_VALUE
Tells the ConfigurationParameterFactory that no default value has been provided
|
static String |
USE_FIELD_NAME
the default value for name if none is given.
|
Modifier and Type | Optional Element and Description |
---|---|
String[] |
defaultValue
What can be the value should correspond with the type of the field that is annotated.
|
String |
description
A description for the configuration parameter
|
boolean |
mandatory
Specifies whether this configuration parameter is mandatory - i.e.
|
String |
name
If you do not specify a name then the default name will be given by
USE_FIELD_NAME
will be the default name. |
public static final String USE_FIELD_NAME
public static final String NO_DEFAULT_VALUE
public abstract String name
USE_FIELD_NAME
will be the default name. This tells ConfigurationParameterFactory to use the name of the
annotated field as the name of the configuration parameter. The exact name that is used is
determined by the method
ConfigurationParameterFactory.getConfigurationParameterName(java.lang.reflect.Field)
public abstract String description
public abstract boolean mandatory
public abstract String[] defaultValue
If the field is multiValued, then the value should look something like this '{"value1", "value2"}'
If you want a field to be initialized with a null value, then do not specify a default value or
specify the value given by the field NO_DEFAULT_VALUE
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.