Interface Configurable
- All Known Implementing Classes:
UltiToolsPlugin
public interface Configurable
Configurable data operation interface.
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<AbstractConfigEntity> <T extends AbstractConfigEntity>
TGet config by config type.<T extends AbstractConfigEntity>
TGet config by config path and config type.<T extends AbstractConfigEntity>
voidsaveConfig(String path, Class<T> configType) Saves the configuration entity registered forpathin this module.
-
Method Details
-
getAllConfigs
- Returns:
- All configs
-
getConfig
Get config by config type.- Type Parameters:
T- Config type- Parameters:
configType- Config type- Returns:
- Config
-
getConfig
Get config by config path and config type.- Type Parameters:
T- Config type- Parameters:
path- Config pathconfigType- Config type- Returns:
- the entity registered for
path, ornullif none is registered (a registered entity of another type throwsClassCastException)
-
saveConfig
<T extends AbstractConfigEntity> void saveConfig(String path, Class<T> configType) throws IOException Saves the configuration entity registered forpathin this module. SeeUltiToolsPlugin.saveConfig(String, Class)for what is written. ThrowsIllegalStateExceptionnaming the module and path if no entity is registered for the path. If the registered entity is not an instance ofconfigType, throwsClassCastExceptionnaming the module, path, expected type and actual type.- Type Parameters:
T- Config type- Parameters:
path- Config pathconfigType- Config type- Throws:
IOException- IOException
-