Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

ClassFile Struct Reference

#include <classfile.h>


Detailed Description

The ClassFile structure definition.

See spec section 4.2.

Definition at line 431 of file classfile.h.

Data Fields

u2 access_flags
 Bitwise access flags, containing various of the ACC_xxx definitions.
attribute_info_dup ** attributes
 Class file attributes array.
u2 attributes_count
 Size of attributes.
cp_info_dup ** constant_pool
 Constant pool array.
u2 constant_pool_count
 Size of constant_pool plus one (which represents the unrepresented java.lang.Object ).
field_info ** fields
 Fiels array.
u2 fields_count
 Size of fields.
u2interfaces
 Interface array.
u2 interfaces_count
 Size of interfaces.
u4 magic
 Magic number for this file type.
u2 major_version
 Major class file version number.
method_info ** methods
 Methods array.
u2 methods_count
 Size of methods.
u2 minor_version
 Minor class file version number.
u2 super_class
 constant_pool index of the class of the super pointer, namely, what is the name of the super-class of this selfsame class as found here in the class file.
u2 this_class
 constant_pool index of the class of the this pointer, namely, what is the name of this selfsame class as found here in the class file.


Field Documentation

u4 ClassFile::magic
 

Magic number for this file type.

It must contain the constant value CLASSFILE_MAGIC

Definition at line 433 of file classfile.h.

Referenced by classfile_allocate_primative(), and classfile_loadclassdata().

u2 ClassFile::minor_version
 

Minor class file version number.

Definition at line 438 of file classfile.h.

Referenced by classfile_allocate_primative(), and classfile_loadclassdata().

u2 ClassFile::major_version
 

Major class file version number.

Definition at line 440 of file classfile.h.

Referenced by classfile_allocate_primative(), and classfile_loadclassdata().

u2 ClassFile::constant_pool_count
 

Size of constant_pool plus one (which represents the unrepresented java.lang.Object ).

Index zero of constant_pool is this unrepresented slot, and constant_pool[0] is a NULL pointer.

Definition at line 442 of file classfile.h.

Referenced by cfattrib_loadattribute(), classfile_allocate_primative(), and classfile_loadclassdata().

cp_info_dup** ClassFile::constant_pool
 

Constant pool array.

The spec pseudo-code defines this as: cp_info constant_pool[constant_pool_count -1] but it is implemented as a pointer to an array of pointers. The length of this array is constant_pool_count - 1 elements.

Notice that the cp_info structure is found with this cp_info_dup structure. The purpose for this is proper byte alignment of multi-byte items such as 2- and 4-byte integers on machine architectures that demand it lest they complain with SIGSEGV and the like.

Definition at line 451 of file classfile.h.

Referenced by classfile_allocate_primative(), classfile_loadclassdata(), linkage_resolve_class(), and opcode_run().

u2 ClassFile::access_flags
 

Bitwise access flags, containing various of the ACC_xxx definitions.

Definition at line 468 of file classfile.h.

Referenced by classfile_allocate_primative(), classfile_loadclassdata(), and thread_new().

u2 ClassFile::this_class
 

constant_pool index of the class of the this pointer, namely, what is the name of this selfsame class as found here in the class file.

Definition at line 472 of file classfile.h.

Referenced by cfmsgs_typemsg(), classfile_allocate_primative(), classfile_loadclassdata(), jvmutil_print_errtype_stack(), jvmutil_print_stack_common(), and opcode_run().

u2 ClassFile::super_class
 

constant_pool index of the class of the super pointer, namely, what is the name of the super-class of this selfsame class as found here in the class file.

Definition at line 477 of file classfile.h.

Referenced by classfile_allocate_primative(), classfile_loadclassdata(), and thread_new().

u2 ClassFile::interfaces_count
 

Size of interfaces.

Definition at line 483 of file classfile.h.

Referenced by classfile_allocate_primative(), and classfile_loadclassdata().

u2* ClassFile::interfaces
 

Interface array.

The spec pseudo-code defines this as: interfaces[interfaces_count] but it is implemented as an array of pointers. The length of this array is interfaces_count elements.

Definition at line 485 of file classfile.h.

Referenced by classfile_allocate_primative(), and classfile_loadclassdata().

u2 ClassFile::fields_count
 

Size of fields.

Definition at line 493 of file classfile.h.

Referenced by attribute_find_in_field_by_cp_entry(), attribute_find_in_field_by_enum(), classfile_allocate_primative(), classfile_loadclassdata(), and field_find_by_cp_entry().

field_info** ClassFile::fields
 

Fiels array.

The spec pseudo-code defines this as: fields[fields_count] but it is implemented as a pointer to an array of pointers. The length of this array is fields_count elements.

Definition at line 495 of file classfile.h.

Referenced by attribute_find_in_field_by_cp_entry(), attribute_find_in_field_by_enum(), class_get_static_field_data(), class_get_static_field_lookups(), classfile_allocate_primative(), classfile_loadclassdata(), and field_find_by_cp_entry().

u2 ClassFile::methods_count
 

Size of methods.

Definition at line 503 of file classfile.h.

Referenced by attribute_find_in_method_by_cp_entry(), attribute_find_in_method_by_enum(), classfile_allocate_primative(), classfile_loadclassdata(), and method_find_by_cp_entry().

method_info** ClassFile::methods
 

Methods array.

The spec pseudo-code defines this as: methods[methods_count] but it is implemented as a pointer to an array of pointers. The length of this array is methods_count elements.

Definition at line 505 of file classfile.h.

Referenced by attribute_find_in_method_by_cp_entry(), attribute_find_in_method_by_enum(), class_load_from_prchar(), classfile_allocate_primative(), classfile_loadclassdata(), method_find_by_cp_entry(), object_run_method(), and opcode_run().

u2 ClassFile::attributes_count
 

Size of attributes.

Definition at line 513 of file classfile.h.

Referenced by attribute_find_in_class_by_cp_entry(), attribute_find_in_class_by_enum(), classfile_allocate_primative(), and classfile_loadclassdata().

attribute_info_dup** ClassFile::attributes
 

Class file attributes array.

The spec pseudo-code defines this as: attributes_info fields[attributes_count] but it is implemented as a pointer to an array of pointers. The length of this array is attributes_count elements.

Notice that the attribute_info structure is found with this attribute_info_dup structure. The purpose for this is proper byte alignment of multi-byte items such as 2- and 4-byte integers on machine architectures that demand it lest they complain with SIGSEGV and the like.

Definition at line 515 of file classfile.h.

Referenced by attribute_find_in_class_by_cp_entry(), attribute_find_in_class_by_enum(), classfile_allocate_primative(), classfile_loadclassdata(), and jvmutil_print_stack_common().


The documentation for this struct was generated from the following file:
Generated on Fri Sep 30 19:01:03 2005 by  doxygen 1.4.4