public class ProvidenceConfig extends Object
| Constructor and Description |
|---|
ProvidenceConfig(TypeRegistry registry)
Make a non-strict config instance.
|
ProvidenceConfig(TypeRegistry registry,
boolean strict)
Make a config instance.
|
| 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 configFile,
File parentFile)
Load providence config from the given file, and with a defined parent
config.
|
<M extends PMessage<M,F>,F extends PField> |
getSupplierWithParent(File configFile,
File parentFile,
PMessageDescriptor<M,F> descriptor)
Load providence config from the given file, and with a defined parent
config.
|
<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.
|
void |
reload(File file)
Trigger reloading of the given file, and run recursively up through dependencies.
|
public ProvidenceConfig(TypeRegistry registry)
registry - The type registry used to find message and enum types.public ProvidenceConfig(TypeRegistry registry, boolean strict)
registry - The type registry used to find message and enum types.strict - If the config should be parsed strictly.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> getSupplierWithParent(File configFile, File parentFile) throws IOException
M - The message type.F - The message field type.configFile - The file to load.parentFile - The parent config file.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 configFile, File parentFile, PMessageDescriptor<M,F> descriptor) throws IOException
M - The message type.F - The message field type.configFile - The file to load.parentFile - The parent config file.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, 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 void reload(File file) throws IOException
file - The file that may need to be reloaded.IOExceptionCopyright © 2015–2017 morimekta.net. All rights reserved.