Extract the various types of objects from the full configuration into
separate, discrete groupings.

@param config
@return Map<String,Map<String,String[]>>
435152
private static Map<String, Map<String, String[]>> extractConfig(Map<String, Object> config) {
        Map<String, String[]> factories = new HashMap<String, String[]>();
        Map<String, String[]> channels = new HashMap<String, String[]>();
        Map<String, String[]> chains = new HashMap<String, String[]>();
        Map<String, String[]> groups = new HashMap<String, String[]>();
        Map<String, String[]> endpoints = new HashMap<String, String[]>();

        for (Map.Entry<String, Object> entry : config.entrySet()) {
            String key = entry.getKey();
            String name;
            if (key.startsWith(CHANNEL_PREFIX)) {
                name = key.substring(CHANNEL_PREFIX.length()).trim();
                if (0 != name.length()) {
                    channels.put(name, (String[]) entry.getValue());
                }
            } else if (key.startsWith(CHAIN_PREFIX)) {
                name = key.substring(CHAIN_PREFIX.length()).trim();
                if (0 != name.length()) {
                    chains.put(name, (String[]) entry.getValue());
                }
            } else if (key.startsWith(GROUP_PREFIX)) {
                name = key.substring(GROUP_PREFIX.length()).trim();
                if (0 != name.length()) {
                    groups.put(name, (String[]) entry.getValue());
                }
            } else if (key.startsWith(FACTORY_PREFIX)) {
                name = key.substring(FACTORY_PREFIX.length()).trim();
                if (0 != name.length()) {
                    factories.put(name, (String[]) entry.getValue());
                }
            } else if (key.startsWith(ENDPOINT_PREFIX)) {
                name = key.substring(ENDPOINT_PREFIX.length()).trim();
                if (0 != name.length()) {
                    endpoints.put(name, (String[]) entry.getValue());
                }
            }
        }
        Map<String, Map<String, String[]>> rc = new HashMap<String, Map<String, String[]>>();
        rc.put("factories", factories);
        rc.put("channels", channels);
        rc.put("chains", chains);
        rc.put("groups", groups);
        rc.put("endpoints", endpoints);
        return rc;
    }
797422
@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map getMap(NodeConfig nodeConfig) {
		Map map = new HashMap();
		List<AttributeConfig> attributes = nodeConfig.getAttribute();
		map.putAll(getAttribute(attributes));

		List<NodeConfig> childrenNodes = nodeConfig.getChildrenNodes();
		if (childrenNodes != null && childrenNodes.size() > 0) {
			for (NodeConfig childNode : childrenNodes) {
				String name = childNode.getName();
				Object value = childNode.getValue();

				if (childNode.hasChildren()) {
					Map childNodeMap = getMap(childNode);
					map.put(name, addToList(map.get(name), childNodeMap));
				} else {
					if (childNode.hasAttributes()) {
						Map attributeMap = new HashMap();
						attributeMap = getAttribute(childNode.getAttribute());
						if (attributeMap.size() > 0) {
							if (value != null && value instanceof String) {
								attributeMap.put("nodeValue", value);
							}
							value = attributeMap;
						}
					}
				}

				if (value != null) {
					map.put(name, addToList(map.get(name), value));
				}
			}
		}
		if (nodeConfig.getName() != null && nodeConfig.getValue() != null) {
			map.put(nodeConfig.getName(), nodeConfig.getValue());
		}
		return map;
	}
164491
public Map<String, Object> getAllConfig() {
        Map<String, Object> map = config.getAll();
        map.put("version", version);
        map.put("buildDate", buildDate);
        return map;
    }
963119
public static function config($config = null)
	{
		if(is_array($config)) {

            # Setting Configurations
			static::$config = $config + static::$config;
			$pathWithoutTrailingSlash = rtrim(static::$config['directory'], '/');
			static::$config['directory'] = $pathWithoutTrailingSlash.'/';

		} elseif(is_string($config)) {

            # Getting Single Config item
			return isset(static::$config[$config]) ? static::$config[$config] : null;

		} elseif(!$config) {

            # Getting All configurations
			return static::$config;
		} else {
			throw new CacheException('Invalid parameter provided for Cache::config()');
		}
	}
1170654
private Map<String, String> toConfigurationItemMap(Set<ConfigurationItem> configurationItems) {
        Map<String, String> map = new HashMap<>(configurationItems.size());

        for (ConfigurationItem configurationItem : configurationItems) {
            map.put(configurationItem.getKey(), configurationItem.getValue());
        }

        return map;
    }
47616
public function parseConfiguration($config)
    {
        if (is_string($config)) {
            $config = ['url' => $config];
        }

        $url = $config['url'] ?? null;

        $config = Arr::except($config, 'url');

        if (! $url) {
            return $config;
        }

        $parsedUrl = $this->parseUrl($url);

        return array_merge(
            $config,
            $this->getPrimaryOptions($parsedUrl),
            $this->getQueryOptions($parsedUrl)
        );
    }
