mdahm 2002/10/29 10:41:27
Modified: src/java/org/apache/bcel/util ClassPath.java
Log:
getBase()
Revision Changes Path
1.6 +12 -2 jakarta-bcel/src/java/org/apache/bcel/util/ClassPath.java
Index: ClassPath.java
===================================================================
RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/util/ClassPath.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ClassPath.java 11 Jul 2002 19:39:05 -0000 1.5
+++ ClassPath.java 29 Oct 2002 18:41:27 -0000 1.6
@@ -298,7 +298,7 @@
/** Contains information about file/ZIP entry of the Java class.
*/
- public abstract static class ClassFile {
+ public interface ClassFile {
/** @return input stream for class file.
*/
public abstract InputStream getInputStream() throws IOException;
@@ -307,6 +307,11 @@
*/
public abstract String getPath();
+ /** @return base path of found class, i.e. class is contained relative
+ * to that path
+ */
+ public abstract String getBase();
+
/** @return modification time of class file.
*/
public abstract long getTime();
@@ -335,6 +340,8 @@
}
public long getTime() { return file.lastModified(); }
public long getSize() { return file.length(); }
+ public String getBase() { return dir; }
+
} : null;
}
@@ -354,6 +361,9 @@
public String getPath() { return entry.toString(); }
public long getTime() { return entry.getTime(); }
public long getSize() { return entry.getSize(); }
+ public String getBase() {
+ return zip.getName();
+ }
} : null;
}
}
--
To unsubscribe, e-mail: <mailto:bcel-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-dev-help@;jakarta.apache.org>