public class YamlFileReader extends Object implements PropertyReader
| Constructor and Description |
|---|
YamlFileReader(File file)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getObject(String path)
Returns the value for the given path, or null if not present.
|
<T> T |
getTypedObject(String path,
Class<T> clazz)
Returns the value for the given path in a typed manner.
|
void |
reload()
Reloads the properties from the external source.
|
void |
set(String path,
Object value)
Sets the value at the given path in memory.
|
public YamlFileReader(File file)
file - the file to loadpublic Object getObject(String path)
PropertyReadergetObject in interface PropertyReaderpath - the path to retrieve the value forpublic <T> T getTypedObject(String path, Class<T> clazz)
PropertyReadergetTypedObject in interface PropertyReaderT - the class' typepath - the path to retrieve the value forclazz - the class to cast the value to if possiblepublic void set(String path, Object value)
PropertyReaderPropertyResource.exportProperties(ch.jalu.configme.configurationdata.ConfigurationData).set in interface PropertyReaderpath - the path to set a value forvalue - the value to setpublic void reload()
PropertyReaderreload in interface PropertyReaderCopyright © 2016–2018 The AuthMe Team. All rights reserved.