Package com.typesafe.config

Examples of com.typesafe.config.Config.root()


                                               "failed to get a concrete, working class", ex);
        }
        Class vc = (Class) field.getGenericTypes()[1];
        boolean va = field.isMapValueArray();
        Config configMap = config.getConfig(field.getName());
        for (Map.Entry<String, ConfigValue> entry : configMap.root().entrySet()) {
            String key = entry.getKey();
            if (field.isInterned()) {
                key = key.intern();
            }
            // control for map keys that might have unexpected behavior when parsed as paths
View Full Code Here


    /** given a class, instance, and config.. turn config values into field values */
    private void populateObjectFields(CodableClassInfo classInfo, Object objectShell,
                                              Config config) {
        Config fieldDefaults = classInfo.getFieldDefaults();
        if (objectShell instanceof ConfigCodable) {
            ((ConfigCodable) objectShell).fromConfigObject(config.root(), fieldDefaults.root());
            return;
        }
        Collection<String> unusedKeys = new HashSet<>(config.root().keySet());
        for (CodableFieldInfo field : classInfo.values()) {
            if (field.isWriteOnly()) {
View Full Code Here

    public PluginRegistry(Config config) {
        Config defaultPluginMapSettings = config.getConfig(PLUGIN_DEFAULTS_PATH);
        String pluginPath = config.getString(PLUGINS_PATH_PATH);
        Config pluginConfigs = config.getConfig(pluginPath);

        Set<String> categories = pluginConfigs.root().keySet();
        Map<String, PluginMap> pluginsFromConfig = new HashMap<>(categories.size());
        for (String category : categories) {
            Config pluginConfig = pluginConfigs.getConfig(category)
                                               .withFallback(defaultPluginMapSettings);
            PluginMap pluginMap = new PluginMap(category, pluginConfig);
View Full Code Here

                                               "failed to get a concrete, working class", ex);
        }
        Class vc = (Class) field.getGenericTypes()[1];
        boolean va = field.isMapValueArray();
        Config configMap = config.getConfig(field.getName());
        for (String key : configMap.root().keySet()) {
            if (field.isInterned()) {
                key = key.intern();
            }
            if (va) {
                map.put(key, hydrateArray(vc, key, configMap));
View Full Code Here

    final Config config = root.getConfig("form-field-bundle");

    final Map<String, String> props = new HashMap<String, String>();

    final Set<String> keySet = config.root().keySet();

    for (final String configId : keySet) {

      final Config configField = config.getConfig(configId);
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.