Class AnnotatedConfig
java.lang.Object
me.hsgamer.hscore.config.DecorativeConfig
me.hsgamer.hscore.config.annotated.AnnotatedConfig
- All Implemented Interfaces:
Config
The annotated
Config
, where any fields can be assigned to the config with the annotation ConfigPath
.
If the field is a final non-static, don't set default value directly, use constructor instead.
public class ExampleConfig extends AnnotatedConfig { @ConfigPath("test1.path") private final String test1 = "test1"; // If the field is final, Don't do this @ConfigPath("test2.path") private final String test2; // Do this instead public ExampleConfig(Config config) { super(config); test2 = "test2"; // Set default value via the constructor } }
-
Field Summary
Fields inherited from class me.hsgamer.hscore.config.DecorativeConfig
config
-
Constructor Summary
-
Method Summary
Methods inherited from class me.hsgamer.hscore.config.DecorativeConfig
clear, contains, get, get, getComment, getComment, getInstance, getInstance, getKeys, getName, getNormalized, getNormalized, getNormalizedValues, getOriginal, getOriginalConfig, getValues, isInstance, isNormalizable, normalize, normalizeObject, remove, save, setComment, setComment, setIfAbsent, setIfAbsent
-
Constructor Details
-
AnnotatedConfig
Create an annotated config- Parameters:
config
- the original config
-
-
Method Details
-
setup
public void setup()Description copied from interface:Config
Set up the configuration- Specified by:
setup
in interfaceConfig
- Overrides:
setup
in classDecorativeConfig
-
set
Description copied from interface:Config
Set the value to the path- Specified by:
set
in interfaceConfig
- Overrides:
set
in classDecorativeConfig
- Parameters:
value
- the valuepath
- the path
-
reload
public void reload()Description copied from interface:Config
Reload the configuration- Specified by:
reload
in interfaceConfig
- Overrides:
reload
in classDecorativeConfig
-