for (final String cur : Collections.list(target.getDependencies())) { final String m = state.get(cur); if (m == null) { ret.addElement(target);
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration<Option> listOptions() { Vector<Option> newVector = new Vector<Option>(); newVector.addElement(new Option("\tOutput additional statistics.", "additional-stats", 0, "-additional-stats")); newVector.addAll(Collections.list(super.listOptions())); return newVector.elements(); }
/** Returns all global scope addresses for interfaces that are up. */ static InetAddress[] getGlobalInterfaces() throws SocketException { List<InetAddress> list = new ArrayList<InetAddress> (); for (NetworkInterface intf : getInterfaces()) { if (intf.isUp()) { for (InetAddress address : Collections.list(intf.getInetAddresses())) { if (address.isLoopbackAddress() == false && address.isSiteLocalAddress() == false && address.isLinkLocalAddress() == false) { list.add(address); } } } } return list.toArray(new InetAddress[list.size()]); } }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tThe class index\n" + "\t(default: last)", "c", 1, "-c <class index>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
JarClassPath(String pathname) throws NotFoundException { JarFile jarfile = null; try { jarfile = new JarFile(pathname); jarfileEntries = new ArrayList<String>(); for (JarEntry je:Collections.list(jarfile.entries())) if (je.getName().endsWith(".class")) jarfileEntries.add(je.getName()); jarfileURL = new File(pathname).getCanonicalFile() .toURI().toURL().toString(); return; } catch (IOException e) {} finally { if (null != jarfile) try { jarfile.close(); } catch (IOException e) {} } throw new NotFoundException(pathname); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("The class index", "c", 1, "-c <the class index>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
private static List<URI> expandPath(final ClassLoader loader, final String pattern) { List<URI> result = new ArrayList<>(); File file = new File(pattern); if (file.exists()) { result.add(file.toURI()); } Try.run(() -> Collections.list(loader.getResources(pattern)) .stream() .map(it -> Try.apply(it::toURI).get()) .forEach(result::add)); return result; }
/** * Load, merge and return all <code>web.xml</code> and <code>web-fragment.xml</code> files found in the classpath * into a single {@link Document}. */ private static Document loadWebXml(ServletContext context) throws IOException, SAXException { List<URL> webXmlURLs = new ArrayList<>(); webXmlURLs.add(context.getResource(WEB_XML)); webXmlURLs.addAll(Collections.list(Thread.currentThread().getContextClassLoader().getResources(WEB_FRAGMENT_XML))); return createDocument(webXmlURLs); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration<Option> listOptions() { Vector<Option> newVector = new Vector<Option>(); newVector.addElement(new Option("\tSet base of the expansion constant\n" + "\t(default = 1.3).", "B", 1, "-B <value>")); newVector.addAll(Collections.list(super.listOptions())); return newVector.elements(); }
JarClassPath(String pathname) throws NotFoundException { JarFile jarfile = null; try { jarfile = new JarFile(pathname); jarfileEntries = new ArrayList<String>(); for (JarEntry je:Collections.list(jarfile.entries())) if (je.getName().endsWith(".class")) jarfileEntries.add(je.getName()); jarfileURL = new File(pathname).getCanonicalFile() .toURI().toURL().toString(); return; } catch (IOException e) {} finally { if (null != jarfile) try { jarfile.close(); } catch (IOException e) {} } throw new NotFoundException(pathname); }
/** * Load, merge and return all <code>web.xml</code> and <code>web-fragment.xml</code> files found in the classpath * into a single {@link Document}. */ private static Document loadWebXml(ServletContext context) throws IOException, SAXException { List<URL> webXmlURLs = new ArrayList<>(); webXmlURLs.add(context.getResource(WEB_XML)); webXmlURLs.addAll(Collections.list(Thread.currentThread().getContextClassLoader().getResources(WEB_FRAGMENT_XML))); return createDocument(webXmlURLs); }
/** * Returns an enumeration describing the available options * * @return an enumeration of all the available options */ @Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tThe epsilon for round-off error.\n" + "\t(default 1.0e-12)", "P", 1, "-P <double>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
@Override protected Enumeration<URL> findResources(String resName) throws IOException { List<URL> resources = new ArrayList<URL>(); URL resource = archive.getEntryURL(resName); if (resource != null) { resources.add(resource); } Enumeration<URL> parentResource = getParent().getResources(resName); resources.addAll(Collections.list(parentResource)); return Collections.enumeration(resources); } }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tRandom number seed.\n" + "\t(default " + m_SeedDefault + ")", "S", 1, "-S <num>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }