Codota Logo
ClasspathResolver.resolve
Code IndexAdd Codota to your IDE (free)

How to use
resolve
method
in
org.crsh.lang.impl.java.ClasspathResolver

Best Java code snippets using org.crsh.lang.impl.java.ClasspathResolver.resolve (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: crashub/crash

@Override
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException {
 if (location == StandardLocation.PLATFORM_CLASS_PATH) {
  return fileManager.list(location, packageName, kinds, recurse);
 }
 else if (location == StandardLocation.CLASS_PATH && kinds.contains(JavaFileObject.Kind.CLASS)) {
  if (packageName.startsWith("java")) {
   return fileManager.list(location, packageName, kinds, recurse);
  }
  else {
   try {
    Iterable<JavaFileObject> ret = finder.resolve(packageName, recurse);
    return ret;
   }
   catch (URISyntaxException e) {
    throw new IOException(e);
   }
  }
 } else {
  return Collections.emptyList();
 }
}
origin: crashub/crash

private void resolve(List<JavaFileObject> files, Node node, String binaryName, boolean recurse) throws IOException, URISyntaxException {
 for (Node child : driver.children(node)) {
  Iterator<Resource> i = child.iterator();
  if (i.hasNext()) {
   if (child.name.endsWith(".class")) {
    Resource r = i.next();
    URI uri = r.url.toURI();
    files.add(new NodeJavaFileObject(
      binaryName + "." + child.name.substring(0, child.name.length() - ".class".length()),
      uri,
      r.streamFactory,
      r.lastModified));
   }
  } else {
   if (recurse) {
    resolve(files, child, binaryName + "." + child.name, recurse);
   }
  }
 }
}
origin: crashub/crash

resolve(files, current, pkg, recurse);
return files;
origin: crashub/crash

public void testJar() throws Exception {
 File jar = toFile(this.archive, ".jar");
 ClassLoader cl = new URLClassLoader(new URL[]{jar.toURI().toURL()}, parent);
 ClasspathResolver resolver = new ClasspathResolver(cl);
 // No recurse
 List<JavaFileObject> classes = collect(Utils.list(resolver.resolve("java.util", false)));
 assertEquals(2, classes.size());
 assertEndsWith("/HashMap.class", classes.get(0).getName());
 assertEndsWith("/Map.class", classes.get(1).getName());
 // Recurse
 classes = collect(Utils.list(resolver.resolve("java.util", true)));
 assertEquals(3, classes.size());
 assertEndsWith("/ConcurrentHashMap.class", classes.get(0).getName());
 assertEndsWith("/HashMap.class", classes.get(1).getName());
 assertEndsWith("/Map.class", classes.get(2).getName());
}
origin: crashub/crash

public void testDir() throws Exception {
 File root = toExploded(archive, "");
 ClassLoader cl = new URLClassLoader(new URL[]{root.toURI().toURL()}, parent);
 ClasspathResolver resolver = new ClasspathResolver(cl);
 // No recurse
 List<JavaFileObject> classes = collect(Utils.list(resolver.resolve("java.util", false)));
 assertEquals(2, classes.size());
 assertEndsWith("/HashMap.class", classes.get(0).getName());
 assertEndsWith("/Map.class", classes.get(1).getName());
 // Recurse
 classes = collect(Utils.list(resolver.resolve("java.util", true)));
 assertEquals(3, classes.size());
 assertEndsWith("/ConcurrentHashMap.class", classes.get(0).getName());
 assertEndsWith("/HashMap.class", classes.get(1).getName());
 assertEndsWith("/Map.class", classes.get(2).getName());
}
origin: crashub/crash

List<JavaFileObject> classes = collect(Utils.list(resolver.resolve("java.util", false)));
assertEquals(2, classes.size());
assertEndsWith("/HashMap.class", classes.get(0).getName());
classes = collect(Utils.list(resolver.resolve("java.util", true)));
assertEquals(3, classes.size());
assertEndsWith("/ConcurrentHashMap.class", classes.get(0).getName());
origin: com.github.corda.crash/crash.shell

private void resolve(List<JavaFileObject> files, Node node, String binaryName, boolean recurse) throws IOException, URISyntaxException {
 for (Node child : driver.children(node)) {
  Iterator<Resource> i = child.iterator();
  if (i.hasNext()) {
   if (child.name.endsWith(".class")) {
    Resource r = i.next();
    URI uri = r.url.toURI();
    files.add(new NodeJavaFileObject(
      binaryName + "." + child.name.substring(0, child.name.length() - ".class".length()),
      uri,
      r.streamFactory,
      r.lastModified));
   }
  } else {
   if (recurse) {
    resolve(files, child, binaryName + "." + child.name, recurse);
   }
  }
 }
}
origin: org.crashub/crash.shell

private void resolve(List<JavaFileObject> files, Node node, String binaryName, boolean recurse) throws IOException, URISyntaxException {
 for (Node child : driver.children(node)) {
  Iterator<Resource> i = child.iterator();
  if (i.hasNext()) {
   if (child.name.endsWith(".class")) {
    Resource r = i.next();
    URI uri = r.url.toURI();
    files.add(new NodeJavaFileObject(
      binaryName + "." + child.name.substring(0, child.name.length() - ".class".length()),
      uri,
      r.streamFactory,
      r.lastModified));
   }
  } else {
   if (recurse) {
    resolve(files, child, binaryName + "." + child.name, recurse);
   }
  }
 }
}
origin: org.crashub/crash.shell

@Override
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException {
 if (location == StandardLocation.PLATFORM_CLASS_PATH) {
  return fileManager.list(location, packageName, kinds, recurse);
 }
 else if (location == StandardLocation.CLASS_PATH && kinds.contains(JavaFileObject.Kind.CLASS)) {
  if (packageName.startsWith("java")) {
   return fileManager.list(location, packageName, kinds, recurse);
  }
  else {
   try {
    Iterable<JavaFileObject> ret = finder.resolve(packageName, recurse);
    return ret;
   }
   catch (URISyntaxException e) {
    throw new IOException(e);
   }
  }
 } else {
  return Collections.emptyList();
 }
}
origin: com.github.corda.crash/crash.shell

@Override
public Iterable<JavaFileObject> list(Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException {
 if (location == StandardLocation.PLATFORM_CLASS_PATH) {
  return fileManager.list(location, packageName, kinds, recurse);
 }
 else if (location == StandardLocation.CLASS_PATH && kinds.contains(JavaFileObject.Kind.CLASS)) {
  if (packageName.startsWith("java")) {
   return fileManager.list(location, packageName, kinds, recurse);
  }
  else {
   try {
    Iterable<JavaFileObject> ret = finder.resolve(packageName, recurse);
    return ret;
   }
   catch (URISyntaxException e) {
    throw new IOException(e);
   }
  }
 } else {
  return Collections.emptyList();
 }
}
origin: org.crashub/crash.shell

resolve(files, current, pkg, recurse);
return files;
origin: com.github.corda.crash/crash.shell

resolve(files, current, pkg, recurse);
return files;
org.crsh.lang.impl.javaClasspathResolverresolve

Popular methods of ClasspathResolver

  • <init>

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now