Convenient method to get resolved {@link Config} based on String input.
197565
public Config getConfig(String configKeyStr) throws ConfigStoreFactoryDoesNotExistsException,
      ConfigStoreCreationException, VersionDoesNotExistException, URISyntaxException {
    return getConfig(configKeyStr, Optional.<Config>absent());
  }
1200486
def _get_value_from_config(self, section, name):
        """"""

        conf = configuration.get_config()

        try:
            value = conf.get(section, name)
        except (NoSectionError, NoOptionError, KeyError):
            return _no_value

        return self.parse(value)
292366
public static Config parseString(String s, ConfigParseOptions options) {
        return Parseable.newString(s, options).parse().toConfig();
    }
1361802
public InputStream resolveInput(String systemID) throws KNXMLException
	{
		try {
			try {
				final URL loc = new URL(systemID);
				return loc.openConnection().getInputStream();
			}
			catch (final MalformedURLException e) {
				return new FileInputStream(systemID);
			}
		}
		catch (final IOException e) {
			throw new KNXMLException("error opening " + systemID + ", " + e.getMessage());
		}
	}
487952
public static String resolvePath(String input)
    {
        if (null == input)
        {
            return input;
        }

        // matching for 2 groups match ${VAR_NAME} or $VAR_NAME
        Pattern pathPattern = Pattern.compile("\\$\\{(.+?)\\}");
        Matcher matcherPattern = pathPattern.matcher(input); // get a matcher
                                                             // object
        StringBuffer sb = new StringBuffer();
        EnvironmentConfiguration config = new EnvironmentConfiguration();
        SystemConfiguration sysConfig = new SystemConfiguration();

        while (matcherPattern.find())
        {

            String confVarName = matcherPattern.group(1) != null ? matcherPattern.group(1) : matcherPattern.group(2);
            String envConfVarValue = config.getString(confVarName);
            String sysVarValue = sysConfig.getString(confVarName);

            if (envConfVarValue != null)
            {

                matcherPattern.appendReplacement(sb, envConfVarValue);

            }
            else if (sysVarValue != null)
            {

                matcherPattern.appendReplacement(sb, sysVarValue);

            }
            else
            {
                matcherPattern.appendReplacement(sb, "");
            }
        }
        matcherPattern.appendTail(sb);
        return sb.toString();
    }
1069089
private MethodConfig getMethodConfig(String methodName) {
        if (methods == null) {
            return null;
        }
        return methods.get(methodName);
    }
1303550
@SuppressWarnings("unchecked")
    public <T> T getOptionValue(String name)
    {
        return (T) configurationOptions.get(name);
    }
1206238
public Config load() {

        ConfigResolveOptions resolveOptions = getResolveOptions();
        HashMapBindings bindings = this.bindings;
        Config config = emptyConfig();

        for (int i = 0; i < 2; i++) {

            config = emptyConfig();

            for (ConfigSource source
                    : sources.fromHighestToLowestPrecedence()) {

                config = config.withFallback(source.load(bindings));
            }

            config = config.resolve(resolveOptions);
            bindings = bindings.set(Config.class, config);
        }

        return config;
    }
53812
public static ConfigurationOptionBuilder<Collection<String>> stringsOption() {
		return new ConfigurationOptionBuilder<Collection<String>>(SetValueConverter.STRINGS_VALUE_CONVERTER, Collection.class)
				.defaultValue(Collections.<String>emptySet());
	}
158330
public InputStream openConfig(String name) {
        InputStream is = null;
        String configPath = configHome + "/" + name;

        try {
            return FileUtils.readResource(configPath);
        } catch (Throwable e) {
            LOG.debug("Config " + name + " (" + configPath + ") not found", e);
        }

        return is;
    }
836978
static String resolveVariables(String string) {
      if (string == null) {
         return null;
      }

      String rval = string;
      Matcher m = STRING_SUBSTITUTION.matcher(string);
      while (m.find()) {
         if (getInstance().properties.containsKey(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), get(m.group(1)).asString());
         } else if (System.getProperties().contains(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), System.getProperties().get(m.group(1)).toString());
         } else if (System.getenv().containsKey(m.group(1))) {
            rval = rval.replaceAll(Pattern.quote(m.group(0)), System.getenv().get(m.group(1)));
         }
      }
      return rval;
   }
