Scans the class path and returns a Set containing all structr
modules.

@return a Set of active module names
173437
private Set<String> getResourcesToScan() {

		final String classPath    = System.getProperty("java.class.path");
		final Set<String> modules = new TreeSet<>();
		final Pattern pattern     = Pattern.compile(".*(structr).*(war|jar)");
		final Matcher matcher     = pattern.matcher("");

		for (final String jarPath : classPath.split("[".concat(pathSep).concat("]+"))) {

			final String lowerPath = jarPath.toLowerCase();

			if (lowerPath.endsWith(classesDir) || lowerPath.endsWith(testClassesDir)) {

				modules.add(jarPath);

			} else {

				final String moduleName = lowerPath.substring(lowerPath.lastIndexOf(pathSep) + 1);

				matcher.reset(moduleName);

				if (matcher.matches()) {

					modules.add(jarPath);
				}

			}

		}

		for (final String resource : Services.getInstance().getResources()) {

			final String lowerResource = resource.toLowerCase();

			if (lowerResource.endsWith(".jar") || lowerResource.endsWith(".war")) {

				modules.add(resource);
			}

		}

		return modules;
	}
819795
Map<String, JSModule> getModulesByName() {
    Map<String, JSModule> result = new HashMap<>();
    for (JSModule m : modules) {
      result.put(m.getName(), m);
    }
    return result;
  }
427241
private List<String> extractIndexNames() {

        List<String> modules = new ArrayList<String>();

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getParamIndexes())) {
            StringTokenizer tok = new StringTokenizer(getParamIndexes(), ",");
            while (tok.hasMoreTokens()) {
                String module = tok.nextToken();
                modules.add(module);
            }
        }
        return modules;
    }
846116
public Collection<String> getNames() {
		Collection<String> names = new HashSet<String>();
		for (InitParam initParam : initParams) {
			names.add(initParam.getName());
		}
		return names;
	}
1223982
public static List<AModuleModules> getModules(List<INode> ast)
	{
		List<AModuleModules> modules = new LinkedList<>();

		for (INode n : ast)
		{
			if (n instanceof AModuleModules)
			{
				modules.add((AModuleModules) n);
			}
		}

		return modules;
	}
13539
public Map getPathClasses()
	{
		if (m_pathClasses.isEmpty())
		{
			if (m_parentCriteria == null)
			{
				if (m_query == null)
				{
					return m_pathClasses;
				}
				else
				{
					return m_query.getPathClasses();
				}
			}
			else
			{
				return m_parentCriteria.getPathClasses();
			}
		}
		else
		{
			return m_pathClasses;
		}
	}
773403
private Set<String> getControllerPaths(Class<?> controllerClass) {
        Set<String> parentPaths = Collections.emptySet();
        if (controllerClass.getSuperclass() != null) {
            parentPaths = getControllerPaths(controllerClass.getSuperclass());
        }

        Set<String> paths = new LinkedHashSet<>();
        Path controllerPath = controllerClass.getAnnotation(Path.class);

        if (controllerPath != null && controllerPath.value().length > 0) {
            if (parentPaths.isEmpty()) {
                // add all controller paths
                paths.addAll(Arrays.asList(controllerPath.value()));
            } else {
                // create controller paths based on the parent paths
                for (String parentPath : parentPaths) {
                    for (String path : controllerPath.value()) {
                        paths.add(StringUtils.removeEnd(parentPath, "/") + "/" + StringUtils.removeStart(path, "/"));
                    }
                }
            }
        } else {
            // add all parent paths
            paths.addAll(parentPaths);
        }

        return paths;
    }
848910
@Pure
	public List<File> getClassPath() {
		if (this.classpath == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.classpath);
	}
1250343
protected Collection<String> getKeys() {
		Collection<String> result = Collections.emptySet();
		if (_moduleBuilds != null) {
			result = Collections.unmodifiableCollection(_moduleBuilds.keySet());
		}
		return result;
	}
833665
public ModuleInfoList getModuleInfo() {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo) {
            throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo() before #scan()");
        }
        return new ModuleInfoList(moduleNameToModuleInfo.values());
    }
817268
public Set<String> getActiveCategorySet() {
        Set<String> result = new TreeSet<>();
        result.addAll(this.activeBugCategorySet);
        return result;
    }
869318
static String getClasspathClassFileNames() {
        String classpath = System.getProperty("java.class.path");
        String[] pathParts = classpath.split(File.pathSeparator);

        Set<String> classes = new TreeSet<String>();

        for (String part : pathParts) {
            processPathPart(part, classes);
        }

        StringBuilder sb = new StringBuilder();
        for (String className : classes) {
            sb.append(className).append('\n');
        }

        return sb.toString();
    }
761918
private List<File> scanFileSets() {
        final List<File> list = new ArrayList<File>();

        for (int i = 0; i < fileSets.size(); i++) {
            FileSet fs = fileSets.get(i);
            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
            ds.scan();

            String[] names = ds.getIncludedFiles();
            for (String element : names) {
                list.add(new File(ds.getBasedir(), element));
            }
        }

        return list;
    }
1297706
public Set<String> keySet() {
        Set<String> keys = new HashSet<String>();
        for (PathSignature path : pathToIndex.keySet())
            keys.add(path.toString());
        return keys;
    }
597662
public Set<String> getNames() {
        if (parent == null) {
            return getLocalNames();
        }
        Set<String> result = new TreeSet<>();
        result.addAll(parent.getNames());
        result.addAll(getLocalNames());
        return result;
    }
615517
@Override
    public Set<Class<?>> getComponents() {
        Set<Class<?>> set = new HashSet<>();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();

        Consumer<JsonArray> reader = array -> {
            if (array != null && array.size() > 0) {
                for (int i = 0; i < array.size(); i++) {
                    try {
                        set.add(cl.loadClass(array.getString(i)));
                    } catch (ClassNotFoundException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        };

        JsonArray features = config.getJsonArray(CONFIG_FEATURES, null);
        JsonArray components = config.getJsonArray(CONFIG_COMPONENTS, null);

        reader.accept(features);
        reader.accept(components);

        return set;
    }
966980
public List<Scan<BeansDescriptor>> getAllScan()
   {
      List<Scan<BeansDescriptor>> list = new ArrayList<Scan<BeansDescriptor>>();
      List<Node> nodeList = model.get("scan");
      for (Node node : nodeList)
      {
         Scan<BeansDescriptor> type = new ScanImpl<BeansDescriptor>(this, "scan", model, node);
         list.add(type);
      }
      return list;
   }