Following the constant pool is information about the class itself: its name, type, and access flags. For this class, the class information section is 00015b 0021 access_flags = 33 00015d 0005 this = #5 00015f 0003 super = #3 000161 0000 0 interfaces The first two bytes are access flags for the class. They are interpreted as a bit vector, revealing some class-level information. The meaning of these bits, from right to left, is shown in Figure 9.1 and Table 9.3. Figure 9.1. Class access flags with value 33ACC_PUBLIC means that the class is public; that is, any other class in any package may reference it. The ACC_SUPER bit has a special meaning for classes containing the invokespecial instruction, as discussed in section 4.5.5. ACC_SUPER corresponds to the super keyword on the .class directive. All class files generated from Java programs should have this bit set. The next two bytes are a reference into the constant pool that indicates the name of this class. It is expected to be a Class entry. A Class entry contains a reference to a UTF8 constant, in this case constant 19, hello. Similarly, the next two bytes name the superclass of this class. In this case the name of the superclass is java/lang/Object. If the value of these two bytes is 0, then there is no superclass. Only the class java.lang.Object is permitted to have no superclass; in any other class, it is an error. This ensures that Object is always the root of the class hierarchy.
|