public class URLClassPath
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
URLClassPath()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addURL(java.lang.String fileName)
Add given filename/URL to the classpath.
|
void |
close()
Close all underlying resources.
|
java.lang.String |
getClassPath()
Return the classpath string.
|
static java.lang.String |
getFileExtension(java.lang.String fileName)
Get the file extension of given fileName.
|
static java.lang.String |
getURLProtocol(java.lang.String urlString)
Get the URL protocol of given URL string.
|
static boolean |
isArchiveExtension(java.lang.String fileExtension)
Determine if given file extension indicates an archive file.
|
org.apache.bcel.classfile.JavaClass |
lookupClass(java.lang.String className)
Look up a class from the classpath.
|
public URLClassPath()
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 org.apache.bcel.classfile.JavaClass lookupClass(java.lang.String className)
throws java.lang.ClassNotFoundException
className - name of class to look upjava.lang.ClassNotFoundException - if the class couldn't be foundpublic void close()
public static java.lang.String getURLProtocol(java.lang.String urlString)
urlString - the URL stringpublic static java.lang.String getFileExtension(java.lang.String fileName)
public static boolean isArchiveExtension(java.lang.String fileExtension)
fileExtension - the file extension (e.g., ".jar")FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.