edu.umd.cs.findbugs.ba
public class URLClassPath extends Object implements Serializable
Constructor Summary | |
---|---|
URLClassPath()
Constructor.
|
Method Summary | |
---|---|
void | addURL(String fileName)
Add given filename/URL to the classpath.
|
void | close()
Close all underlying resources. |
String | getClassPath()
Return the classpath string. |
static String | getFileExtension(String fileName)
Get the file extension of given fileName. |
static String | getURLProtocol(String urlString)
Get the URL protocol of given URL string. |
static boolean | isArchiveExtension(String fileExtension)
Determine if given file extension indicates an archive file.
|
JavaClass | lookupClass(String className)
Look up a class from the classpath.
|
Parameters: fileName filename or URL of codebase (directory or archive file)
Throws: IOException if entry is invalid or does not exist
Returns: the classpath string
Returns: the file extension, or null if there is no file extension
Parameters: urlString the URL string
Returns: the protocol name ("http", "file", etc.), or null if there is no protocol
Parameters: fileExtension the file extension (e.g., ".jar")
Returns: true if the file extension indicates an archive, false otherwise
Parameters: className name of class to look up
Returns: the JavaClass object for the class
Throws: ClassNotFoundException if the class couldn't be found ClassFormatException if the classfile format is invalid