Modifier and Type | Field and Description |
---|---|
(package private) JarClassPath[] |
jars |
Constructor and Description |
---|
JarDirClassPath(java.lang.String dirName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is invoked when the
ClassPath object is
detached from the search path. |
java.net.URL |
find(java.lang.String classname)
Returns the uniform resource locator (URL) of the class file
with the specified name.
|
java.io.InputStream |
openClassfile(java.lang.String classname)
Opens a class file.
|
JarClassPath[] jars
JarDirClassPath(java.lang.String dirName) throws NotFoundException
NotFoundException
public java.io.InputStream openClassfile(java.lang.String classname) throws NotFoundException
ClassPath
This method can return null if the specified class file is not found. If null is returned, the next search path is examined. However, if an error happens, this method must throw an exception so that the search will be terminated.
This method should not modify the contents of the class file.
openClassfile
in interface ClassPath
classname
- a fully-qualified class nameNotFoundException
Translator
public java.net.URL find(java.lang.String classname)
ClassPath