Top Fields Constructors Methods
javassist

pack-priv final Class ClassPoolTail

Additional top-level classes in compilation unit: ClassPathList, DirClassPath, JarDirClassPath, JarClassPath.

extends Object
Class Inheritance
Imports
java.io.File, .FileInputStream, .FileNotFoundException, .FilenameFilter, .IOException, .InputStream, .OutputStream, java.net.MalformedURLException, .URL, java.util.Collections, .HashSet, .Set, java.util.jar.JarEntry, .JarFile

Field Summary

Modifier and TypeField and Description
protected ClassPathList

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized ClassPath
public ClassPath
public ClassPath
public static void
copyStream(InputStream fin, OutputStream fout)

Reads from an input stream and write to an output stream until it reaches the end.

public URL

Returns:

null if the class file could not be found.
find
(String
a fully-qualified class name.
classname
)

Searches the class path to obtain the URL of the class file specified by classname.

public synchronized ClassPath
public ClassPath
private static ClassPath
pack-priv InputStream

Returns:

null if the file has not been found.
openClassfile
(String
a fully-qualified class name
classname
)

Opens the class file for the class specified by classname.

public static byte[]

Returns:

the contents of that input stream
readStream
(InputStream fin)

Reads from an input stream until it reaches the end.

public synchronized void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

pack-priv void
writeClassfile(String classname, OutputStream out)

This method does not close the output stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

pathListback to summary
protected ClassPathList pathList

Constructor Detail

ClassPoolTailback to summary
public ClassPoolTail()

Method Detail

appendClassPathback to summary
public synchronized ClassPath appendClassPath(ClassPath cp)
appendClassPathback to summary
public ClassPath appendClassPath(String pathname) throws NotFoundException
appendSystemPathback to summary
public ClassPath appendSystemPath()
copyStreamback to summary
public static void copyStream(InputStream fin, OutputStream fout) throws IOException

Reads from an input stream and write to an output stream until it reaches the end. This method does not close the streams.

findback to summary
public URL find(String classname)

Searches the class path to obtain the URL of the class file specified by classname. It is also used to determine whether the class file exists.

Parameters
classname:String

a fully-qualified class name.

Returns:URL

null if the class file could not be found.

insertClassPathback to summary
public synchronized ClassPath insertClassPath(ClassPath cp)
insertClassPathback to summary
public ClassPath insertClassPath(String pathname) throws NotFoundException
makePathObjectback to summary
private static ClassPath makePathObject(String pathname) throws NotFoundException
openClassfileback to summary
pack-priv InputStream openClassfile(String classname) throws NotFoundException

Opens the class file for the class specified by classname.

Parameters
classname:String

a fully-qualified class name

Returns:InputStream

null if the file has not been found.

Exceptions
NotFoundException:
if any error is reported by ClassPath.
readStreamback to summary
public static byte[] readStream(InputStream fin) throws IOException

Reads from an input stream until it reaches the end.

Returns:byte[]

the contents of that input stream

removeClassPathback to summary
public synchronized void removeClassPath(ClassPath cp)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
writeClassfileback to summary
pack-priv void writeClassfile(String classname, OutputStream out) throws NotFoundException, IOException, CannotCompileException

This method does not close the output stream.