|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.bcel.util.ClassPath
public class ClassPath
Responsible for loading (class) files from the CLASSPATH. Inspired by sun.tools.ClassPath.
Nested Class Summary | |
---|---|
static interface |
ClassPath.ClassFile
Contains information about file/ZIP entry of the Java class. |
Field Summary | |
---|---|
static ClassPath |
SYSTEM_CLASS_PATH
|
Constructor Summary | |
---|---|
ClassPath()
Deprecated. Use SYSTEM_CLASS_PATH constant |
|
ClassPath(String class_path)
Search for classes in given path. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
byte[] |
getBytes(String name)
|
byte[] |
getBytes(String name,
String suffix)
|
ClassPath.ClassFile |
getClassFile(String name)
|
ClassPath.ClassFile |
getClassFile(String name,
String suffix)
|
static String |
getClassPath()
Checks for class path components in the following properties: "java.class.path", "sun.boot.class.path", "java.ext.dirs" |
InputStream |
getInputStream(String name)
|
InputStream |
getInputStream(String name,
String suffix)
Return stream for class or resource on CLASSPATH. |
String |
getPath(String name)
|
String |
getPath(String name,
String suffix)
|
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ClassPath SYSTEM_CLASS_PATH
Constructor Detail |
---|
public ClassPath(String class_path)
public ClassPath()
Method Detail |
---|
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public static final String getClassPath()
public InputStream getInputStream(String name) throws IOException
name
- fully qualified class name, e.g. java.lang.String
IOException
public InputStream getInputStream(String name, String suffix) throws IOException
name
- fully qualified file name, e.g. java/lang/Stringsuffix
- file name ends with suff, e.g. .java
IOException
public ClassPath.ClassFile getClassFile(String name, String suffix) throws IOException
name
- fully qualified file name, e.g. java/lang/Stringsuffix
- file name ends with suff, e.g. .java
IOException
public ClassPath.ClassFile getClassFile(String name) throws IOException
name
- fully qualified class name, e.g. java.lang.String
IOException
public byte[] getBytes(String name, String suffix) throws IOException
name
- fully qualified file name, e.g. java/lang/Stringsuffix
- file name ends with suffix, e.g. .java
IOException
public byte[] getBytes(String name) throws IOException
IOException
public String getPath(String name) throws IOException
name
- name of file to search for, e.g. java/lang/String.java
IOException
public String getPath(String name, String suffix) throws IOException
name
- name of file to search for, e.g. java/lang/Stringsuffix
- file name suffix, e.g. .java
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |