public interface ConfigFile extends ConfigFileMetadata
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addChangeListener(ConfigFileChangeListener listener)
Adding a config file change listener, will trigger a callback when the config file is published
|
<T> T |
asJson(Class<T> objectType,
T defaultValue)
Deserialize to json object with given class type by gson.
|
<T> T |
asJson(Type typeOfT,
T defaultValue)
Deserialize to json object with given class type by gson.
|
String |
getContent()
Get the content of the configuration file.
|
boolean |
hasContent()
Whether the configuration file contains content.
|
void |
removeChangeListener(ConfigFileChangeListener listener)
remove a config file change listener
|
getFileGroup, getFileName, getNamespaceString getContent()
<T> T asJson(Class<T> objectType, T defaultValue)
T - objectType - the type of classdefaultValue - the default value<T> T asJson(Type typeOfT, T defaultValue)
T - typeOfT - the type of classdefaultValue - the default valueboolean hasContent()
void addChangeListener(ConfigFileChangeListener listener)
listener - the listener will be addedvoid removeChangeListener(ConfigFileChangeListener listener)
listener - the listener will be removedCopyright © 2022. All rights reserved.