public class ClassFileReader
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Test method.
|
static ClassFile |
readFromClassPath(java.lang.String[] classPath,
java.lang.String packageName,
java.lang.String className)
Looks up a class file in the specified class path and converts it
to a ClassFile structure.
|
static ClassFile |
readFromFile(java.io.File file)
Converts a class file to a ClassFile structure.
|
static ClassFile |
readFromInputStream(java.io.InputStream is)
Converts a class file to a ClassFile structure.
|
public static ClassFile readFromClassPath(java.lang.String[] classPath, java.lang.String packageName, java.lang.String className) throws InvalidByteCodeException, java.io.IOException
classPath - the class path from which to read the ClassFile structurepackageName - the name of the package in which the class residesclassName - the simple name of the classInvalidByteCodeException - if the code is invalidjava.io.IOException - if an exception occurs while reading the filepublic static ClassFile readFromFile(java.io.File file) throws InvalidByteCodeException, java.io.IOException
file - the file from which to read the ClassFile structureInvalidByteCodeException - if the code is invalidjava.io.IOException - if an exception occurs while reading the filepublic static ClassFile readFromInputStream(java.io.InputStream is) throws InvalidByteCodeException, java.io.IOException
is - the input stream from which to read the
ClassFile structureInvalidByteCodeException - if the code is invalidjava.io.IOException - if an exception occurs while reading from
the input streampublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - argumentsjava.lang.Exception