@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Configuration
JConfigurator.configure(java.util.Map, java.lang.Object)| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends ConfigurationConverter<?>> |
converter
Specifies the
converter to use to set this configuration's value.If none is specified, then a default converter is used from org.jconfigurations.converters.If no default converter then a ConfigurationException will be thrown. |
String |
name
The
configuration's name as expected in the configuration source.By default, the name for a given configuration parameter is the field's own name as declared in the source code. Eg.: |
boolean |
required
false by default, a configuration marked as required will trigger an
error if it's not found in the input source of configuratios according
to its name. |
public abstract String name
configuration's name as expected in the configuration source.@Configuration private String name;... will be assigned the value of a configuration property named
name, while:@Configuration(name = "webServer.name") private String name;... will listen for a configuration property named
webServer.name.public abstract boolean required
false by default, a configuration marked as required will trigger an
error if it's not found in the input source of configuratios according
to its name.public abstract Class<? extends ConfigurationConverter<?>> converter
converter to use to set this configuration's value.org.jconfigurations.converters.ConfigurationException will be thrown.JConfigurator.configure(java.util.Map, java.lang.Object)Copyright © 2015. All rights reserved.