public class ClassPath extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
ClassPath.ClassFile
Contains information about file/ZIP entry of the Java class.
|
| Modifier and Type | Field and Description |
|---|---|
static ClassPath |
SYSTEM_CLASS_PATH |
| Constructor and Description |
|---|
ClassPath()
Deprecated.
Use SYSTEM_CLASS_PATH constant
|
ClassPath(String class_path)
Search for classes in given path.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final ClassPath SYSTEM_CLASS_PATH
public ClassPath(String class_path)
public ClassPath()
public String toString()
public static final String getClassPath()
public InputStream getInputStream(String name) throws IOException
name - fully qualified class name, e.g. java.lang.StringIOExceptionpublic 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. .javaIOExceptionpublic 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. .javaIOExceptionpublic ClassPath.ClassFile getClassFile(String name) throws IOException
name - fully qualified class name, e.g. java.lang.StringIOExceptionpublic 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. .javaIOExceptionpublic byte[] getBytes(String name) throws IOException
IOExceptionpublic String getPath(String name) throws IOException
name - name of file to search for, e.g. java/lang/String.javaIOExceptionpublic 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. .javaIOExceptionCopyright © 2018–2021 mhoffrogge. All rights reserved.