Public Methods | |
ClassParser (InputStream file, String file_name) | |
ClassParser (String file_name) throws IOException | |
ClassParser (String zip_file, String file_name) throws IOException | |
JavaClass | parse () throws IOException, ClassFormatError |
ClassParser (InputStream file, String file_name) | |
ClassParser (String file_name) throws IOException | |
ClassParser (String zip_file, String file_name) throws IOException | |
JavaClass | parse () throws IOException, ClassFormatError |
Private Methods | |
final void | readAttributes () throws IOException, ClassFormatError |
final void | readClassInfo () throws IOException, ClassFormatError |
final void | readConstantPool () throws IOException, ClassFormatError |
final void | readFields () throws IOException, ClassFormatError |
final void | readID () throws IOException, ClassFormatError |
final void | readInterfaces () throws IOException, ClassFormatError |
final void | readMethods () throws IOException, ClassFormatError |
final void | readVersion () throws IOException, ClassFormatError |
final void | readAttributes () throws IOException, ClassFormatError |
final void | readClassInfo () throws IOException, ClassFormatError |
final void | readConstantPool () throws IOException, ClassFormatError |
final void | readFields () throws IOException, ClassFormatError |
final void | readID () throws IOException, ClassFormatError |
final void | readInterfaces () throws IOException, ClassFormatError |
final void | readMethods () throws IOException, ClassFormatError |
final void | readVersion () throws IOException, ClassFormatError |
Private Attributes | |
DataInputStream | file |
ZipFile | zip |
String | file_name |
int | class_name_index |
int | superclass_name_index |
int | major |
int | minor |
int | access_flags |
int[] | interfaces |
ConstantPool | constant_pool |
Field[] | fields |
Method[] | methods |
Attribute[] | attributes |
int[] | interfaces |
Field[] | fields |
Method[] | methods |
Attribute[] | attributes |
boolean | is_zip |
Static Private Attributes | |
final int | BUFSIZE = 8192 |
The structure and the names comply, except for a few conveniences, exactly with the JVM specification 1.0. See this paper for further details about the structure of a bytecode file.
Definition at line 23 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java.
|
Parse class from the given stream.
Definition at line 44 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse class from given .class file.
Definition at line 57 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse class from given .class file in a ZIP-archive
Definition at line 68 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse class from the given stream.
Definition at line 45 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse class from given .class file.
Definition at line 61 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse class from given .class file in a ZIP-archive
Definition at line 73 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse the given Java class file and return an object that represents the contained data, i.e., constants, methods, fields and commands. A ClassFormatError is raised, if the file is not a valid .class file. (This does not include verification of the byte code as it is performed by the java interpreter).
Definition at line 95 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Parse the given Java class file and return an object that represents the contained data, i.e. constants, methods, fields and commands. A ClassFormatError is raised, if the file is not a valid .class file. (This does not include verification of the byte code as it is performed by the java interpreter).
Definition at line 89 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the attributes of the attributes of the class.
Definition at line 157 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the attributes of the attributes of the class.
Definition at line 149 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read information about the class and its super class.
Definition at line 172 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the class and its super class.
Definition at line 164 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read constant pool entries.
Definition at line 194 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read constant pool entries.
Definition at line 186 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read information about the fields of the class, i.e., its variables.
Definition at line 203 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the fields of the class, i.e. its variables.
Definition at line 195 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Check whether the header of the file is ok. Of course, this has to be the first action on successive file reads.
Definition at line 221 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Check whether the header of the file is ok. Of course, this has to be the first action on successive file reads.
Definition at line 215 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read information about the interfaces implemented by this class.
Definition at line 233 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the interfaces implemented by this class.
Definition at line 227 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read information about the methods of the class.
Definition at line 248 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read information about the methods of the class.
Definition at line 242 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|
|
Read major and minor version of compiler which created the file.
Definition at line 263 of file src/de/fub/bytecode/classfile/ClassParser.java. |
|
Read major and minor version of compiler which created the file.
Definition at line 257 of file lib/jpf/de/fub/bytecode/classfile/ClassParser.java. Referenced by parse().
|