| java.lang.Object edu.umd.cs.findbugs.ba.URLClassPath
URLClassPath | public class URLClassPath implements Serializable(Code) | | A work-alike class to use instead of BCEL's ClassPath class.
The main difference is that URLClassPath can load
classfiles from URLs.
author: David Hovemeyer |
URLClassPath | public URLClassPath()(Code) | | Constructor.
Creates a classpath with no elements.
|
addURL | public void addURL(String fileName) throws IOException(Code) | | Add given filename/URL to the classpath.
If no URL protocol is given, the filename is assumed
to be a local file or directory.
Remote directories must be specified with a "/" character at the
end of the URL.
Parameters: fileName - filename or URL of codebase (directory or archive file) throws: IOException - if entry is invalid or does not exist |
close | public void close()(Code) | | Close all underlying resources.
|
getClassPath | public String getClassPath()(Code) | | Return the classpath string.
the classpath string |
getFileExtension | public static String getFileExtension(String fileName)(Code) | | Get the file extension of given fileName.
the file extension, or null if there is no file extension |
getURLProtocol | public static String getURLProtocol(String urlString)(Code) | | Get the URL protocol of given URL string.
Parameters: urlString - the URL string the protocol name ("http", "file", etc.), or null if there is no protocol |
isArchiveExtension | public static boolean isArchiveExtension(String fileExtension)(Code) | | Determine if given file extension indicates an archive file.
Parameters: fileExtension - the file extension (e.g., ".jar") true if the file extension indicates an archive,false otherwise |
lookupClass | public JavaClass lookupClass(String className) throws ClassNotFoundException(Code) | | Look up a class from the classpath.
Parameters: className - name of class to look up the JavaClass object for the class throws: ClassNotFoundException - if the class couldn't be found throws: ClassFormatException - if the classfile format is invalid |
|
|