832837
protected Object resolveProviderConfig(String exp, Map<String, ? extends Object> contextMap, LaContainer container,
            Class<?> resultType) {
        if (exp.startsWith(PROVIDER_GET) && exp.endsWith(METHOD_MARK) && exp.contains(".") && !exp.contains("\"")) {
            final String[] tokens = exp.split("\\.");
            if (tokens.length > 1) {
                Object component = null;
                BeanDesc beanDesc = null;
                for (String prop : tokens) {
                    if (prop.endsWith(METHOD_MARK)) { // method
                        if (component == null) { // e.g. getJdbcUrl() only
                            break;
                        }
                        final String methodName = prop.substring(0, prop.length() - METHOD_MARK.length());
                        component = beanDesc.invoke(component, methodName, (Object[]) null);
                        beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                    } else { // component or property
                        if (beanDesc == null) { // first element
                            if (container.hasComponentDef(prop)) { // component
                                component = container.getComponent(prop);
                                beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                            } else {
                                break;
                            }
                        } else { // next elements, property
                            final PropertyDesc propertyDesc = beanDesc.getPropertyDesc(prop);
                            if (propertyDesc != null) {
                                component = propertyDesc.getValue(component);
                                beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                            } else {
                                break;
                            }
                        }
                    }
                }
                if (component != null) {
                    return component;
                }
            }
        }
        return null;
    }
52830
private <T extends AnnotatedElement> Map<T, PropertyInfo> resolveConfig(String keyPrefix, T element,
                                                                            Set<Class> resolvedConfigs) {
        Map<T, PropertyInfo> result = new HashMap<>();
        if (!element.isAnnotationPresent(Config.class)) {
            return result;
        }
        String prefix = concat(keyPrefix, element.getAnnotation(Config.class).prefix());

        Class<?> returnType = getValueType(element);
        checkRecursiveConfigs(resolvedConfigs, returnType);
        resolvedConfigs.add(returnType);

        Object proxy = populate(prefix, returnType, resolvedConfigs);
        result.put(element, new PropertyInfo(proxy));
        return result;
    }
412318
private static List<ConfigPropType> inputProperties(String classname, BufferedReader in, boolean supportRequired)
         throws IOException
   {
      List<ConfigPropType> props = new ArrayList<>();
      Set<String> propsNamesSet = new HashSet<>();
      while (true)
      {
         System.out.println(rb.getString(classname + ".config.properties") + " " +
               rb.getString("confirm.quit") + ": ");
         String name;
         do
         {
            System.out.print("    " + rb.getString("config.properties.name") + ": ");
            name = in.readLine();
            if (name == null || name.equals(""))
               break;
            if (propsNamesSet.contains(name))
            {
               System.out.println("    " + rb.getString("config.properties.name.repeat"));
            }
            if (!Pattern.matches(CLASS_NAME_PATTERN, name) || BasicType.isBasicType(name) || BasicType
                  .isPrimitiveType(name))
            {
               System.out.println("    " + rb.getString("config.properties.name.validated"));
            }
         } while (propsNamesSet.contains(name) || !Pattern.matches(CLASS_NAME_PATTERN, name) || BasicType
               .isBasicType(name) || BasicType.isPrimitiveType(name));

         if (name == null || name.equals(""))
            break;
         propsNamesSet.add(name);

         String type;
         do
         {
            System.out.print("    " + rb.getString("config.properties.type") + ": ");
            type = in.readLine();

            if (!BasicType.isBasicType(type))
            {
               System.out.print(rb.getString("config.properties.type.tip") + ": [");
               System.out.println(BasicType.allBasicType() + "]");
               continue;
            }
            break;
         } while (true);

         String value;
         boolean required;
         do
         {
            System.out.print("    " + rb.getString("config.properties.value") + ": ");
            value = in.readLine();
            if (!type.equals("String"))
            {
               try
               {
                  Class<?> cs = Class.forName("java.lang." + type);
                  Method m = cs.getMethod("valueOf", String.class);
                  m.invoke(cs, value);
               }
               catch (Exception e)
               {
                  System.out.println("    " + rb.getString("config.properties.value.valid"));
                  continue;
               }
            }

            required = false;
            if (supportRequired)
            {
               System.out.print(
                     "    " + rb.getString("config.properties.required") + " " + rb.getString("yesno") + " [N]: ");
               String propRequired = in.readLine();
               if (propRequired == null)
                  required = false;
               else
               {
                  required = propRequired.equals("Y") || propRequired.equals("y") || propRequired.equals("Yes");
               }
            }
            System.out.println();
            break;
         } while (true);

         String lowerCaseFirstLetterName = name.substring(0, 1).toLowerCase(Locale.US);
         if (name.length() > 1)
         {
            lowerCaseFirstLetterName = lowerCaseFirstLetterName + name.substring(1);
         }
         ConfigPropType config = new ConfigPropType(lowerCaseFirstLetterName, type, value, required);
         props.add(config);
      }
      return props;
   }
801124
public static ConfigNode load(Map<String, String> input) {
        ConfigNode config = new ConfigNode();

        load(config, input);

        return config;
    }
12674
public static String processConfigValue(CharSequence text) {
    final String pv = evaluate(tokenReplaceSysProps(text));
    return (pv==null || pv.trim().isEmpty()) ? null : pv;
  }
745889
public static boolean getConfigBoolean(String key, boolean defaultValue) {
		return Boolean.parseBoolean(getConfigParam(key, Boolean.toString(defaultValue)));
	}