Package com.typesafe.config

Examples of com.typesafe.config.ConfigValue.valueType()


                continue;
            }
            ConfigValue configValue = config.root().get(label);
            if (configValue.valueType() != ConfigValueType.STRING) {
                throw new ConfigException.WrongType(configValue.origin(), label,
                                                    "STRING", configValue.valueType().toString());
            }
            String className = (String) configValue.unwrapped();
            try {
                Class<?> foundClass = findAndValidateClass(className);
                mutableMap.put(label, foundClass);
View Full Code Here


        String fieldName = field.getName();
        if ((config == null) || !config.hasPath(fieldName)) {
            return null;
        } else if (field.isArray()) { // check CodableFieldInfo instead of expectedType
            ConfigValue configValue = config.root().get(fieldName);
            if ((configValue.valueType() != ConfigValueType.LIST) &&
                field.autoArrayEnabled()) {
                Object singleArrayValue = hydrateField(expectedType, fieldName, config);
                Object wrappingArray    = Array.newInstance(expectedType, 1);
                Array.set(wrappingArray, 0, singleArrayValue);
                return wrappingArray;
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.