Iterates through all bundles to get the available {@link ScriptEngineFactory} classes

@return the names of the available ScriptEngineFactory classes
@throws IOException
345055
private List<String> findFactoryCandidates(BundleContext context) throws IOException {
        Bundle[] bundles = context.getBundles();
        List<String> factoryCandidates = new ArrayList<String>();
        for (Bundle bundle : bundles) {
            if (bundle == null) {
                continue;
            }
            if ("system.bundle".equals(bundle.getSymbolicName())) {
                continue;
            }
            Enumeration urls = bundle.findEntries("META-INF/services", "javax.script.ScriptEngineFactory", false);
            if (urls == null) {
                continue;
            }
            while (urls.hasMoreElements()) {
                URL u = (URL) urls.nextElement();
                BufferedReader reader = null;
                try {
                    reader = new BufferedReader(
                            new InputStreamReader(u.openStream(), "UTF-8"));
                    String line;
                    while ((line = reader.readLine()) != null) {
                        line = line.trim();
                        if (!line.startsWith("#") && line.length() > 0) {
                            factoryCandidates.add(line);
                        }
                    }
                } finally {
                    IOUtil.closeResource(reader);
                }
            }
        }

        // Add java built in JavaScript ScriptEngineFactory's
        addJavaScriptEngine(factoryCandidates);

        return factoryCandidates;
    }
79403
@SuppressWarnings("unchecked")
	protected Set<Class<? extends T>> findScriptClass(Set<Class<?>> clazzs)
			throws InstantiationException, IllegalAccessException {
		Set<Class<? extends T>> scriptClazzs = new HashSet<Class<? extends T>>();
		for (Class<?> clazz : clazzs) {
			if (IScript.class.isAssignableFrom(clazz)) {
				Class<T> scriptClazz = (Class<T>) clazz;
				scriptClazzs.add(scriptClazz);
			}
		}
		return scriptClazzs;
	}
836411
public static List<String> getAllClassNames() {
        List<String> result = new ArrayList<>();
        Iterator<String> pkgs = m_Cache.packages();
        while (pkgs.hasNext()) {
            String pkg = pkgs.next();
            if (pkg.startsWith("moa")) {
                Set<String> classnames = m_Cache.getClassnames(pkg);
                result.addAll(classnames);
            }
        }
        return result;
    }
919633
public List<ConnectionFactoryResourceType<WebAppDescriptor>> getAllConnectionFactory()
   {
      List<ConnectionFactoryResourceType<WebAppDescriptor>> list = new ArrayList<ConnectionFactoryResourceType<WebAppDescriptor>>();
      List<Node> nodeList = model.get("connection-factory");
      for(Node node: nodeList)
      {
         ConnectionFactoryResourceType<WebAppDescriptor>  type = new ConnectionFactoryResourceTypeImpl<WebAppDescriptor>(this, "connection-factory", model, node);
         list.add(type);
      }
      return list;
   }
1162770
public java.util.List<WorkspaceBundle> getBundles() {
        if (bundles == null) {
            bundles = new com.amazonaws.internal.SdkInternalList<WorkspaceBundle>();
        }
        return bundles;
    }
377846
public List<IfClassAvailable<Exclude<T>>> getAllIfClassAvailable()
   {
      List<IfClassAvailable<Exclude<T>>> list = new ArrayList<IfClassAvailable<Exclude<T>>>();
      List<Node> nodeList = childNode.get("if-class-available");
      for(Node node: nodeList)
      {
         IfClassAvailable<Exclude<T>>  type = new IfClassAvailableImpl<Exclude<T>>(this, "if-class-available", childNode, node);
         list.add(type);
      }
      return list;
   }
355592
public Class getTypeClass() {
        try {
            return Class.forName(s.getContract().getClassNameForEntity(s.getName()));
        }
        catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1333091
public Class getJavaClass()
  {
    try {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      
      return Class.forName(getName(), false, loader);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
133816
public java.util.List<? extends com.google.appengine.v1.ServiceOrBuilder> 
      getServicesOrBuilderList() {
    return services_;
  }
244222
protected ScriptEngine getEngine()
    {
        if (engine == null)
        {
            ScriptEngineManager factory = new ScriptEngineManager();
            engine = factory.getEngineByName("JavaScript");
            engine.put("proc", this);
            
            //rhino compatibility workaround, println should be replaced by print in all occurences
            try
            {
                engine.eval("if (typeof println == 'undefined') this.println = print;");
            } catch (ScriptException e) {
                e.printStackTrace();
            }
            
            Map<String, ScriptObject> scriptObjects = ServiceManager.findScriptObjects();
            for (Map.Entry<String, ScriptObject> obj : scriptObjects.entrySet())
            {
                engine.put(obj.getKey(), obj.getValue());
            }
        }
        return engine;
    }
1031460
public ClassInfoList getAllClasses() {
        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 ClassInfo.getAllClasses(classNameToClassInfo.values(), scanSpec);
    }
1183768
public static List<String> getAllClasses() throws PackageManager.NameNotFoundException, IOException {
        List<String> classNames = new ArrayList<>();
        for (String path : getSourcePaths()) {
            try {
                DexFile dexfile;
                if (path.endsWith(EXTRACTED_SUFFIX)) {
                    //NOT use new DexFile(path), because it will throw "permission error in /data/dalvik-cache"
                    dexfile = DexFile.loadDex(path, path + ".tmp", 0);
                } else {
                    dexfile = new DexFile(path);
                }
                Enumeration<String> dexEntries = dexfile.entries();
                while (dexEntries.hasMoreElements()) {
                    classNames.add(dexEntries.nextElement());
                }
            } catch (IOException e) {
                throw new IOException("Error at loading dex file '" + path + "'");
            }
        }
        return classNames;
    }
676357
public java.util.List<String> getBundleIds() {
        if (bundleIds == null) {
            bundleIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return bundleIds;
    }
767391
public final Set<String> getBundleDependencies() {
		final Set<String> bundles = new TreeSet<>();
		updateBundleList(bundles);
		return bundles;
	}
1244180
protected static ModuleClassLoaderFactory createFactory(final ScriptArchive scriptArchive) {
        return new ModuleClassLoaderFactory() {
            public ModuleClassLoader create(final Configuration configuration) {
                return AccessController.doPrivileged(
                    new PrivilegedAction<JBossModuleClassLoader>() {
                        public JBossModuleClassLoader run() {
                            return new JBossModuleClassLoader(configuration, scriptArchive);
                        }
                    });
            }
        };
    }
1197682
public ClassInfoList getInterfaces() {
        return filter(new ClassInfoFilter() {
            @Override
            public boolean accept(final ClassInfo ci) {
                return ci.isInterface();
            }
        });
    }
1015470
ProviderList getJarList(String[] jarClassNames) {
        List<ProviderConfig> newConfigs = new ArrayList<>();
        for (String className : jarClassNames) {
            ProviderConfig newConfig = new ProviderConfig(className);
            for (ProviderConfig config : configs) {
                // if the equivalent object is present in this provider list,
                // use the old object rather than the new object.
                // this ensures that when the provider is loaded in the
                // new thread local list, it will also become available
                // in this provider list
                if (config.equals(newConfig)) {
                    newConfig = config;
                    break;
                }
            }
            newConfigs.add(newConfig);
        }
        ProviderConfig[] configArray = newConfigs.toArray(PC0);
        return new ProviderList(configArray, false);
    }