In-depth understanding of Java Virtual Machine notes---Class index, parent index, interface index collection

Source: Internet
Author: User
The class index (This_class) and the parent class index (Super_class) are U2 types of data, and the interface index (interfaces) is a set of data sets of U2 type, which is determined by the three data in the class file. The class index is used to determine the fully qualified name of this class, and the parent class index is used to determine the fully qualified name of the parent class of the class. Because the Java language does not allow multiple inheritance, there is only one parent class index, except Java.lang.Object, all Java classes have a parent class, because all Java classes except Java.lang.Object have a parent class index of 0. The interface index collection is used to describe which interfaces are implemented by this implementation, and the implemented interfaces are arranged from left to right in the index collection of the interface, following the interface order of the implements statement.
Class index, the parent class index and the interface index collection are sorted sequentially after the access flag, the class index and the parent index are represented by index values of two U2 types, each pointing to a class description constant of type Constant_class_info, by Constant_class_ An index in a constant of type info can find a fully qualified name string that is defined in a constant of type constant_utf8_info. For an interface index collection, the first entry of the entry is the data of type U2, which represents the interface counter (INTERFACES_COUNTD), which represents the capacity of the Index table. If the class does not implement any interfaces, the counter value is 0, and the index table of the subsequent interface no longer consumes any bytes.

In-depth understanding of Java Virtual Machine notes---Class index, parent index, interface index collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.