Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String |
directory |
Constructor and Description |
---|
DirClassPath(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.
|
java.lang.String |
toString() |
public java.io.InputStream openClassfile(java.lang.String classname)
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 nameTranslator
public java.net.URL find(java.lang.String classname)
ClassPath
public void close()
ClassPath
ClassPath
object is
detached from the search path. It will be an empty method in most of
classes.public java.lang.String toString()
toString
in class java.lang.Object