public class ConfigParser extends Object
| Constructor and Description |
|---|
ConfigParser(net.morimekta.providence.types.TypeRegistry registry,
ContentResolver contentResolver,
Consumer<ConfigWarning> warningHandler,
boolean strict)
Create a providence config parser instance.
|
| Modifier and Type | Method and Description |
|---|---|
<M extends net.morimekta.providence.PMessage<M>> |
parseConfig(Path configFile,
M parent)
Parse a providence config into a message.
|
public ConfigParser(net.morimekta.providence.types.TypeRegistry registry,
ContentResolver contentResolver,
Consumer<ConfigWarning> warningHandler,
boolean strict)
registry - The type registry used.contentResolver - Content resolver.warningHandler - Handle parse warnings.strict - If config should be parsed and handled strictly.@Nonnull public <M extends net.morimekta.providence.PMessage<M>> net.morimekta.util.Pair<M,Set<String>> parseConfig(@Nonnull Path configFile, @Nullable M parent) throws ConfigException
M - The config message type.configFile - The config file to be parsed.parent - The parent config message.ConfigException - If parsing failed.Copyright © 2015–2020 morimekta.net. All rights reserved.