|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassPath
ClassPath
is an interface implemented by objects
representing a class search path.
ClassPool
uses those objects for reading class files.
The users can define a class implementing this interface so that a class file is obtained from a non-standard source.
ClassPool.insertClassPath(ClassPath)
,
ClassPool.appendClassPath(ClassPath)
,
ClassPool.removeClassPath(ClassPath)
Method Summary | |
---|---|
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. |
Method Detail |
---|
java.io.InputStream openClassfile(java.lang.String classname) throws NotFoundException
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.
classname
- a fully-qualified class name
NotFoundException
Translator
java.net.URL find(java.lang.String classname)
classname
- a fully-qualified class name.
void close()
ClassPath
object is
detached from the search path. It will be an empty method in most of
classes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |