Java Virtual machine schematic diagram--1.2, a constant pool in class file

Source: Internet
Author: User

Understanding the JVM virtual Machine principle is a necessary step for every Java programmer to practice. But because there are a lot of things in the JVM virtual machine to tell the relatively broad, in the current exposure to the JVM virtual machine principle of the tutorial or blog, the vast majority of the text-based description, it is difficult to give people a visual perception, after reading the feeling is still confused. Feeling the above, I intend to learn from the process of the JVM virtual machine I learned, combined with their own understanding, summed up into the "Java Virtual machine schematic diagram" this series, in the form of illustrations, the abstract JVM virtual machine knowledge embodied, You want to be able to help Java programmers who want to understand the fundamentals of Java virtual machines.

The previous chapter, "schematic diagram of Java Virtual machine" 1, class file basic organizational structure of the class file is described roughly, then we will drill down into each structure to learn more about them. In this chapter, we're going to take a steak. A data area that is very important in a class file------a constant pool. it plays a very important role in the JVM virtual machine.

This section describes Chang in the following ways:

I. What is a constant pool and Why use a constant pool

Two. Constant pool explanation (top)

  • NO1. where is the constant pool located in the class file?
  • NO2. How is the inside of a constant pool organized?
  • NO3. What is the structure of a constant pool entry (cp_info) ?
  • NO4. Can a constant pool represent that information?
  • NO5. How are constants of the int and float data types represented and stored in a constant pool?
    (----about constant pool entries constant_integer_info, Constant_float_info)
  • NO6. How are constants of the long and double data types represented and stored in a constant pool?
    (
    ----about constant pool entries constant_long_info, Constant_double_info)
  • NO7. How string constants of String type are represented and stored in a constant pool?
    (
    ----about constant pool entry constant_string_info,constant_utf8_info)
  • NO8. How is the class name defined in the class file and the classes used in the class organized and stored in the constant pool?
    (----about constant pool entry constant_class_info)

Three. Constant pool explanation (bottom)

  • NO9. How do the field fields referenced in the class are described in the constant pool?
    (
    ----about constant pool entries Constant_fieldref_info, constant_name_type_info)
  • NO10. How are the method methods referenced in a class described in a constant pool?
    (
    ----about constant pool entry constant_methodref_info)
  • NO11. How do the method methods referenced in an interface in a class describe in a constant pool?
    (----about constant pool entry constant_interfacemethodref_info)
  • NO12. Constant_methodtype_info
  • NO13. Constant_methodhandle_info
  • NO13. Constant_invokedynamic_info

Java Virtual machine schematic diagram--1.2, a constant pool in class file

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.