classUtils.javassist
Class JarClassPath

java.lang.Object
  extended by classUtils.javassist.JarClassPath
All Implemented Interfaces:
ClassPath

public final class JarClassPath
extends java.lang.Object
implements ClassPath


Method Summary
 void close()
          This method is invoked when the ClassPath object is detached from the search path.
 java.io.InputStream openClassfile(java.lang.String classname)
          Opens a class file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

openClassfile

public java.io.InputStream openClassfile(java.lang.String classname)
                                  throws NotFoundException
Description copied from interface: ClassPath
Opens a class file. This method may be called just to examine whether the class file exists as well as to read the contents of the file.

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 is terminated.

This method should not modify the contents of the class file. Use javassist.Translator for modification.

Specified by:
openClassfile in interface ClassPath
Parameters:
classname - a fully-qualified class name
Returns:
the input stream for reading a class file
Throws:
NotFoundException
See Also:
Translator

close

public void close()
Description copied from interface: ClassPath
This method is invoked when the ClassPath object is detached from the search path. It will be an empty method in most of classes.

Specified by:
close in interface ClassPath

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object