Lines Matching defs:path
37 * ClassFileReader reads ClassFile(s) of a given path that can be
42 * Returns a ClassFileReader instance of a given path.
44 public static ClassFileReader newInstance(File path) throws IOException {
45 if (!path.exists()) {
46 throw new FileNotFoundException(path.getAbsolutePath());
49 if (path.isDirectory()) {
50 return new DirectoryReader(path.toPath());
51 } else if (path.getName().endsWith(".jar")) {
52 return new JarFileReader(path.toPath());
54 return new ClassFileReader(path.toPath());
61 public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException {
62 return new JarFileReader(path, jf);
65 protected final Path path;
67 private ClassFileReader(Path path) {
68 this.path = path;
69 this.baseFileName = path.getFileName() != null
70 ? path.getFileName().toString()
71 : path.toString();
89 return readClassFile(path);
93 return readClassFile(path);
135 ClassFile cf = readClassFile(path);
149 return path.toString();
153 DirectoryReader(Path path) throws IOException {
154 super(path);
161 Path p = path.resolve(pathname);
163 p = path.resolve(pathname.substring(0, i) + "$" +
170 Path p = path.resolve(name + ".class");
205 entries = walkTree(path);
217 Path path = entries.get(index++);
219 return readClassFile(path);
233 JarFileReader(Path path) throws IOException {
234 this(path, new JarFile(path.toFile()));
236 JarFileReader(Path path, JarFile jf) throws IOException {
237 super(path);