Package com.typesafe.config

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


  protected static Map<String, String> configuration() {
    Map<String, String> conf = new HashMap<String, String>();
    Config config = ConfigFactory.parseFileAnySyntax(new File(
        "conf/application.conf"));
    config = config.resolve();
    for (Entry<String, ConfigValue> entry : config.entrySet()) {
      ConfigValue value = entry.getValue();
      conf.put(entry.getKey(), value.unwrapped().toString());
    }
    conf.putAll(inMemoryDatabase());
    return conf;
View Full Code Here


                        try {
                            T objectShell = singleKeyType.newInstance();
                            Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                            // do not merge objects between global defaults and user defaults (incl. alias defaults)
                            ConfigObject mergedDefaults = aliasDefaults;
                            for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                if (!mergedDefaults.containsKey(pair.getKey())) {
                                    mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                }
                            }
                            ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
View Full Code Here

                            try {
                                T objectShell = singleKeyType.newInstance();
                                Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                                // do not merge objects between global defaults and user defaults (incl. alias defaults)
                                ConfigObject mergedDefaults = aliasDefaults;
                                for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                    if (!mergedDefaults.containsKey(pair.getKey())) {
                                        mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                    }
                                }
                                ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
View Full Code Here

                            try {
                                T objectShell = singleKeyType.newInstance();
                                Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                                // do not merge objects between global defaults and user defaults (incl. alias defaults)
                                ConfigObject mergedDefaults = aliasDefaults;
                                for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                    if (!mergedDefaults.containsKey(pair.getKey())) {
                                        mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                    }
                                }
                                ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
View Full Code Here

                        try {
                            T objectShell = singleKeyType.newInstance();
                            Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                            // do not merge objects between global defaults and user defaults (incl. alias defaults)
                            ConfigObject mergedDefaults = aliasDefaults;
                            for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                if (!mergedDefaults.containsKey(pair.getKey())) {
                                    mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                }
                            }
                            ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
View Full Code Here

                                                                prober, jobDeployedMessageFormat);

    if (config.hasPath("env")) {
      final Config env = config.getConfig("env");

      for (final Entry<String, ConfigValue> entry : env.entrySet()) {
        builder.env(entry.getKey(), entry.getValue().unwrapped());
      }
    }

    if (config.hasPath("name")) {
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.