Package javassist
Class ClassPoolTail
- java.lang.Object
-
- javassist.ClassPoolTail
-
final class ClassPoolTail extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassPathList
pathList
-
Constructor Summary
Constructors Constructor Description ClassPoolTail()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassPath
appendClassPath(java.lang.String pathname)
ClassPath
appendClassPath(ClassPath cp)
ClassPath
appendSystemPath()
static void
copyStream(java.io.InputStream fin, java.io.OutputStream fout)
Reads from an input stream and write to an output stream until it reaches the end.java.net.URL
find(java.lang.String classname)
Searches the class path to obtain the URL of the class file specified by classname.ClassPath
insertClassPath(java.lang.String pathname)
ClassPath
insertClassPath(ClassPath cp)
private static ClassPath
makePathObject(java.lang.String pathname)
(package private) java.io.InputStream
openClassfile(java.lang.String classname)
Opens the class file for the class specified byclassname
.static byte[]
readStream(java.io.InputStream fin)
Reads from an input stream until it reaches the end.void
removeClassPath(ClassPath cp)
java.lang.String
toString()
(package private) void
writeClassfile(java.lang.String classname, java.io.OutputStream out)
This method does not close the output stream.
-
-
-
Field Detail
-
pathList
protected ClassPathList pathList
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
removeClassPath
public void removeClassPath(ClassPath cp)
-
appendSystemPath
public ClassPath appendSystemPath()
-
insertClassPath
public ClassPath insertClassPath(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
appendClassPath
public ClassPath appendClassPath(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
makePathObject
private static ClassPath makePathObject(java.lang.String pathname) throws NotFoundException
- Throws:
NotFoundException
-
writeClassfile
void writeClassfile(java.lang.String classname, java.io.OutputStream out) throws NotFoundException, java.io.IOException, CannotCompileException
This method does not close the output stream.- Throws:
NotFoundException
java.io.IOException
CannotCompileException
-
openClassfile
java.io.InputStream openClassfile(java.lang.String classname) throws NotFoundException
Opens the class file for the class specified byclassname
.- Parameters:
classname
- a fully-qualified class name- Returns:
- null if the file has not been found.
- Throws:
NotFoundException
- if any error is reported by ClassPath.
-
find
public java.net.URL find(java.lang.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
- a fully-qualified class name.- Returns:
- null if the class file could not be found.
-
readStream
public static byte[] readStream(java.io.InputStream fin) throws java.io.IOException
Reads from an input stream until it reaches the end.- Returns:
- the contents of that input stream
- Throws:
java.io.IOException
-
copyStream
public static void copyStream(java.io.InputStream fin, java.io.OutputStream fout) throws java.io.IOException
Reads from an input stream and write to an output stream until it reaches the end. This method does not close the streams.- Throws:
java.io.IOException
-
-