classfile
Class classFile
java.lang.Object
|
+--classfile.classFile
- public class classFile
- extends java.lang.Object
The classFile object contains the information from a
single Java class file. The class file format is
described in The Java Virtual Machine Specification,
Second Edition, Lindholm and elin, Addison and Westley
A class file contains a single ClassFile structure:
ClassFile {
u4 magic;
u2 minor_version;
u2 major_version;
u2 constant_pool_count;
cp_info constant_pool[constant_pool_count-1];
u2 access_flags;
u2 this_class;
u2 super_class;
u2 interfaces_count;
u2 interfaces[interfaces_count];
u2 fields_count;
field_info fields[fields_count];
u2 methods_count;
method_info methods[methods_count];
u2 attributes_count;
attribute_info attributes[attributes_count];
}
Constructor Summary |
classFile(java.io.DataInputStream dStream)
classFile constructor. |
Method Summary |
void |
pr()
Print the class file in a source format resembling
Java. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
header
classFileHeader header
classConstPool
constPool classConstPool
classDecl
classDeclSec classDecl
classFields
classFieldSec classFields
classMethods
classMethodSec classMethods
classAttrs
classAttrSec classAttrs
className
java.lang.String className
classFile
public classFile(java.io.DataInputStream dStream)
- classFile constructor.
The classFile constructor allocates a set of objects
which corresponds to the various sections of the Java
class file. Each of these objects reads its own section
and builds any data structures needed (e.g., tables) to
represent the information.
pr
public void pr()
- Print the class file in a source format resembling
Java.