public abstract class APermanentConfig extends AConfig implements IConfig
log, pool, prefixHandlers, substitutions| Constructor and Description |
|---|
APermanentConfig(javassist.ClassPool pool,
java.util.Map<java.lang.String,java.util.function.UnaryOperator<java.lang.String>> prefixHandlers,
java.util.List<org.xblackcat.sjpu.util.function.SupplierEx<IValueGetter,SettingsException>> substitutions) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(java.lang.Class<T> clazz,
java.lang.String prefixName,
boolean optional)
Loads settings for specified interface.
|
IValueGetter |
getValueGetter() |
protected abstract IValueGetter |
loadProperties() |
buildConstructorParameterspublic APermanentConfig(javassist.ClassPool pool,
java.util.Map<java.lang.String,java.util.function.UnaryOperator<java.lang.String>> prefixHandlers,
java.util.List<org.xblackcat.sjpu.util.function.SupplierEx<IValueGetter,SettingsException>> substitutions)
public <T> T get(java.lang.Class<T> clazz,
java.lang.String prefixName,
boolean optional)
throws SettingsException
get in interface IConfigT - target interface for holding settings.clazz - target interface class for holding settings.prefixName - override prefix for propertiesoptional - true to return null instead of throwing exception if resource is missing.SettingsException - if interface methods are not properly annotatedpublic IValueGetter getValueGetter() throws SettingsException
getValueGetter in class AConfigSettingsExceptionprotected abstract IValueGetter loadProperties() throws java.io.IOException
java.io.IOException