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
Constructors -
Method Summary
Methods inherited from class me.hsgamer.hscore.config.DecorativeConfig
addDefault, contains, get, getComment, getName, getOriginal, getOriginalConfig, getValues, isNormalizable, normalize, save, setCommentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.hsgamer.hscore.config.Config
addDefaults, get, getComment, getInstance, getInstance, getKeys, getKeys, getNormalized, getNormalized, getNormalizedValues, getNormalizedValues, getValues, isInstance, normalizeObject, remove, setComment
-
Constructor Details
-
AnnotatedConfig
Create an annotated config- Parameters:
config- the original config
-
-
Method Details
-
setup
public void setup()- Specified by:
setupin interfaceConfig- Overrides:
setupin classDecorativeConfig
-
set
- Specified by:
setin interfaceConfig- Overrides:
setin classDecorativeConfig
-
reload
public void reload()- Specified by:
reloadin interfaceConfig- Overrides:
reloadin classDecorativeConfig
-