public class ProvidenceConfig extends Object implements ConfigResolver
| Constructor and Description |
|---|
ProvidenceConfig(TypeRegistry registry)
Make a non-strict config instance.
|
ProvidenceConfig(TypeRegistry registry,
net.morimekta.util.FileWatcher watcher,
boolean strict)
Make a config instance.
|
| Modifier and Type | Method and Description |
|---|---|
<M extends PMessage<M,F>,F extends PField> |
getConfig(File configFile)
Get config for the given file.
|
<M extends PMessage<M,F>,F extends PField> |
getConfig(File configFile,
M parent)
Get config for the given with parent.
|
<M extends PMessage<M,F>,F extends PField> |
resolveConfig(File configFile,
ConfigSupplier<M,F> parentConfig)
Resolve a config file like on config file includes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveConfigpublic ProvidenceConfig(TypeRegistry registry)
registry - The type registry used to find message and enum types.public ProvidenceConfig(@Nonnull TypeRegistry registry, @Nullable net.morimekta.util.FileWatcher watcher, boolean strict)
registry - The type registry used to find message and enum types.watcher - File watcher used to detect config file updates.strict - If the config should be parsed strictly.@Nonnull public <M extends PMessage<M,F>,F extends PField> ConfigSupplier<M,F> resolveConfig(@Nonnull File configFile, @Nullable ConfigSupplier<M,F> parentConfig) throws ProvidenceConfigException
ConfigResolverresolveConfig in interface ConfigResolverM - The message type.F - The message field type.configFile - The file to resolve.parentConfig - The parent config supplier if any.ProvidenceConfigException - If parsing of config failed.@Nonnull public <M extends PMessage<M,F>,F extends PField> M getConfig(@Nonnull File configFile) throws ProvidenceConfigException
M - The config message type.F - The config message field type.configFile - The file to read config for.ProvidenceConfigException - On config load failure.@Nonnull public <M extends PMessage<M,F>,F extends PField> M getConfig(@Nonnull File configFile, @Nonnull M parent) throws ProvidenceConfigException
M - The config message type.F - The config message field type.configFile - The file to read config for.parent - The designated parent config.ProvidenceConfigException - On config load failure.Copyright © 2015–2017 morimekta.net. All rights reserved.