The Class File Format, from JDK 1.5 revision of this section, entitled ClassFileFormat-final.draft.pdf, has been used to define the contents of this file. Originally, the standard and well-published JDK 1.2 revision was used, and there are a number of intermediate and semi-official documents, but this seems to be the best and most accurate.
ALL definitions that are not explicitly defined in this document, yet are either conveniently placed here due to intrinsic association with those that are in the document, or those needed for late binding into the runtime structures of this implementation, are prefixed with the string token LOCAL_ for ease of identification.
Any field of any data structure that is not documented will have its definition in the JVM specfication itself. The larger structures tend to have at least some notes, but individual fields that are fully described in the JVM spec are likely not to have redundant commentary here.
The JVM specification is available from Sun Microsystems' web site at http://java.sun.com/docs/books/vmspec/index.html and may be read online at http://java.sun.com/docs/books/vmspec/2nd-edition/html/VMSpecTOC.doc.html
The Java 5 class file format is available as a PDF file separately at http://java.sun.com/docs/books/vmspec/2nd-edition/ClassFileFormat-final-draft.pdf and was the basis for the ClassFile structure of this implementation.
Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
Definition in file classfile.h.
Go to the source code of this file.
Data Structures | |
struct | annotation |
The class file annotation structure definition. More... | |
struct | AnnotationDefault_attribute |
The AnnotationDefault Attribute. More... | |
struct | array_values |
The class file array_value structure definition. More... | |
struct | attribute_info |
Attributes of a field, method, or class. More... | |
struct | attribute_info_dup |
Pad attribute_info structures for proper multi-byte field address boundary alignment. More... | |
struct | ClassFile |
The ClassFile structure definition. More... | |
struct | Code_attribute |
struct | CONSTANT_Class_info |
struct | CONSTANT_Class_info::LOCAL_Class_binding |
Local implementation late binding extensions for CONSTANT_Class_info. More... | |
struct | CONSTANT_Double_info |
struct | CONSTANT_Double_info::LOCAL_Double_binding |
Local implementation late binding extensions for CONSTANT_Double_info. More... | |
struct | CONSTANT_Fieldref_info |
struct | CONSTANT_Fieldref_info::LOCAL_Fieldref_binding |
Local implementation late binding extensions for CONSTANT_Fieldref_info. More... | |
struct | CONSTANT_Float_info |
struct | CONSTANT_Float_info::LOCAL_Float_binding |
Local implementation late binding extensions for CONSTANT_Float_info. More... | |
struct | CONSTANT_Integer_info |
struct | CONSTANT_Integer_info::LOCAL_Integer_binding |
Local implementation late binding extensions for CONSTANT_Integer_info. More... | |
struct | CONSTANT_InterfaceMethodref_info |
struct | CONSTANT_InterfaceMethodref_info::LOCAL_InterfaceMethodref_binding |
Local implementation late binding extensions for CONSTANT_InterfaceMethodref_info. More... | |
struct | CONSTANT_Long_info |
struct | CONSTANT_Long_info::LOCAL_Long_binding |
Local implementation late binding extensions for CONSTANT_Long_info. More... | |
struct | CONSTANT_Methodref_info |
struct | CONSTANT_Methodref_info::LOCAL_Methodref_binding |
Local implementation late binding extensions for CONSTANT_Methodref_info. More... | |
struct | CONSTANT_NameAndType_info |
struct | CONSTANT_NameAndType_info::LOCAL_NameAndType_binding |
Local implementation late binding extensions for CONSTANT_NameAndType_info. More... | |
struct | CONSTANT_String_info |
struct | CONSTANT_String_info::LOCAL_String_binding |
Local implementation late binding extensions for CONSTANT_String_info. More... | |
struct | CONSTANT_Utf8_info |
struct | CONSTANT_Utf8_info::LOCAL_Utf8_binding |
Local implementation late binding extensions for CONSTANT_Utf8_info. More... | |
struct | ConstantValue_attribute |
struct | cp_info |
constant_pool entry. More... | |
struct | cp_info_dup |
Pad cp_info structures for proper multi-byte field address boundary alignment. More... | |
struct | Deprecated_attribute |
struct | element_value |
The class file element_value structure. More... | |
struct | element_value_pair |
The class file element_value_pair structure. More... | |
struct | EnclosingMethod_attribute |
struct | enum_const_value |
The class file enum_const_value structure. More... | |
struct | exception_table_entry |
The class file exception_table structure, here named as exception_table_entry (to avoid naming conflicts in code versus spec requirements). More... | |
struct | Exceptions_attribute |
struct | field_info |
Field table entry. More... | |
struct | field_info::LOCAL_field_binding |
Local implementation late binding extensions for fields. More... | |
struct | inner_class_table_entry |
The class file inner_class_table_entry structure (anonymous in spec). More... | |
struct | InnerClasses_attribute |
struct | line_number_table_entry |
The class file line_number_table_entry structure (anonymous in spec). More... | |
struct | LineNumberTable_attribute |
struct | local_variable_table_entry |
The class file local_variable_table_entry structure (anonymous in spec). More... | |
struct | local_variable_type_table_entry |
The class file local_variable_type_table_entry structure (anonymous in spec). More... | |
struct | LocalVariableTable_attribute |
struct | LocalVariableTypeTable_attribute |
struct | method_info |
Method table entry. More... | |
struct | method_info::LOCAL_method_binding |
Local implementation late binding extensions for methods. More... | |
struct | parameter_annotation |
The RuntimeVisibleParameterAnnotations Attribute. More... | |
struct | RuntimeInvisibleAnnotations_attribute |
The RuntimeInvisibleAnnotations Attribute. More... | |
struct | RuntimeInvisibleParameterAnnotations_attribute |
The RuntimeInvisibleParameterAnnotations Attribute. More... | |
struct | RuntimeVisibleAnnotations_attribute |
struct | RuntimeVisibleParameterAnnotations_attribute |
struct | Signature_attribute |
struct | SourceFile_attribute |
struct | Synthetic_attribute |
union | values_union |
The class file values_union structure (anonymous in spec). More... | |
Table 4.1: Access Flags for Classes | |
The first definition of all such tokens is found here. Throughout the spec, many of these symbols will be redefined to be the same value. Such redefinitions are commented here in source, but are not redefined per se. There is no "grand union" definition.
For other ACC_xxx definitions, see also table 4.4, 4.5, 4.7, where more definitions are found. | |
#define | ACC_ABSTRACT 0x0400 |
Declared abstract ; may not be instantiated. | |
#define | ACC_ANNOTATION 0x2000 |
Declared as an annotation type. | |
#define | ACC_ENUM 0x4000 |
Declared as an enum type. | |
#define | ACC_FINAL 0x0010 |
Declared final;no subclasses allowed. | |
#define | ACC_INTERFACE 0x0200 |
Is an interface, not a class. | |
#define | ACC_PUBLIC 0x0001 |
Declared public; may be accessed from outside its package. | |
#define | ACC_SUPER 0x0020 |
Treat superclass methods specially when invoked by the INVOKESPECIAL instruction. | |
#define | ACC_SYNTHETIC 0x1000 |
Declared synthetic ; not present in the source code. | |
#define | LOCAL_ACC_EMPTY 0x0000 |
Not defined, empty (not in spec). | |
Section 4.7: Methods | |
Table 4.5: Access Flags for methods (New comments, plus new definitions) typedef struct method_info: See forward references above definition of ClassFile Defined first in section 4.7 (Methods), possibly later also.
For other ACC_xxx definitions, see also table 4.1, 4.4, 4.7. | |
#define | ACC_BRIDGE 0x0040 |
A bridge method, generated by the compiler. | |
#define | ACC_NATIVE 0x0100 |
Declared native ; implemented in a language other than Java. | |
#define | ACC_STRICT 0x0800 |
Declared strictfp ; floating-point mode is FP-strict. | |
#define | ACC_SYNCHRONIZED 0x0010 |
Declared synchronized ; invokation is wrapped in a monitor lock. | |
#define | ACC_VARARGS 0x0080 |
Declared with variable number of arguments. | |
Section 4.6: Fields | |
Table 4.4: Access Flags for Fields (New comments, plus new definitions) typedef struct field_info: See forward references above definition of ClassFile. Defined first in section 4.6 (Fields), possibly later also.
For other ACC_xxx definitions, see also table 4.1, 4.5, 4.7. | |
#define | ACC_PRIVATE 0x0002 |
Declared private ; usable only within the defining class. | |
#define | ACC_PROTECTED 0x0004 |
Declared protected ; may be accessed within subclasses. | |
#define | ACC_STATIC 0x0008 |
Declared static . | |
#define | ACC_TRANSIENT 0x0080 |
Declared transient ; not written or read by a persistent object manager. | |
#define | ACC_VOLATILE 0x0040 |
Declared volatile ; cannot be cached. | |
Byte aligned structure entries. | |
Frame cp_info and attribute_info entries for correct byte alignment on real machine architectures that require it.
The following structure is used for aligning (cp_info) data on 4-byte addresses with the exception of the one-byte
short x, *p; // (short) ... p = some_value(); ... x = *p; and for 32-bit accesses, int x, *p; // (int), etc. ... p = some_value(); ... x = *p; both produce a SIGSEGV when p is not aligned on an 2- or 4-byte address, respectively.
By introducing the command line option to force structure packing, this situation can occur (e.g.: GCC | |
#define | ATTRIBUTE_INFO_NUM_EMPTIES 2 |
Size of padding for attribute_info structures insize of attribute_info_dup structure. | |
#define | CP_INFO_NUM_EMPTIES 3 |
Size of padding for cp_info structures insize of cp_info_dup structure. | |
Section 4.4.2: Field Descriptors | |
Table 4.2: BaseType Character Definitions | |
#define | BASETYPE_CHAR_ARRAY '[' |
Reference to one array dimension. | |
#define | BASETYPE_CHAR_B 'B' |
Signed byte. | |
#define | BASETYPE_CHAR_C 'C' |
Unicode character. | |
#define | BASETYPE_CHAR_D 'D' |
Double-precision floating-point value. | |
#define | BASETYPE_CHAR_F 'F' |
Single-precision floating-point value. | |
#define | BASETYPE_CHAR_I 'I' |
Integer. | |
#define | BASETYPE_CHAR_J 'J' |
Long integer. | |
#define | BASETYPE_CHAR_L 'L' |
an instance of class '/class/name' | |
#define | BASETYPE_CHAR_L_TERM ';' |
terminator for instance of class | |
#define | BASETYPE_CHAR_S 'S' |
Signed short. | |
#define | BASETYPE_CHAR_Z 'Z' |
Boolean, true or false. | |
#define | BASETYPE_STRING_ARRAY "[" |
null-terminated string form of BASETYPE_CHAR_ARRAY | |
#define | BASETYPE_STRING_L "L" |
null-terminated string form of BASETYPE_CHAR_L | |
#define | BASETYPE_STRING_L_TERM ";" |
null-terminated string form of BASETYPE_CHAR_L_TERM | |
#define | LOCAL_BASETYPE_ERROR '?' |
Invalid basetype due to malformed tag or other error (not in spec). | |
Table 4.8: Additional tag values for annotation attributes | |
#define | BASETYPE_CHAR_AT '@' |
Annotation type. | |
#define | BASETYPE_CHAR_c 'c' |
Class. | |
#define | BASETYPE_CHAR_e 'e' |
enum constant | |
#define | BASETYPE_CHAR_s 's' |
String. | |
#define | BASETYPE_STRING_CHAR_ARRAY "[C" |
java.lang.String (jchar)[] value field | |
Section 4.4.4: Signatures | |
#define | BASETYPE_CHAR_T 'T' |
a type variable signature | |
JVM spec Section 4.2: The ClassFile structure. | |
The following structure definition is NOT MEANT TO BE AN EXACT REPRESENTATION OF THE DATA STRUCTURES SHOWN IN THE JAVA CLASS FILE SPECIFICATION! That document contains numerous pseudo-code representations of data structures. Instead, this definition is designed to be an actual real machine implementation of that specification. Each of the variable-length structures from the spec are stored as arrays of pointers to those structures, which are located in heap allocated memory areas and their length, being always defined in the spec as preceding the variable-length area, tells how many elements are found in each array. For example, ClassFile.constant_pool_count and ClassFile.constant_pool. Each element may, of course, be of variable size according to its actual contents, and this will be reflected by the size of each heap allocation.
Furthermore, any variable or data type marked LOCAL_ in this structure and its subsidiary components is a local implementation extension that is no found in the specification, but is used by the JVM runtime environment to facilitate processing, expecially to expedite class linkages. For example, CONSTANT_Class_info and CONSTANT_Class_info.LOCAL_Class_binding. | |
#define | CLASSFILE_MAGIC 0xCAFEBABE |
Magic number for class files. | |
Section 4.3: The Internal Form of Fully Qualified Class and Interface Names | |
#define | CLASSNAME_EXTERNAL_DELIMITER_CHAR '.' |
#define | CLASSNAME_EXTERNAL_DELIMITER_STRING "." |
#define | CLASSNAME_INTERNAL_DELIMITER_CHAR '/' |
#define | CLASSNAME_INTERNAL_DELIMITER_STRING "/" |
Section 4.8.3: The Code Attribute | |
#define | CODE_ATTRIBUTE_MAX_LOCALS_BOUNDARY_LONGDOUBLE 2 |
#define | CODE_ATTRIBUTE_MAX_LOCALS_BOUNDARY_OTHERS 1 |
#define | CONSTANT_UTF8_CODE_ATTRIBUTE "Code" |
#define | LOCAL_CODE_ATTRIBUTE_ENUM 2 |
Not in spec. | |
Section 4.10.1: Static Constraints | |
#define | CODE_CONSTRAINT_CODE_LENGTH_MAX 65535 |
#define | CODE_CONSTRAINT_CODE_LENGTH_MIN 1 |
Array size bounds,bytes. | |
#define | CODE_CONSTRAINT_OP_ANEWARRAY_MAX_DIMS CONSTANT_MAX_ARRAY_DIMS |
#define | CODE_CONSTRAINT_OP_INVOKEINTERFACE_PARM4 0 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_BOOLEAN 4 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_BYTE 8 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_CHAR 5 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_DOUBLE 7 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_FLOAT 6 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_INT 10 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_LONG 11 |
#define | CODE_CONSTRAINT_OP_NEWARRAY_TYPE_T_SHORT 9 |
#define | CODE_CONSTRAINT_START_PC 0 |
Start PC location. | |
#define | LOCAL_CONSTANT_UTF8_CLASS_CONSTRUCTOR "<clinit>" |
Not in spec,but implied. | |
#define | LOCAL_CONSTANT_UTF8_CLASS_CONSTRUCTOR_PARMS "()V" |
Section 4.8.4: The Exceptions Attribute | |
#define | CODE_DEFAULT_CATCH_TYPE 0 |
This handler is for all exceptions. | |
#define | CONSTANT_UTF8_EXCEPTIONS_ATTRIBUTE "Exceptions" |
#define | LOCAL_EXCEPTIONS_ATTRIBUTE_ENUM 3 |
Not in spec. | |
Table 4.3: ConstantType Definitions | |
#define | CONSTANT_Class 7 |
#define | CONSTANT_Double 6 |
#define | CONSTANT_Fieldref 9 |
#define | CONSTANT_Float 4 |
#define | CONSTANT_Integer 3 |
#define | CONSTANT_InterfaceMethodref 11 |
#define | CONSTANT_Long 5 |
#define | CONSTANT_Methodref 10 |
#define | CONSTANT_NameAndType 12 |
#define | CONSTANT_String 8 |
#define | CONSTANT_Utf8 1 |
Section 4.5: The Constant Pool | |
typedef struct cp_info: See fwd refs above typedef ClassFile
See also table 4.3: ConstantType Definitions | |
#define | CONSTANT_CP_DEFAULT_INDEX 0 |
References java.lang.Object. | |
#define | CONSTANT_CP_START_INDEX 1 |
Ref first constant item. | |
Section 4.5.1: The CONSTANT_Class_info structure | |
#define | CONSTANT_MAX_ARRAY_DIMS 255 |
Highest number of array dimensions. | |
#define | LOCAL_CONSTANT_NO_ARRAY_DIMS 0 |
Not stated in spec, but implied. | |
#define | CONSTANT_UTF8_ANNOTATIONDEFAULT_ATTRIBUTE "AnnotationDefault" |
#define | LOCAL_ANNOTATIONDEFAULT_ATTRIBUTE_ENUM 17 |
Not in spec. | |
Section 4.8.2: The ConstantValue Attribute | |
See also table 4.6: Valid ConstantValue Field Types | |
#define | CONSTANT_UTF8_CONSTANTVALUE_ATTRIBUTE "ConstantValue" |
#define | CONSTANTVALUE_ATTRIBUTE_LENGTH 2 |
#define | LOCAL_CONSTANTVALUE_ATTRIBUTE_ENUM 1 |
Not in spec. | |
Section 4.8.13: The Deprecated Attribute | |
#define | CONSTANT_UTF8_DEPRECATED_ATTRIBUTE "Deprecated" |
#define | DEPRECATED_ATTRIBUTE_LENGTH 0 |
#define | LOCAL_DEPRECATED_ATTRIBUTE_ENUM 12 |
Not in spec. | |
Section 4.8.6: The EnclosingMethod Attribute | |
#define | CONSTANT_UTF8_ENCLOSINGMETHOD_ATTRIBUTE "EnclosingMethod" |
#define | ENCLOSINGMETHOD_ATTRIBUTE_LENGTH 4 |
#define | LOCAL_ENCLOSINGMETHOD_ATTRIBUTE_ENUM 5 |
Not in spec. | |
Section 4.8.5: The InnerClasses Attribute | |
For other ACC_xxx definitions, see also table 4.1, 4.4, 4.5. | |
#define | CONSTANT_UTF8_INNERCLASSES_ATTRIBUTE "InnerClasses" |
#define | LOCAL_INNERCLASSES_ATTRIBUTE_ENUM 4 |
Not in spec. | |
Section 4.5.6: The CONSTANT_NameAndType_info structure | |
#define | CONSTANT_UTF8_INSTANCE_CONSTRUCTOR "<init>" |
#define | CONSTANT_UTF8_INSTANCE_CONSTRUCTOR_DESCRIPTOR_DEFAULT "()V" |
(Not in this section of spec, but very relevant) | |
Section 4.8.10: The LineNumberTable Attribute | |
#define | CONSTANT_UTF8_LINENUMBERTABLE_ATTRIBUTE "LineNumberTable" |
#define | LOCAL_LINENUMBERTABLE_ATTRIBUTE_ENUM 9 |
Not in spec. | |
Section 4.8.11: The LocalVariableTable Attribute | |
#define | CONSTANT_UTF8_LOCALVARIABLETABLE_ATTRIBUTE "LocalVariableTable" |
#define | LOCAL_LOCALVARIABLETABLE_ATTRIBUTE_ENUM 10 |
Not in spec. | |
Section 4.8.12: The LocalVariableTypeTable Attribute | |
#define | CONSTANT_UTF8_LOCALVARIABLETYPETABLE_ATTRIBUTE "LocalVariableTypeTable" |
#define | LOCAL_LOCALVARIABLETYPETABLE_ATTRIBUTE_ENUM 11 |
Not in spec. | |
#define | CONSTANT_UTF8_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE "RuntimeInvisibleAnnotations" |
#define | LOCAL_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE_ENUM 14 |
Not in spec. | |
#define | CONSTANT_UTF8_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE "RuntimeInvisibleParameterAnnotations" |
#define | LOCAL_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE_ENUM 16 |
Not in spec. | |
Section 4.8.14: The RuntimeVisibleAnnotations Attribute | |
Xtodo When implementing RuntimeXxxAnnotations attributes, MAKE SURE to understand the implications of ARCH_ODD2_ADDRESS_SIGSEGV and ARCH_ODD4_ADDRESS_SIGSEGV upon 2- and 4-byte integer storage accesses, respectively. | |
#define | CONSTANT_UTF8_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE "RuntimeVisibleAnnotations" |
#define | ELEMENT_VALUE(var) (*(values_union *) &(&var)->_value) |
#define | LOCAL_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE_ENUM 13 |
Not in spec. | |
#define | PTR_ELEMENT_VALUE(ptr) ( (values_union *) &(ptr)->_value) |
#define | CONSTANT_UTF8_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE "RuntimeVisibleParameterAnnotations" |
#define | LOCAL_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE_ENUM 15 |
Not in spec. | |
Section 4.8.8: The Signature Attribute | |
#define | CONSTANT_UTF8_SIGNATURE_ATTRIBUTE "Signature" |
#define | LOCAL_SIGNATURE_ATTRIBUTE_ENUM 6 |
Not in spec. | |
#define | SIGNATURE_ATTRIBUTE_LENGTH 2 |
Section 4.8.9: The SourceFile Attribute | |
#define | CONSTANT_UTF8_SOURCEFILE_ATTRIBUTE "SourceFile" |
#define | LOCAL_SOURCEFILE_ATTRIBUTE_ENUM 8 |
Not in spec. | |
#define | SOURCEFILE_ATTRIBUTE_LENGTH 2 |
Section 4.8.7: The Synthetic Attribute | |
#define | CONSTANT_UTF8_SYNTHETIC_ATTRIBUTE "Synthetic" |
#define | LOCAL_SYNTHETIC_ATTRIBUTE_ENUM 7 |
Not in spec. | |
#define | SYNTHETIC_ATTRIBUTE_LENGTH 0 |
Section 4.5.5: The CONSTANT_Long_info and | |
CONSTANT_Double_info structures | |
#define | DOUBLE_IS_NAN(dfpval) |
#define | DOUBLE_NEGATIVE_INFINITY 0xfff0000000000000L |
#define | DOUBLE_POSITIVE_INFINITY 0x7ff0000000000000L |
#define | DPFTYPE_INT unsigned int |
32-bit value | |
#define | DPFTYPE_LONG unsigned long long |
64-bit value | |
Section 4.5.4: The CONSTANT_Integer_info and | |
CONSTANT_Float_info structures | |
#define | FLOAT_IS_NAN(sfpval) |
#define | FLOAT_NEGATIVE_INFINITY 0xff800000 |
#define | FLOAT_POSITIVE_INFINITY 0x7f800000 |
#define | SPFTYPE_INT unsigned int |
32-bit value | |
Section 4.4: Descriptors-- Section 4.4.1: Grammar Notation | |
#define | GRAMMAR_PARM_CLOSE ')' |
Open parenthesis for starting a param defn. | |
#define | GRAMMAR_PARM_OPEN '(' |
Open parenthesis for starting a param defn. | |
Section 4.8.1: Defining and Naming new Attributes | |
typedef struct attribute_info: See forward references above definition of ClassFile | |
#define | LOCAL_CONSTANT_UTF8_UNKNOWN_ATTRIBUTE "Unknown" |
Not in spec. | |
#define | LOCAL_UNKNOWN_ATTRIBUTE_ENUM 0 |
Not in spec. | |
Section 4.4.3: Method Descriptors | |
#define | METHOD_CHAR_CLOSE_PARM ')' |
Open parameter list. | |
#define | METHOD_CHAR_OPEN_PARM '(' |
Open parameter list. | |
#define | METHOD_CHAR_VOID 'V' |
No return type, instead: (rvoid) fn(p1,p2,. | |
#define | METHOD_PARM_MAX 255 |
Max length of method descriptor string. | |
#define | METHOD_STRING_CLOSE_PARM ")" |
null-terminated string form of METHOD_CHAR_OPEN_PARM | |
#define | METHOD_STRING_OPEN_PARM "(" |
null-terminated string form of METHOD_CHAR_OPEN_PARM | |
#define | METHOD_STRING_VOID "V" |
null-terminated string form of METHOD_CHAR_VOID | |
Section 4.5.2: The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info structures | |
#define | METHOD_CHAR_INIT '<' |
Special character for naming of an object constructor method name, that is, the <init> method , and the class constructor method name, that is, the <clinit> method . | |
Section 4.5.7: Support for the CONSTANT_Utf8_info structure | |
| |
#define | UNICODE_DOUBLE_MAX 0x07ff |
'\u07ff', Unicode representation | |
#define | UNICODE_DOUBLE_MIN 0x0080 |
'\u0080', Unicode representation | |
#define | UNICODE_DOUBLE_NUL 0x0000 |
'\u0000', Unicode representation | |
#define | UNICODE_SINGLE_MAX 0x007f |
'\u007f', Unicode representation | |
#define | UNICODE_SINGLE_MIN 0x0001 |
'\u0001', Unicode representation | |
#define | UNICODE_TRIPLE_MAX 0xffff |
'\uffff', Unicode representation | |
#define | UNICODE_TRIPLE_MIN 0x0800 |
'\u0800', Unicode representation | |
#define | UTF8_DOUBLE_FIRST_MASK0 0x1f |
Bottom 5 bits contain data bits 10-6. | |
#define | UTF8_DOUBLE_FIRST_MASK1 0xe0 |
Top 3 bits of first byte. | |
#define | UTF8_DOUBLE_FIRST_SHIFT 6 |
Move first byte up to bits 10-6. | |
#define | UTF8_DOUBLE_FIRST_VAL 0xc0 |
Top 3 bits are '110'. | |
#define | UTF8_DOUBLE_MAX 0x07ff |
'\u07ff', UTF-8 representation | |
#define | UTF8_DOUBLE_MIN 0x0080 |
'\u0080', UTF-8 representation | |
#define | UTF8_DOUBLE_NUL 0x0000 |
'\u0000', UTF-8 representation | |
#define | UTF8_DOUBLE_SECOND_MASK0 0x3f |
Bottom 6 bits contain data bits 0-5. | |
#define | UTF8_DOUBLE_SECOND_MASK1 0xc0 |
Top 2 bits of second byte. | |
#define | UTF8_DOUBLE_SECOND_VAL 0x80 |
Top 2 bits are '10'. | |
#define | UTF8_SINGLE_MASK0 0x7f |
Bits 0-6 contain data (except != 0, or NUL). | |
#define | UTF8_SINGLE_MASK1 0x80 |
Bit 7 must be clear. | |
#define | UTF8_SINGLE_MAX 0x7f |
'\u007f', UTF-8 representation | |
#define | UTF8_SINGLE_MIN 0x01 |
'\u0001', UTF-8 representation | |
#define | UTF8_TRIPLE_FIRST_MASK0 0x0f |
#define | UTF8_TRIPLE_FIRST_MASK1 0xf0 |
#define | UTF8_TRIPLE_FIRST_SHIFT 12 |
#define | UTF8_TRIPLE_FIRST_VAL 0xe0 |
#define | UTF8_TRIPLE_MAX 0xffff |
'\uffff', UTF-8 representation | |
#define | UTF8_TRIPLE_MIN 0x0800 |
'\u0800', UTF-8 representation | |
#define | UTF8_TRIPLE_SECOND_MASK0 0x3f |
#define | UTF8_TRIPLE_SECOND_MASK1 0xc0 |
#define | UTF8_TRIPLE_SECOND_SHIFT 6 |
#define | UTF8_TRIPLE_SECOND_VAL 0x80 |
#define | UTF8_TRIPLE_THIRD_MASK0 0x3f |
#define | UTF8_TRIPLE_THIRD_MASK1 0xc0 |
#define | UTF8_TRIPLE_THIRD_VAL 0x80 |
Forbidden UTF values. | |
No byte in bytes[] may contain these values because they present certain parsing problems in the Java subset of UTF-8. | |
#define | UTF8_FORBIDDEN_MAX 0xff |
Max of forbidden range. | |
#define | UTF8_FORBIDDEN_MIN 0xf0 |
Min of range for 4-byte UTF values,etc. | |
#define | UTF8_FORBIDDEN_ZERO 0x00 |
Looks suspiciously like ASCII NUL. | |
Define range of supported class file versions | |
#define | VERSION_MAJOR_HIGH VERSION_MAJOR_JDK5 |
#define | VERSION_MAJOR_LOW VERSION_MAJOR_JDK1 |
#define | VERSION_MINOR_HIGH 0 |
#define | VERSION_MINOR_LOW 0 |
List of all class file versions | |
#define | VERSION_MAJOR_JDK1 45 |
#define | VERSION_MAJOR_JDK2 46 |
#define | VERSION_MAJOR_JDK3 47 |
#define | VERSION_MAJOR_JDK4 48 |
#define | VERSION_MAJOR_JDK5 49 |
Defines | |
#define | CONSTANT_UTF8_JAVA_LANG_OBJECT "java/lang/Object" |
Root Java language object name. | |
#define | VERSION_MINOR_DEFAULT 0 |
Default minor version number for primative pseudo-classes. | |
Enumerations | |
enum | classfile_attribute_enum { LOCAL_UNKNOWN_ATTRIBUTE, LOCAL_CONSTANTVALUE_ATTRIBUTE, LOCAL_CODE_ATTRIBUTE, LOCAL_EXCEPTIONS_ATTRIBUTE, LOCAL_INNERCLASSES_ATTRIBUTE, LOCAL_ENCLOSINGMETHOD_ATTRIBUTE, LOCAL_SYNTHETIC_ATTRIBUTE, LOCAL_SIGNATURE_ATTRIBUTE, LOCAL_SOURCEFILE_ATTRIBUTE, LOCAL_LINENUMBERTABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETYPETABLE_ATTRIBUTE, LOCAL_DEPRECATED_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_ANNOTATIONDEFAULT_ATTRIBUTE } |
Section 4.10.2: Structural Constraints Section 4.11: Verification of class Files Section 4.11.1: Verification by Type Inference Section 4.11.1.1: The Process of Verification by Type InferenceSection 4.11.1.2: The Bytecode VerifierSection 4.11.1.3: Values of Types long and doubleSection 4.11.1.4 : Instance Initialization Methods and Newly Created ObjectsSection 4.11.1.5: Exception HandlersSection 4.9.6: Exceptions and finally -- Removed from this JVM 1.5 edition, possibly from 1.4.Section 4.12: Limitations of the Java Virtual MachineAttribute enumeration. More... | |
Functions | |
ARCH_COPYRIGHT_APACHE (classfile, h,"$URL: https://svn.apache.org/path/name/classfile.h $ $Id: classfile.h 0 09/28/2005 dlydick $") | |
classfile_attribute_enum | cfattrib_atr2enum (ClassFile *pcfs, u2 attribute_attribute_name_index) |
Map UTF8 string names for attributes in a constant_pool to LOCAL_xxx_ATTRIBUTE constants for the purpose of switch(int) instead of switch("string") code constructions. | |
rboolean | cfattrib_iscodeattribute (ClassFile *pcfs, u2 attribute_attribute_name_index) |
Short version of cfattrib_atr2enum(), but only check if an index refers to a Code_attribute area. | |
u1 * | cfattrib_loadattribute (ClassFile *pcfs, attribute_info_dup **dst, attribute_info *src) |
Load an attribute and verify that it has either valid contents or is ignored as an unknown attribute. | |
rvoid | cfattrib_unloadattribute (ClassFile *pcfs, attribute_info_dup *dst) |
UnLoad an attribute and free its heap area. | |
rvoid | cfmsgs_atrmsg (rchar *fn, ClassFile *pcfs, attribute_info_dup *atr) |
Display details of what an attribute entry contains. | |
rvoid | cfmsgs_show_constant_pool (ClassFile *pcfs) |
Show all entries in the constant pool. | |
rvoid | cfmsgs_typemsg (rchar *fn, ClassFile *pcfs, u2 idx) |
ClassFile * | classfile_allocate_primative (jvm_basetype basetype) |
Build up empty JVM class file structure for use by Java primative data types. | |
ClassFile * | classfile_loadclassdata (u1 *classfile_image) |
Parse an in-memory JVM class file, create structures to point to various parts of it, per JVM spec pseuco-code structures. | |
u1 * | classfile_readclassfile (rchar *filename) |
Read a JVM class file. | |
u1 * | classfile_readjarfile (rchar *filename) |
Read an entire JAR file into temporary disk area and load up one class file from it. | |
rvoid | classfile_unloadclassdata (ClassFile *pcfs) |
Release all heap allocated to a fully loaded ClassFile structure. |
|
Size of padding for cp_info structures insize of cp_info_dup structure.
Definition at line 169 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Size of padding for attribute_info structures insize of attribute_info_dup structure.
Definition at line 192 of file classfile.h. |
|
Magic number for class files.
Definition at line 535 of file classfile.h. Referenced by classfile_allocate_primative(), and classfile_loadclassdata(). |
|
Definition at line 547 of file classfile.h. |
|
Definition at line 548 of file classfile.h. Referenced by classfile_allocate_primative(). |
|
Definition at line 549 of file classfile.h. |
|
Definition at line 550 of file classfile.h. |
|
Definition at line 551 of file classfile.h. |
|
Default minor version number for primative pseudo-classes.
Definition at line 559 of file classfile.h. Referenced by classfile_allocate_primative(). |
|
Definition at line 568 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Definition at line 569 of file classfile.h. |
|
Definition at line 570 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Definition at line 571 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Not defined, empty (not in spec).
Definition at line 594 of file classfile.h. Referenced by object_new_setup(). |
|
Declared public; may be accessed from outside its package.
Definition at line 596 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared final;no subclasses allowed.
Definition at line 599 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Treat superclass methods specially when invoked by the INVOKESPECIAL instruction.
Definition at line 602 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Is an interface, not a class.
Definition at line 606 of file classfile.h. Referenced by classfile_loadclassdata(), and thread_new(). |
|
Declared
Definition at line 608 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 611 of file classfile.h. Referenced by classfile_allocate_primative(), and classfile_loadclassdata(). |
|
Declared as an annotation type.
Definition at line 614 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared as an enum type.
Definition at line 616 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Root Java language object name.
Definition at line 626 of file classfile.h. |
|
Definition at line 636 of file classfile.h. Referenced by classpath_external2internal_classname_inplace(), and jvmutil_print_stack_common(). |
|
Definition at line 637 of file classfile.h. |
|
Definition at line 639 of file classfile.h. Referenced by classpath_external2internal_classname_inplace(). |
|
Definition at line 640 of file classfile.h. |
|
Open parenthesis for starting a param defn.
Definition at line 652 of file classfile.h. |
|
Open parenthesis for starting a param defn.
Definition at line 654 of file classfile.h. |
|
Signed byte.
Definition at line 669 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Unicode character.
Definition at line 670 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Double-precision floating-point value.
Definition at line 671 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Single-precision floating-point value.
Definition at line 673 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Integer.
Definition at line 675 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Long integer.
Definition at line 676 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
an instance of class '/class/name'
For internal use only.
Definition at line 684 of file classfile.h. Referenced by method_return_type(), and nts_prchar2utf_classname(). |
|
null-terminated string form of BASETYPE_CHAR_L
Definition at line 685 of file classfile.h. |
|
terminator for instance of class
Definition at line 688 of file classfile.h. Referenced by nts_prchar2prchar_unformatted_classname(), nts_prchar2utf_classname(), utf_pcfs_strcmp(), and utf_utf_isclassformatted(). |
|
null-terminated string form of BASETYPE_CHAR_L_TERM
Definition at line 690 of file classfile.h. |
|
Signed short.
Definition at line 695 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Boolean, true or false.
Definition at line 696 of file classfile.h. Referenced by method_return_type(), and nts_prchar_isprimativeformatted(). |
|
Reference to one array dimension.
Definition at line 698 of file classfile.h. Referenced by method_return_type(), nts_prchar2utf_classname(), and utf_classname_strcmp(). |
|
null-terminated string form of BASETYPE_CHAR_ARRAY
Definition at line 700 of file classfile.h. |
|
Invalid basetype due to malformed
Definition at line 703 of file classfile.h. Referenced by classfile_loadclassdata(), linkage_resolve_class(), method_return_type(), and object_new_setup(). |
|
No return type, instead: (rvoid) fn(p1,p2,. ..) Definition at line 716 of file classfile.h. Referenced by method_return_type(). |
|
null-terminated string form of METHOD_CHAR_VOID
Definition at line 718 of file classfile.h. |
|
Max length of method descriptor string.
Definition at line 721 of file classfile.h. |
|
Open parameter list.
Definition at line 724 of file classfile.h. |
|
null-terminated string form of METHOD_CHAR_OPEN_PARM
Definition at line 725 of file classfile.h. |
|
Open parameter list.
Definition at line 728 of file classfile.h. Referenced by method_return_type(). |
|
null-terminated string form of METHOD_CHAR_OPEN_PARM
Definition at line 729 of file classfile.h. |
|
a type variable signature
Definition at line 742 of file classfile.h. |
|
References
Definition at line 758 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), jvmutil_print_stack_common(), and thread_new(). |
|
Ref first constant item.
Definition at line 760 of file classfile.h. Referenced by classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 771 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_allocate_primative(), classfile_loadclassdata(), linkage_resolve_class(), and opcode_run(). |
|
Definition at line 772 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), linkage_resolve_class(), and opcode_run(). |
|
Definition at line 773 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), linkage_resolve_class(), and opcode_run(). |
|
Definition at line 774 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 775 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 776 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 777 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 778 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 779 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 780 of file classfile.h. Referenced by cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Definition at line 781 of file classfile.h. Referenced by cfmsgs_typemsg(), class_load_primative(), classfile_allocate_primative(), classfile_loadclassdata(), linkage_resolve_class(), method_find_by_cp_entry(), nts_prchar2utf(), nts_prchar2utf_classname(), and unicode_cnv2utf(). |
|
Highest number of array dimensions.
Definition at line 819 of file classfile.h. Referenced by utf_classname_strcmp(). |
|
Not stated in spec, but implied.
Definition at line 822 of file classfile.h. Referenced by class_load_primative(), class_static_setup(), object_new_setup(), and opcode_load_run_throwable(). |
|
Special character for naming of an object constructor method name, that is, the
Definition at line 991 of file classfile.h. |
|
32-bit value
Definition at line 1107 of file classfile.h. |
|
Definition at line 1115 of file classfile.h. |
|
Definition at line 1116 of file classfile.h. |
|
Value: (((0x7f800001 <= (SPFTYPE_INT) sfpval) && \ (0x7fffffff >= (SPFTYPE_INT) sfpval)) \ || \ ((0xff800001 <= (SPFTYPE_INT) sfpval) && \ (0xffffffff >= (SPFTYPE_INT) sfpval))) Definition at line 1118 of file classfile.h. |
|
64-bit value
Definition at line 1197 of file classfile.h. |
|
32-bit value
Definition at line 1198 of file classfile.h. |
|
Definition at line 1206 of file classfile.h. |
|
Definition at line 1207 of file classfile.h. |
|
Value: (((0x7ff00000000000001 <= (DPFTYPE_LONG) dfpval) && \ (0x7fffffffffffffffL >= (DPFTYPE_LONG) dfpval)) || \ \ ((0xfff0000000000001L <= (DPFTYPE_INT) dfpval) && \ (0xffffffffffffffffL >= (DPFTYPE_INT) dfpval))) Definition at line 1209 of file classfile.h. |
|
Definition at line 1255 of file classfile.h. |
|
(Not in this section of spec, but very relevant)
Definition at line 1257 of file classfile.h. |
|
'\u0001', UTF-8 representation
Definition at line 1317 of file classfile.h. Referenced by unicode_cnv2utf(). |
|
'\u007f', UTF-8 representation
Definition at line 1318 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Bit 7 must be clear.
Definition at line 1320 of file classfile.h. |
|
Bits 0-6 contain data (except != 0, or NUL).
Definition at line 1321 of file classfile.h. Referenced by unicode_cnv2utf(). |
|
'\u0001', Unicode representation
Definition at line 1324 of file classfile.h. |
|
'\u007f', Unicode representation
Definition at line 1326 of file classfile.h. |
|
'\u0000', UTF-8 representation
Definition at line 1332 of file classfile.h. |
|
'\u0080', UTF-8 representation
Definition at line 1333 of file classfile.h. |
|
'\u07ff', UTF-8 representation
Definition at line 1334 of file classfile.h. |
|
'\u0000', Unicode representation
Definition at line 1336 of file classfile.h. Referenced by unicode_cnv2utf(). |
|
'\u0080', Unicode representation
Definition at line 1338 of file classfile.h. Referenced by unicode_cnv2utf(). |
|
'\u07ff', Unicode representation
Definition at line 1340 of file classfile.h. Referenced by unicode_cnv2utf(). |
|
Top 3 bits of first byte.
Definition at line 1346 of file classfile.h. |
|
Top 3 bits are '110'.
Definition at line 1347 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Bottom 5 bits contain data bits 10-6.
Definition at line 1349 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Move first byte up to bits 10-6.
Definition at line 1351 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Top 2 bits of second byte.
Definition at line 1357 of file classfile.h. |
|
Top 2 bits are '10'.
Definition at line 1358 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Bottom 6 bits contain data bits 0-5.
Definition at line 1360 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
'\u0800', UTF-8 representation
Definition at line 1366 of file classfile.h. |
|
'\uffff', UTF-8 representation
Definition at line 1367 of file classfile.h. |
|
'\u0800', Unicode representation
Definition at line 1369 of file classfile.h. |
|
'\uffff', Unicode representation
Definition at line 1371 of file classfile.h. |
|
Definition at line 1377 of file classfile.h. |
|
Definition at line 1378 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1380 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1382 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1388 of file classfile.h. |
|
Definition at line 1389 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1391 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1393 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1399 of file classfile.h. |
|
Definition at line 1400 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Definition at line 1402 of file classfile.h. Referenced by unicode_cnv2utf(), and utf_utf2unicode(). |
|
Looks suspiciously like ASCII NUL.
Definition at line 1457 of file classfile.h. |
|
Min of range for 4-byte UTF values,etc.
Definition at line 1460 of file classfile.h. |
|
Max of forbidden range.
Definition at line 1462 of file classfile.h. |
|
Declared
Definition at line 1487 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 1490 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 1493 of file classfile.h. Referenced by class_get_static_field_data(), class_get_static_field_lookups(), classfile_loadclassdata(), and linkage_resolve_class(). |
|
Declared
Definition at line 1498 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 1501 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 1537 of file classfile.h. Referenced by classfile_loadclassdata(), and opcode_run(). |
|
A bridge method, generated by the compiler.
Definition at line 1541 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared with variable number of arguments.
Definition at line 1544 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Declared
Definition at line 1547 of file classfile.h. Referenced by classfile_loadclassdata(), linkage_resolve_class(), and opcode_run(). |
|
Declared
Definition at line 1553 of file classfile.h. Referenced by classfile_loadclassdata(). |
|
Not in spec.
Definition at line 1573 of file classfile.h. |
|
Not in spec.
Definition at line 1576 of file classfile.h. |
|
Definition at line 1599 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 1601 of file classfile.h. |
|
Not in spec.
Definition at line 1602 of file classfile.h. |
|
Definition at line 1660 of file classfile.h. Referenced by cfattrib_atr2enum(), and cfattrib_iscodeattribute(). |
|
Not in spec.
Definition at line 1662 of file classfile.h. |
|
Definition at line 1665 of file classfile.h. |
|
Definition at line 1667 of file classfile.h. |
|
Definition at line 1691 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 1693 of file classfile.h. |
|
This handler is for all exceptions.
Definition at line 1695 of file classfile.h. |
|
Definition at line 1738 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 1740 of file classfile.h. |
|
Definition at line 1790 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 1792 of file classfile.h. |
|
Not in spec.
Definition at line 1794 of file classfile.h. |
|
Definition at line 1814 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 1816 of file classfile.h. |
|
Not in spec.
Definition at line 1818 of file classfile.h. |
|
Definition at line 1838 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 1840 of file classfile.h. |
|
Not in spec.
Definition at line 1842 of file classfile.h. |
|
Definition at line 1863 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 1865 of file classfile.h. |
|
Not in spec.
Definition at line 1867 of file classfile.h. |
|
Definition at line 1905 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 1907 of file classfile.h. |
|
Definition at line 1950 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 1952 of file classfile.h. |
|
Definition at line 1994 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 1997 of file classfile.h. |
|
Definition at line 2017 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Definition at line 2019 of file classfile.h. |
|
Not in spec.
Definition at line 2021 of file classfile.h. |
|
Definition at line 2096 of file classfile.h. |
|
Definition at line 2097 of file classfile.h. |
|
Definition at line 2176 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 2179 of file classfile.h. |
|
Definition at line 2204 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 2207 of file classfile.h. |
|
Definition at line 2241 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 2244 of file classfile.h. |
|
Definition at line 2270 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 2273 of file classfile.h. |
|
Definition at line 2297 of file classfile.h. Referenced by cfattrib_atr2enum(). |
|
Not in spec.
Definition at line 2299 of file classfile.h. |
|
String.
Definition at line 2312 of file classfile.h. |
|
enum constant
Definition at line 2313 of file classfile.h. |
|
Class.
Definition at line 2314 of file classfile.h. |
|
Annotation type.
Definition at line 2315 of file classfile.h. |
|
Definition at line 2318 of file classfile.h. |
|
Array size bounds,bytes.
Definition at line 2341 of file classfile.h. |
|
Definition at line 2342 of file classfile.h. |
|
Start PC location.
Definition at line 2344 of file classfile.h. Referenced by object_run_method(), and opcode_run(). |
|
Not in spec,but implied.
Definition at line 2346 of file classfile.h. Referenced by class_load_from_prchar(). |
|
Definition at line 2348 of file classfile.h. Referenced by class_load_from_prchar(). |
|
Definition at line 2350 of file classfile.h. |
|
Definition at line 2351 of file classfile.h. |
|
Definition at line 2353 of file classfile.h. |
|
Definition at line 2354 of file classfile.h. |
|
Definition at line 2355 of file classfile.h. |
|
Definition at line 2356 of file classfile.h. |
|
Definition at line 2357 of file classfile.h. |
|
Definition at line 2358 of file classfile.h. |
|
Definition at line 2359 of file classfile.h. |
|
Definition at line 2360 of file classfile.h. |
|
Section 4.10.2: Structural Constraints Section 4.11: Verification of class Files Section 4.11.1: Verification by Type Inference Section 4.11.1.1: The Process of Verification by Type InferenceSection 4.11.1.2: The Bytecode VerifierSection 4.11.1.3: Values of Types Enumeration of all ClassFile attribute types. Gather the LOCAL_xxx_ATTRIBUTE_ENUM values from all over the file into one place for use in compiling a single enumeration type. These LOCAL_xxx_ATTRIBUTE_ENUM values were defined in the immediate proximity to the attribute they help describe, but this is difficult for creating an enumeration type. Here near the end of the file, each one is defined, so the enumeration type can be created. Once created, the xxx_ENUM version is undefined. Thus the xxx_ENUM is known only locally in this file, while the xxx version is known as part of the enumeration type.
Definition at line 2438 of file classfile.h. |
|
|
|
Build up empty JVM class file structure for use by Java primative data types. Each primative data type needs a minimal class definition to avoid having special cases for class processing logic. Also, treating primatives like classes can provide convenient information on data size types, like (jlong) versus (jint). This can be provided by the base type information, which is passed in here when creating these minimal classes. The constant pool for such a minima class looks like this:
For internal use only. INITIALIZE TO ZEROES all fields so there are automatic rnull pointers in case of failure along the way. < Magic number for class files
Since
< Declared
Definition at line 121 of file classfile.c. References ACC_SYNTHETIC, ClassFile::access_flags, ClassFile::attributes, ClassFile::attributes_count, CONSTANT_Utf8_info::bytes, CLASSFILE_MAGIC, CONSTANT_Class, ClassFile::constant_pool, ClassFile::constant_pool_count, CONSTANT_Utf8, ClassFile::fields, ClassFile::fields_count, HEAP_GET_DATA, ClassFile::interfaces, ClassFile::interfaces_count, CONSTANT_Utf8_info::length, ClassFile::magic, ClassFile::major_version, ClassFile::methods, ClassFile::methods_count, ClassFile::minor_version, CONSTANT_Class_info::name_index, PTR_THIS_CP_Class, PTR_THIS_CP_Utf8, rfalse, rnull, rtrue, ClassFile::super_class, CONSTANT_Class_info::tag, CONSTANT_Utf8_info::tag, ClassFile::this_class, VERSION_MAJOR_JDK2, and VERSION_MINOR_DEFAULT. |
|
Parse an in-memory JVM class file, create structures to point to various parts of it, per JVM spec pseuco-code structures. Interpret the class file data and load up the data structures which access it, such as the fully qualified class names, the code area, etc.
< Magic number for class files < Magic number for class files < Convenient alias for DML1 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML1
< References < Ref first constant item < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1 < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1
< Invalid basetype due to malformed < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1 < Convenient alias for DML1 < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1 < Convenient alias for DML1 < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1 < Size of padding for cp_info structures insize of cp_info_dup structure < Size of padding for cp_info structures insize of cp_info_dup structure < Size of padding for cp_info structures insize of cp_info_dup structure < Size of padding for cp_info structures insize of cp_info_dup structure < Size of padding for cp_info structures insize of cp_info_dup structure < Convenient alias for DML1 < Convenient alias for DML1 < Size of padding for cp_info structures insize of cp_info_dup structure < Size of padding for cp_info structures insize of cp_info_dup structure
< Declared public; may be accessed from outside its package. < Declared final;no subclasses allowed < Treat superclass methods specially when invoked by the INVOKESPECIAL instruction < Is an interface, not a class.
< Declared
< Declared < Declared as an annotation type < Declared as an enum type < Convenient alias for DML5
< Convenient alias for DML5 < Convenient alias for DML1
< Convenient alias for DML5 < Declared public; may be accessed from outside its package.
< Declared
< Declared
< Declared < Declared final;no subclasses allowed
< Declared
< Declared
< Declared < Declared as an enum type < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML5 < Declared public; may be accessed from outside its package.
< Declared
< Declared
< Declared < Declared final;no subclasses allowed
< Declared < A bridge method, generated by the compiler. < Declared with variable number of arguments.
< Declared
< Declared
< Declared
< Declared < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML5 < Convenient alias for DML1
Definition at line 345 of file classfile.c. References ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VARARGS, ACC_VOLATILE, method_info::access_flags, field_info::access_flags, ClassFile::access_flags, attribute_info_dup::ai, ALLOC_CF_ITEM, ALLOC_CP_INFO, attribute_info::attribute_name_index, ClassFile::attributes, method_info::attributes, field_info::attributes, ClassFile::attributes_count, method_info::attributes_count, field_info::attributes_count, cfattrib_atr2enum(), cfattrib_loadattribute(), cfmsgs_show_constant_pool(), cfmsgs_typemsg(), CLASSFILE_MAGIC, method_info::LOCAL_method_binding::codeatridxJVM, CONSTANT_Class, CONSTANT_CP_DEFAULT_INDEX, CONSTANT_CP_START_INDEX, CONSTANT_Double, CONSTANT_Fieldref, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodref, CONSTANT_Long, CONSTANT_Methodref, CONSTANT_NameAndType, ClassFile::constant_pool, ClassFile::constant_pool_count, CONSTANT_String, CONSTANT_Utf8, CP_INFO_NUM_EMPTIES, CP_ITEM_SWAP_U2, CP_ITEM_SWAP_U4, CP_TAG, CPIDX_RANGE_CHECK, CPTYPEIDX_RANGE_CHECK, method_info::descriptor_index, field_info::descriptor_index, DMLNORM, method_info::LOCAL_method_binding::excpatridxJVM, ClassFile::fields, ClassFile::fields_count, FILL_INFO_DUP0, FILL_INFO_DUP1, FILL_INFO_DUP2, field_info::LOCAL_field_binding::fluidxJVM, GENERIC_FAILURE1_PTR, GETRI4, GETRS2, HEAP_FREE_METHOD, HEAP_GET_METHOD, ClassFile::interfaces, ClassFile::interfaces_count, jvm_attribute_index_bad, jvm_class_index_null, jvm_field_index_bad, jvm_method_index_bad, jvm_native_method_ordinal_null, LOAD_SYSCALL_FAILURE, LOCAL_ANNOTATIONDEFAULT_ATTRIBUTE, LOCAL_BASETYPE_ERROR, LOCAL_CODE_ATTRIBUTE, LOCAL_CONSTANTVALUE_ATTRIBUTE, LOCAL_DEPRECATED_ATTRIBUTE, LOCAL_ENCLOSINGMETHOD_ATTRIBUTE, LOCAL_EXCEPTIONS_ATTRIBUTE, field_info::LOCAL_field_binding, LOCAL_INNERCLASSES_ATTRIBUTE, LOCAL_LINENUMBERTABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETYPETABLE_ATTRIBUTE, method_info::LOCAL_method_binding, LOCAL_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_SIGNATURE_ATTRIBUTE, LOCAL_SOURCEFILE_ATTRIBUTE, LOCAL_SYNTHETIC_ATTRIBUTE, LOCAL_UNKNOWN_ATTRIBUTE, MACHINE_JINT_SWAP, MACHINE_JSHORT_SWAP, ClassFile::magic, ClassFile::major_version, MAKE_PU2, MAKE_PU4, ClassFile::methods, ClassFile::methods_count, ClassFile::minor_version, method_info::name_index, field_info::name_index, method_info::LOCAL_method_binding::nmordJVM, PTR_THIS_CP_Class, PTR_THIS_CP_Fieldref, PTR_THIS_CP_InterfaceMethodref, PTR_THIS_CP_Methodref, PTR_THIS_CP_Utf8, rfalse, rneither_true_nor_false, rnull, rtrue, ClassFile::super_class, sysDbgMsg(), ClassFile::this_class, VERSION_MAJOR_HIGH, VERSION_MAJOR_LOW, and VERSION_MINOR_HIGH. |
|
Release all heap allocated to a fully loaded ClassFile structure.
java.lang.Object
Definition at line 1493 of file classfile.c. |
|
Read a JVM class file. If a valid class file is read, return pointer to memory area containing its Java class image. < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML1 < Convenient alias for DML5 Definition at line 1700 of file classfile.c. |
|
Read an entire JAR file into temporary disk area and load up one class file from it. If a valid JAR file is read, return pointer to memory area containing the JAva class image of the startup class that was specified in Jar Manifest file. In the future, all classes in the JAR file will be available for loading from the temporary disk area via CLASSPATH.
< Convenient size for a
< Convenient size for a
< Convenient size for a
Definition at line 1763 of file classfile.c. |
|
Load an attribute and verify that it has either valid contents or is ignored as an unknown attribute. If the attribute index is valid at all (for either a known or even an unknown but properly formed attribute), it will be copied into its destination area.
< Convenient alias for DML5 < Convenient alias for DML1
Definition at line 304 of file cfattrib.c. References attribute_info::attribute_length, attribute_info::attribute_name_index, cfattrib_atr2enum(), cfattrib_loadattribute(), cfmsgs_typemsg(), ClassFile::constant_pool_count, DMLNORM, FILL_INFO_DUP0, FILL_INFO_DUP1, GENERIC_FAILURE_PTR, GETRI4, GETRS2, HEAP_GET_METHOD, attribute_info::info, LOAD_SYSCALL_FAILURE_ATTRIB, LOCAL_ANNOTATIONDEFAULT_ATTRIBUTE, LOCAL_CODE_ATTRIBUTE, LOCAL_CONSTANTVALUE_ATTRIBUTE, LOCAL_DEPRECATED_ATTRIBUTE, LOCAL_ENCLOSINGMETHOD_ATTRIBUTE, LOCAL_EXCEPTIONS_ATTRIBUTE, LOCAL_INNERCLASSES_ATTRIBUTE, LOCAL_LINENUMBERTABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETABLE_ATTRIBUTE, LOCAL_LOCALVARIABLETYPETABLE_ATTRIBUTE, LOCAL_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE, LOCAL_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE, LOCAL_SIGNATURE_ATTRIBUTE, LOCAL_SOURCEFILE_ATTRIBUTE, LOCAL_SYNTHETIC_ATTRIBUTE, LOCAL_UNKNOWN_ATTRIBUTE, MACHINE_JINT_SWAP, MACHINE_JSHORT_SWAP, MAKE_PU2, PTR_DST_AI, rfalse, rnull, rtrue, and sysDbgMsg(). Referenced by cfattrib_loadattribute(), and classfile_loadclassdata(). |
|
UnLoad an attribute and free its heap area.
Definition at line 705 of file cfattrib.c. |
|
|
Short version of cfattrib_atr2enum(), but only check if an index refers to a Code_attribute area.
Definition at line 217 of file cfattrib.c. References CMP_ATTRIBUTE, CONSTANT_UTF8_CODE_ATTRIBUTE, rfalse, and rtrue. |
|
|
|
Show all entries in the constant pool.
< Ref first constant item Definition at line 514 of file cfmsgs.c. Referenced by classfile_loadclassdata(), and linkage_resolve_class(). |
|
Display details of what an attribute entry contains.
< Convenient alias for DML5 < Convenient alias for DML5 < Not in spec < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Convenient alias for DML5 < Not in spec |