Annotation Interface ConfigurationRoot
This annotation, if applied to a class, marks it as a configuration schema root. Annotation processor generates
several classes for each configuration schema:
- Config - Represents the configuration, provides API to init, change and view it.
Extends
DynamicConfiguration - Change - changes the config tree
- View - an immutable object to view the config tree
@ConfigurationRoot(rootName = "a.b", type = ConfigurationType.LOCAL)
public class LocalConfigurationSchema {
@Value
public String foo;
@Value
public boolean bar;
@ConfigValue
public SomeOtherConfiguration someOther;
}
The main difference between @ConfigurationRoot and @Config is that the former marks schema root,
while the latter is for marking non-root parts of the schema.
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReturns the type of the configuration.
-
Element Details
-
rootName
String rootNameReturns the unique root name.- Returns:
- Unique root name.
-
-
-
type
ConfigurationType typeReturns the type of the configuration.- Returns:
- Type of the configuration.
- Default:
- LOCAL
-