org.apache.bcel.util
Class ClassPath
java.lang.Object
org.apache.bcel.util.ClassPath
- Serializable
public class ClassPath
extends java.lang.Object
implements Serializable
Responsible for loading (class) files from the CLASSPATH. Inspired by
sun.tools.ClassPath.
$Id: ClassPath.java,v 1.7 2002/11/10 18:30:05 mdahm Exp $static interface | ClassPath.ClassFile - Contains information about file/ZIP entry of the Java class.
|
ClassPath() - Use SYSTEM_CLASS_PATH constant
|
ClassPath(String class_path) - Search for classes in given path.
|
SYSTEM_CLASS_PATH
public static final ClassPath SYSTEM_CLASS_PATH
ClassPath
public ClassPath()
Use SYSTEM_CLASS_PATH constant
Search for classes in CLASSPATH.
ClassPath
public ClassPath(String class_path)
Search for classes in given path.
equals
public boolean equals(Object o)
getBytes
public byte[] getBytes(String name)
throws IOException
getBytes
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
- byte array for file on class path
getClassFile
public ClassPath.ClassFile getClassFile(String name)
throws IOException
name
- fully qualified class name, e.g. java.lang.String
getClassFile
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
- class file for the java class
getClassPath
public static final String getClassPath()
Checks for class path components in the following properties:
"java.class.path", "sun.boot.class.path", "java.ext.dirs"
- class path as used by default by BCEL
getInputStream
public InputStream getInputStream(String name)
throws IOException
name
- fully qualified class name, e.g. java.lang.String
getInputStream
public InputStream getInputStream(String name,
String suffix)
throws IOException
Return stream for class or resource on CLASSPATH.
name
- fully qualified file name, e.g. java/lang/Stringsuffix
- file name ends with suff, e.g. .java
- input stream for file on class path
getPath
public String getPath(String name)
throws IOException
name
- name of file to search for, e.g. java/lang/String.java
- full (canonical) path for file
getPath
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
- full (canonical) path for file, if it exists
hashCode
public int hashCode()
toString
public String toString()