Represents a Java class, i.e., the data structures, constant pool,
fields, methods and commands contained in a Java .class file.
See JVM
specification for details.
JavaClass(int class_name_index,
int superclass_name_index,
java.lang.String file_name,
int major,
int minor,
int access_flags,
ConstantPool constant_pool,
int[] interfaces,
Field[] fields,
Method[] methods,
Attribute[] attributes)
Constructor gets all contents as arguments.
JavaClass(int class_name_index,
int superclass_name_index,
java.lang.String file_name,
int major,
int minor,
int access_flags,
ConstantPool constant_pool,
int[] interfaces,
Field[] fields,
Method[] methods,
Attribute[] attributes,
byte source)
Constructor gets all contents as arguments.
Method Summary
void
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
public JavaClass(int class_name_index,
int superclass_name_index,
java.lang.String file_name,
int major,
int minor,
int access_flags,
ConstantPool constant_pool,
int[] interfaces,
Field[] fields,
Method[] methods,
Attribute[] attributes,
byte source)
Constructor gets all contents as arguments.
Parameters:
class_name - Class name
superclass_name - Superclass name
file_name - File name
major - Major compiler version
minor - Minor compiler version
access_flags - Access rights defined by bit flags
constant_pool - Array of constants
interfaces - Implemented interfaces
fields - Class fields
methods - Class methods
attributes - Class attributes
source - Read from file or generated in memory?
JavaClass
public JavaClass(int class_name_index,
int superclass_name_index,
java.lang.String file_name,
int major,
int minor,
int access_flags,
ConstantPool constant_pool,
int[] interfaces,
Field[] fields,
Method[] methods,
Attribute[] attributes)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class. I.e., the hierarchy of methods,
fields, attributes, etc. spawns a tree of objects.