Gets all optional dependencies by their name.

@param name the dependency name to locate.
@return a list with found dependencies or empty list of no dependencies was
found.
481743
public List<Object> getOptional(String name) {
		Object locator = find(name);
		return locator != null ? _references.getOptional(locator) : null;
	}
375537
def get_one_optional(self, name):
        
        locator = self._locate(name)
        return self._references.get_one_optional(locator) if locator != None else None
568975
public List<DependencyStructure> getAllDependencies() {
    List<DependencyStructure> deps = Lists.newArrayList();
    if (!isTerminal()) {
      deps.addAll(left.getAllDependencies());
      deps.addAll(right.getAllDependencies());
    }
    deps.addAll(dependencies);
    return deps;
  }
246267
public Collection<Object> getAll(String name) {
    Object value = get(name);
    if (value == null) {
      return Collections.emptySet();
    }
    if (value instanceof Collection<?>) {
      @SuppressWarnings("unchecked")
      Collection<Object> collectionValue = (Collection<Object>) value;
      return Collections.unmodifiableCollection(collectionValue);
    }
    return Collections.singleton(value);
  }
80248
public Collection<Method> getAllMethods(String name) {
        final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name);
        if (nameMap == null) {
            return Collections.emptySet();
        }
        final Collection<Method> methods = new ArrayList<Method>();
        for (Map<Class<?>, Method> map : nameMap.values()) {
            methods.addAll(map.values());
        }
        return methods;
    }
1276321
private Optional<ResourceBundle> getResourceBundle(final String name) {
		try {
			LOGGER.debug("Resource bundle: " + name);
			return Optional.of(getBundle(name,
				new ResourceBundleControl(getResourceBundleCharset())));
		} catch (final MissingResourceException ex) {
			LOGGER.debug("No resource bundle could be determined: " + ex.getMessage());
			return Optional.empty();
		}
	}
407066
public Optional<SectionHeader> getSectionHeaderByName(String name) {
        for (SectionHeader header : headers) {
            if (header.getName().equals(name)) {
                return Optional.of(header);
            }
        }
        return Optional.absent();
    }
706692
function getDependents(dependencyName) {
  return Object.values(allPackages).filter(({info: pkg}) => {
    return (
      pkg.dependencies &&
      Object.keys(pkg.dependencies).indexOf(dependencyName) !== -1
    );
  });
}
672417
@Override
    public List<String> getDependencies() {
        List<String> dependencies = new ArrayList<String>();
        if (container.getSingle("dependencies") != null) {
            for (Node dep : container.getSingle("dependencies").get("dependency")) {
                dependencies.add(dep.getText());
            }
        }
        return dependencies;
    }
433585
private void getAllDependents(Set<PathEntry> result, String name) {
        Set<String> depNames = dependenctRelativePaths.get(name);
        if (depNames == null) {
            return;
        }
        for (String dep : depNames) {
            PathEntry entry = pathEntries.get(dep);
            if (entry != null) {
                result.add(entry);
                getAllDependents(result, dep);
            }
        }
    }
207831
async function fetchAllDependents (name) {
  let pkg = await npm.getLatest(name)
  let deps = Object.keys(pkg.dependencies || {})
  if (!deps.length) return []
  let promises = []
  for (let dep of deps) {
    promises.push(fetchAllDependents(dep))
  }
  for (let subdeps of await Promise.all(promises)) {
    deps = deps.concat(subdeps)
  }
  return _.uniq(deps.sort())
}
496638
public final Package<DependsOn> findAllowedByName(final String packageName) {
        final List<Package<DependsOn>> list = getAllowed();
        for (final Package<DependsOn> pkg : list) {
            if (pkg.getName().equals(packageName)) {
                return pkg;
            }
        }
        return null;
    }
866726
public static List<String> get(String name, @Nullable List<String> values) {
    return Args.stringsWithEq(name, values);
  }
420060
public Enumeration<String> getHeaders(String name)
  {
    String value = header(name);
    
    if (value == null) {
      return Collections.emptyEnumeration();
    }

    ArrayList<String> list = new ArrayList<String>();
    list.add(value);

    return Collections.enumeration(list);
  }
318014
public Enumeration<URL> getResources(String name) throws IOException {
		if (name.length() == 0) return null;
		if (name.charAt(0) == '/') name = name.substring(1);
		CompoundCollection<URL> list = new CompoundCollection<>();
    	for (int i = 0; i < libs.size(); i++) {
    		AbstractClassLoader cl = libs.get(i);
    		Iterable<URL> urls = cl.getResourcesURL(name);
   			if (urls != null) list.add(urls);
    	}
    	list.add(AppClassLoader.class.getClassLoader().getResources(name));
        return list.enumeration();
	}
876526
public final List<MethodInfo> getMethods(String name) {
    List<MethodInfo> namedMethod = methods.get(name);
    if (null == namedMethod) return Collections.emptyList();
    else return namedMethod;
  }
238692
@Override
  public Collection<String> getNames(final String name) throws OptionsException {
    if (useSystemwideValues) {
      return getNames(optionsRoot, makePathElements(name), -1);
    }

    return getNames(localOptionsRoot, makePathElements(name), -1);
  }