13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.4 Fields<strong>The</strong> information for each field immediately follows the field_count field in the class file. Each field is describedby a variable length field_info structure. <strong>The</strong> format of this structure is as follows:field_info (u2 access_ flags;u2 name_index;u2 signature_index;u2 attributes_count;attribute_info attributes(attribute_countl;access_ lag•This is a set of sixteen flags used by classes, methods, and fields to describe various propertiesand how they many be accessed by methods in other classes. See the table "Access Flags" onpage 12 which indicates the meaning of the bits in this field.<strong>The</strong> possible fields that can be set for a field are ACC_PUBLIC, ACC_PRIVATE,ACC _PROTECTED, ACC_STAT I C, ACC_F I NAL, ACC_VOLATI LE, and ACC_TRANS I ENT .At most one of ACC_ PUBL I C, ACC_PROTECTED, and ACC_PRIVATE can be set for anymethodname_indexcon stant_pool (name_index) is a CONSTANT_Ut f 8 string which is the name of thefield.• ignature_indexconstant_pool ( s ignature_index I is a CONSTANT_Ut f string which is the signatureof the field. See the section "Signatures" for more information on signatures.attributes_countThis value indicates the number of additional attributes about this field.attributesA field can have any number of optional attributes associated with it. Currently, the only fieldattribute recognized is the "Constant Value" attribute, which indicates that this field is a staticnumeric constant, and indicates the constant value of that field.Any other attributes are skipped.2.5 Methods<strong>The</strong> information for each method immediately follows the met hod_count field in the class file. Each methodis described by is variable length method_ i nfo structure. <strong>The</strong> structure has the following format:method_infou2 access_flags;u2 name_index;u2 signature_index;u2 attributes_count;attribute_info attribuceslactribute_countl;access_flagsThis is a set of sixteen flags used by classes, methods, and fields to describe various propertiesand how they many be accessed by methods in other classes. See the table "'Access Flags - onpage 12 which gives the various bits in this field.<strong>The</strong> possible fields that can be set for a method are ACC_PUBLIC, ACC_PRIVATE,ACC_ PROTECTED, ACC_STATIC, ACC_F I NAL, ACC_S YNCHRON I 2 ED, ACC _NAT I V E, aridACC_ABSTFtACT.Al most one of ACC_PUBLIC, ACC_PROTECTED, and ACC__PR I VATE can be set for anymethod.name_ indexconstant._pool (name_index) is a CONSTANT_Ut f 0 string giving the name of themethod.signature_indexconstant_pool ( s ignature_i ndex) is a CONSTANT_Ut f 8 string giving the signature ofthe field. See the section "Signatures" for more information on signatures.attributes_countThis value indicates the number of additional attributes about this field.attribute.A field can have any number of optional attributes associated with it. Each attribute has aname, and other additional information. Currently, the only field attributes recognized are the"Code" and "Exceptions" attributes, which describe the bytecodes that are executed toperform this method, and the Java Exceptions which are declared to result from the executionof the method, respectively.Any other attributes are skipped.2.6 AttributesAttributes are used at several different places in the class format. All attributes have the following format.GenericAttribute_infou2 attribute_name;u4 attribute_length;ul infolattribute_length);<strong>The</strong> attr ibute_name is a 16•bit index into the class's constant pool; the value ofconstant_pool ( at t r bute_name I is a CONSTANT_Ut f8 string giving the name of the attribute. thefield attribute_length indicates the length of the subsequent information in bytes. This length does notinclude the six bytes of the attribute_name and at tri bo t e_l ength.In the following text, whenever we allow attributes, we give the name of the attributes that are currentlyunderstood. In the future, more attributes will be added. Class file readers are expected to skip over and ignorethe information in any attribute they do not understand.Augurs 22, 1995 JAVA Vlrtunt Machine SpetIlICA11011 19 20 JAVA VIMIAIMAthille Spe

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!