public Set<TypeRef> parseClassFile(InputStream in) throws Exception { return parseClassFile(in, null); }
public Set<TypeRef> parseClassFileWithCollector(ClassDataCollector cd) throws Exception { ByteBuffer bb = resource.buffer(); if (bb != null) { return parseClassFileData(ByteBufferDataInput.wrap(bb), cd); } return parseClassFile(resource.openInputStream(), cd); }
public Set<TypeRef> parseClassFile(InputStream in) throws Exception { return parseClassFile(in, null); }
public Set<TypeRef> parseClassFileWithCollector(ClassDataCollector cd) throws Exception { ByteBuffer bb = resource.buffer(); if (bb != null) { return parseClassFileData(ByteBufferDataInput.wrap(bb), cd); } return parseClassFile(resource.openInputStream(), cd); }
public Set<TypeRef> parseClassFile(InputStream in) throws Exception { return parseClassFile(in, null); }
public Set<TypeRef> parseClassFile(InputStream in) throws Exception { return parseClassFile(in, null); }
public Set<TypeRef> parseClassFile(InputStream in) throws Exception { return parseClassFile(in, null); }
public Set<TypeRef> parseClassFile(InputStream in, ClassDataCollector cd) throws Exception { DataInputStream din = new DataInputStream(in); try { this.cd = cd; return parseClassFile(din); } finally { cd = null; din.close(); } }
public Set<TypeRef> parseClassFile(InputStream in, ClassDataCollector cd) throws Exception { DataInputStream din = new DataInputStream(in); try { this.cd = cd; return parseClassFile(din); } finally { cd = null; din.close(); } }
public Set<TypeRef> parseClassFile(InputStream in, ClassDataCollector cd) throws Exception { DataInputStream din = new DataInputStream(in); try { this.cd = cd; return parseClassFile(din); } finally { cd = null; din.close(); } }
public Set<TypeRef> parseClassFileWithCollector(ClassDataCollector cd) throws Exception { InputStream in = resource.openInputStream(); try { return parseClassFile(in, cd); } finally { in.close(); } }
public Set<TypeRef> parseClassFileWithCollector(ClassDataCollector cd) throws Exception { InputStream in = resource.openInputStream(); try { return parseClassFile(in, cd); } finally { in.close(); } }
public Set<TypeRef> parseClassFileWithCollector(ClassDataCollector cd) throws Exception { InputStream in = resource.openInputStream(); try { return parseClassFile(in, cd); } finally { in.close(); } }
/** * Find a clazz on the class path. This class has been parsed. * * @param path * @return */ public Clazz findClass(TypeRef typeRef) throws Exception { Clazz c = classspace.get(typeRef); if (c != null) return c; c = importedClassesCache.get(typeRef); if (c != null) return c; Resource r = findResource(typeRef.getPath()); if (r == null) { getClass().getClassLoader(); URL url = ClassLoader.getSystemResource(typeRef.getPath()); if (url != null) r = new URLResource(url); } if (r != null) { c = new Clazz(this, typeRef.getPath(), r); c.parseClassFile(); importedClassesCache.put(typeRef, c); } return c; }
/** * Find a clazz on the class path. This class has been parsed. */ public Clazz findClass(TypeRef typeRef) throws Exception { Clazz c = classspace.get(typeRef); if (c != null) return c; c = importedClassesCache.get(typeRef); if (c != null) return c; Resource r = findResource(typeRef.getPath()); if (r == null) { getClass().getClassLoader(); URL url = ClassLoader.getSystemResource(typeRef.getPath()); if (url != null) r = Resource.fromURL(url, getPlugin(HttpClient.class)); } if (r != null) { c = new Clazz(this, typeRef.getPath(), r); c.parseClassFile(); importedClassesCache.put(typeRef, c); } return c; }
/** * Find a clazz on the class path. This class has been parsed. */ public Clazz findClass(TypeRef typeRef) throws Exception { Clazz c = classspace.get(typeRef); if (c != null) return c; c = importedClassesCache.get(typeRef); if (c != null) return c; Resource r = findResource(typeRef.getPath()); if (r == null) { getClass().getClassLoader(); URL url = ClassLoader.getSystemResource(typeRef.getPath()); if (url != null) r = Resource.fromURL(url, getPlugin(HttpClient.class)); } if (r != null) { c = new Clazz(this, typeRef.getPath(), r); c.parseClassFile(); importedClassesCache.put(typeRef, c); } return c; }
/** * Visit each class on the class path. * * @param visitor the visitor */ public void visit(ClassVisitor visitor) throws Exception { try (Analyzer analyzer = new Analyzer()) { for (File f : entries) { try (Jar jar = new Jar(f)) { for (String path : jar.getResources() .keySet()) { if (path.endsWith(".class")) { Resource r = jar.getResource(path); Clazz c = new Clazz(analyzer, path, r); c.parseClassFile(); visitor.visit(c); } } } } } }
/** * Visit each class on the class path. * * @param visitor the visitor */ public void visit(ClassVisitor visitor) throws Exception { try (Analyzer analyzer = new Analyzer()) { for (File f : entries) { try (Jar jar = new Jar(f)) { for (String path : jar.getResources() .keySet()) { if (path.endsWith(".class")) { Resource r = jar.getResource(path); Clazz c = new Clazz(analyzer, path, r); c.parseClassFile(); visitor.visit(c); } } } } } }
/** * Visit each class on the class path. * * @param visitor the visitor */ public void visit(ClassVisitor visitor) throws Exception { try (Analyzer analyzer = new Analyzer()) { for (File f : entries) { try (Jar jar = new Jar(f)) { for (String path : jar.getResources() .keySet()) { if (path.endsWith(".class")) { Resource r = jar.getResource(path); Clazz c = new Clazz(analyzer, path, r); c.parseClassFile(); visitor.visit(c); } } } } } }
/** * Visit each class on the class path. * * @param visitor the visitor */ public void visit(ClassVisitor visitor) throws Exception { try (Analyzer analyzer = new Analyzer()) { for (File f : entries) { try (Jar jar = new Jar(f)) { for (String path : jar.getResources() .keySet()) { if (path.endsWith(".class")) { Resource r = jar.getResource(path); Clazz c = new Clazz(analyzer, path, r); c.parseClassFile(); visitor.visit(c); } } } } } }