Java Reference
In-Depth Information
D.2.6 Abrupt Method Invocation Completion
A method invocation completes abruptly if execution of a JVM instruction within the
method causes the JVM to throw an exception and that exception is not handled within
the method. Execution of an ATHROW instruction also causes an exception to be explicitly
thrown and, if the exception is not caught by the current method, results in abrupt method
invocation completion. A method invocation that completes abruptly never returns a value
to its invoker.
D.3 Class File
D.3.1 Structure of a Class File
The byte code that j-- generates from a source program is stored in a binary file with a
.class extension. We refer to such files as class files. Each class file contains the definition of
a single class or interface. A class file consists of a stream of 8-bit bytes. All 16-bit, 32-bit,
and 64-bit quantities are constructed by reading in two, four, and eight consecutive 8-bit
bytes, respectively. Multi-byte data items are always stored in big-endian order, where the
high bytes come first.
A class file consists of a single ClassFile structure; in the C language it would be:
ClassFile{
u4magic;
u2minor_version;
u2major_version;
u2constant_pool_count;
cp_infoconstant_pool[constant_pool_count-1];
u2access_flags;
u2this_class;
u2super_class;
u2interfaces_count;
u2interfaces[interfaces_count];
u2fields_count;
field_infofields[fields_count];
u2methods_count;
method_infomethods[methods_count];
u2attributes_count;
attribute_infoattributes[attributes_count];
}
The types u1 , u2 , and u4 represent an unsigned one-, two-, or four-byte quantity, re-
spectively. The items of the ClassFile structure are described below.
 
Search WWH ::




Custom Search