public class ConfigSourceFactory extends Object
| Constructor and Description |
|---|
ConfigSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
IConfigSource |
create(File folder,
String fileName)
Create a ConfigSource using the default factory (gson).
|
IConfigSource |
create(String type,
File folder,
String fileName) |
static ConfigSourceFactory |
instance() |
static IConfigSourceFactory |
registerFactory(String type,
IConfigSourceFactory factory)
Register new config source factory.
|
public static IConfigSourceFactory registerFactory(String type, IConfigSourceFactory factory)
type - the name to be used to represent this factoryfactory - the factory instancepublic static ConfigSourceFactory instance()
public IConfigSource create(File folder, String fileName)
folder - the folder where config file will residefileName - name of the file without any dots. The underlying
factory will append the extension as needed.public IConfigSource create(String type, File folder, String fileName)
type - type of the config source.folder - the folder where config file will residefileName - name of the file without any dots. The underlying
factory will append the extension as needed.