527168
public static Class<?>[] getClasses(Collection<Configurations> configurations) {
		List<Configurations> ordered = new ArrayList<>(configurations);
		ordered.sort(COMPARATOR);
		List<Configurations> collated = collate(ordered);
		LinkedHashSet<Class<?>> classes = collated.stream()
				.flatMap(Configurations::streamClasses)
				.collect(Collectors.toCollection(LinkedHashSet::new));
		return ClassUtils.toClassArray(classes);
	}
67653
public java.util.Map<java.lang.String, alluxio.grpc.ConfigProperties> getPathConfigsMap() {
    return internalGetPathConfigs().getMap();
  }
1132624
public static Map<String, String> parseAttributes(final Configuration config) {
		Map<String, String> parameters = new HashMap<>();
		for (String key : new IterableIterator<>(config.getKeys())) {
			String value = config.getString(key);
			parameters.put(key, value);
		}
		return parameters;
	}
731922
public static List<URI> uris(AbstractConfig config, String key) {
    List<URI> result = new ArrayList<>();
    List<String> input = config.getList(key);
    for (String s : input) {
      result.add(uri(key, s));
    }
    return ImmutableList.copyOf(result);
  }
493691
protected function getGauges($config)
    {
        if (null === $this->gauges) {
            $this->gauges = array();

            foreach ($config as $path => $details) {
                $className = $details['class'];
                if (class_exists($className)) {
                    $reflection = new \ReflectionClass($className);

                    if ($reflection->getConstructor()) {
                        $this->gauges[$path] = $reflection->newInstanceArgs(
                            $details['arguments'] ? $details['arguments'] : array());
                    }
                    else {
                        $this->gauges[$path] = $reflection->newInstance();
                    }
                }
                else {
                    throw new \RuntimeException(sprintf(
                        'Class does not exists %s'
                    ), $className);
                }
            }

            if (empty($this->gauges)) {
                throw new \RuntimeException(
                    sprintf('No gauges found for provided string %s', $input->getArgument('gauges-class'))
                );
            }
        }

        return $this->gauges;
    }
1246203
@Override
  public Map<ConfigKeyPath, Config> getOwnConfigs(Collection<ConfigKeyPath> configKeys) {
    Collection<ConfigKeyPath> configKeysNotInCache = new ArrayList<>();
    Map<ConfigKeyPath, Config> result = new HashMap<>();
    for(ConfigKeyPath configKey: configKeys){
      Config cachedValue = this.ownConfigCache.getIfPresent(configKey);
      if(cachedValue==null){
        configKeysNotInCache.add(configKey);
      }
      else{
        result.put(configKey, cachedValue);
      }
    }

    // for ConfigKeyPath which are not in cache
    if(configKeysNotInCache.size()>0){
      Map<ConfigKeyPath, Config> configsFromFallBack = this.valueFallback.getOwnConfigs(configKeysNotInCache);
      this.ownConfigCache.putAll(configsFromFallBack);
      result.putAll(configsFromFallBack);
    }

    return result;
  }
240470
private static Map<String, String[]> getSynonyms(InputStream config) throws IOException
   {
      try
      {
         Map<String, String[]> synonyms = new HashMap<String, String[]>();
         Properties props = new Properties();
         props.load(config);
         Iterator<Map.Entry<Object, Object>> it = props.entrySet().iterator();
         while (it.hasNext())
         {
            Map.Entry<Object, Object> e = it.next();
            String key = (String)e.getKey();
            String value = (String)e.getValue();
            addSynonym(key, value, synonyms);
            addSynonym(value, key, synonyms);
         }
         return synonyms;
      }
      catch (Exception e)
      {
         throw Util.createIOException(e);
      }
   }
916627
@SuppressWarnings("unchecked")
    public static <T> List<? extends T> getObjectList(Config config, String path, Class<T> clazz) {
        List<? extends Object> objList = getObjectList(config, path);
        if (objList == null) {

        }
        if (objList.size() == 0) {
            return Collections.emptyList();
        }
        return clazz.isAssignableFrom(objList.get(0).getClass()) ? (List<? extends T>) objList
                : null;
    }
1061631
public function getConfigItems($config) {
		$config = strtolower($config);
		return isset($this->config[$config]) ? $this->config[$config] : array();
	}
538089
public List<ConfigPropertyType<ConnectionDefinitionType<T>>> getAllConfigProperty()
   {
      List<ConfigPropertyType<ConnectionDefinitionType<T>>> list = new ArrayList<ConfigPropertyType<ConnectionDefinitionType<T>>>();
      List<Node> nodeList = childNode.get("config-property");
      for(Node node: nodeList)
      {
         ConfigPropertyType<ConnectionDefinitionType<T>>  type = new ConfigPropertyTypeImpl<ConnectionDefinitionType<T>>(this, "config-property", childNode, node);
         list.add(type);
      }
      return list;
   }
763097
public static function parseCurlConfig($config)
    {
        $curlOptions = array();
        foreach ($config as $key => $value) {
            if (is_string($key) && defined($key)) {
                // Convert constants represented as string to constant int values
                $key = constant($key);
            }
            if (is_string($value) && defined($value)) {
                $value = constant($value);
            }
            $curlOptions[$key] = $value;
        }

        return $curlOptions;
    }