public class ProvidenceConfig extends Object
| Constructor and Description |
|---|
ProvidenceConfig(TypeRegistry registry) |
ProvidenceConfig(TypeRegistry registry,
Map<String,String> inputParams) |
ProvidenceConfig(TypeRegistry registry,
Map<String,String> inputParams,
boolean strict) |
| Modifier and Type | Method and Description |
|---|---|
<M extends PMessage<M,F>,F extends PField> |
getConfig(File file)
Load providence config from the given file.
|
<M extends PMessage<M,F>,F extends PField> |
getConfig(File file,
PMessageDescriptor<M,F> descriptor)
Load providence config from the given file.
|
<M extends PMessage<M,F>,F extends PField> |
getSupplier(File file)
Load providence config from the given file.
|
<M extends PMessage<M,F>,F extends PField> |
getSupplier(File file,
PMessageDescriptor<M,F> descriptor)
Load providence config from the given file.
|
<M extends PMessage<M,F>,F extends PField> |
getSupplierWithParent(File file,
Supplier<M> parent)
Load providence config from the given file, and with a defined parent
config.
|
List<ProvidenceConfigParam> |
params(File file)
Generate a list of params from the providence config, and it's included subconfigs.
|
void |
reload(File file)
Trigger reloading of the given file, and run recursively up through dependencies.
|
public ProvidenceConfig(TypeRegistry registry)
public ProvidenceConfig(TypeRegistry registry, Map<String,String> inputParams)
public ProvidenceConfig(TypeRegistry registry, Map<String,String> inputParams, boolean strict)
public <M extends PMessage<M,F>,F extends PField> M getConfig(File file) throws IOException
M - The message type.F - The message field type.file - The file to load.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public <M extends PMessage<M,F>,F extends PField> M getConfig(File file, PMessageDescriptor<M,F> descriptor) throws IOException
M - The message type.F - The message field type.file - The file to load.descriptor - The config type descriptor.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public <M extends PMessage<M,F>,F extends PField> Supplier<M> getSupplier(File file) throws IOException
M - The message type.F - The message field type.file - The file to load.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public <M extends PMessage<M,F>,F extends PField> Supplier<M> getSupplierWithParent(File file, Supplier<M> parent) throws IOException
M - The message type.F - The message field type.file - The file to load.parent - The parent message for the config to inherit.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public <M extends PMessage<M,F>,F extends PField> Supplier<M> getSupplier(File file, PMessageDescriptor<M,F> descriptor) throws IOException
M - The message type.F - The message field type.file - The file to load.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public List<ProvidenceConfigParam> params(File file) throws IOException
file - The file to load.IOException - If the file could not be read.TokenizerException - If the file could not be parsed.public void reload(File file) throws IOException
file - The file that may need to be reloaded.IOExceptionCopyright © 2015–2017 morimekta.net. All rights reserved.