|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.umd.cs.findbugs.URLClassPath
public class URLClassPath
A work-alike class to use instead of BCEL's ClassPath class. The main difference is that URLClassPath can load classfiles from URLs.
| Nested Class Summary | |
|---|---|
private static interface |
URLClassPath.Entry
Interface describing a single classpath entry. |
private static class |
URLClassPath.LocalArchiveEntry
Classpath entry class to load files from a zip/jar file in the local filesystem. |
private static class |
URLClassPath.LocalDirectoryEntry
Classpath entry class to load files from a directory in the local filesystem. |
private static class |
URLClassPath.RemoteArchiveEntry
Classpath entry class to load files from a remote archive URL. |
private static class |
URLClassPath.RemoteDirectoryEntry
Classpath entry class to load files from a remote directory URL. |
| Field Summary | |
|---|---|
private java.util.List<URLClassPath.Entry> |
entryList
|
| Constructor Summary | |
|---|---|
URLClassPath()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addURL(java.lang.String fileName)
Add given filename/URL to the classpath. |
java.lang.String |
getClassPath()
Return the classpath string. |
java.io.InputStream |
getInputStreamForResource(java.lang.String resourceName)
Open a stream to read given resource. |
org.apache.bcel.classfile.JavaClass |
lookupClass(java.lang.String className)
Look up a class from the classpath. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.List<URLClassPath.Entry> entryList
| Constructor Detail |
|---|
public URLClassPath()
| Method Detail |
|---|
public void addURL(java.lang.String fileName)
throws java.io.IOException
fileName - filename or URL of codebase (directory or archive file)
java.io.IOException - if entry is invalid or does not existpublic java.lang.String getClassPath()
public java.io.InputStream getInputStreamForResource(java.lang.String resourceName)
throws java.io.IOException
resourceName - name of resource to load, e.g. "java/lang/Object.class"
java.io.IOException - if an IO error occurs trying to determine
whether or not the resource exists
public org.apache.bcel.classfile.JavaClass lookupClass(java.lang.String className)
throws java.lang.ClassNotFoundException
className - name of class to look up
java.lang.ClassNotFoundException - if the class couldn't be found
org.apache.bcel.classfile.ClassFormatException - if the classfile format is invalid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||