Package com.crashnote.external.config

Examples of com.crashnote.external.config.ConfigParseable.options()


    static ConfigObject fromBasename(final NameSource source, final String name, final ConfigParseOptions options) {
        ConfigObject obj;
        if (name.endsWith(".conf") || name.endsWith(".json") || name.endsWith(".properties")) {
            final ConfigParseable p = source.nameToParseable(name, options);

            obj = p.parse(p.options().setAllowMissing(options.getAllowMissing()));
        } else {
            final ConfigParseable confHandle = source.nameToParseable(name + ".conf", options);
            final ConfigParseable jsonHandle = source.nameToParseable(name + ".json", options);
            final ConfigParseable propsHandle = source.nameToParseable(name + ".properties", options);
            boolean gotSomething = false;
View Full Code Here


                }
            }

            if (syntax == null || syntax == ConfigSyntax.PROPERTIES) {
                try {
                    final ConfigObject parsed = propsHandle.parse(propsHandle.options()
                            .setAllowMissing(false).setSyntax(ConfigSyntax.PROPERTIES));
                    obj = obj.withFallback(parsed);
                    gotSomething = true;
                } catch (ConfigException.IO e) {
                    failMessages.add(e.getMessage());
View Full Code Here

    static ConfigObject fromBasename(final NameSource source, final String name, final ConfigParseOptions options) {
        ConfigObject obj;
        if (name.endsWith(".conf") || name.endsWith(".json") || name.endsWith(".properties")) {
            final ConfigParseable p = source.nameToParseable(name, options);

            obj = p.parse(p.options().setAllowMissing(options.getAllowMissing()));
        } else {
            final ConfigParseable confHandle = source.nameToParseable(name + ".conf", options);
            final ConfigParseable jsonHandle = source.nameToParseable(name + ".json", options);
            final ConfigParseable propsHandle = source.nameToParseable(name + ".properties", options);
            boolean gotSomething = false;
View Full Code Here

                }
            }

            if (syntax == null || syntax == ConfigSyntax.PROPERTIES) {
                try {
                    final ConfigObject parsed = propsHandle.parse(propsHandle.options()
                            .setAllowMissing(false).setSyntax(ConfigSyntax.PROPERTIES));
                    obj = obj.withFallback(parsed);
                    gotSomething = true;
                } catch (ConfigException.IO e) {
                    failMessages.add(e.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.