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.
Previous Chapter "schematic diagram of Java Virtual machine" 1, class file basic organizational Structure The organization of the class file is roughly described, and we'll go 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. string
( ----introduction 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?
( ----Introduction to constant pool entries constant_class_info)
Three. Constant pool explanation (bottom)
- NO9. How do the field fields referenced in the class are described in the constant pool?
( ----describes constant pool entries constant_fieldref_info, constant_name_ Type_info)
- NO10. Method methods referenced in the classHow is it described in a constant pool?
( /span> ----Introduction to constant pool entries Constant_methodref_info)
- NO11. The interface method implemented by the classHow is it described in a constant pool?
(----Introduction to constant pool entries Constant_interfacemethodref_info)
- NO12. Constant_methodtype_info
- NO13. Constant_methodhandle_info
- NO13. Constant_invokedynamic_info
Because of its length, the section is divided into three sections that readers can view by clicking on the following links:
The first part: I. What is a constant pool, Why use Chang ( not yet completed, please look forward to ...) )
Part II: Two. Constant pool details (top)
Part III: three. Constant pool details (bottom)( not yet completed, please look forward to ...) )
author's words
This article is one of the "schematic diagrams of Java Virtual machines" series, and if you are interested, please follow other articles in this series ~
Think this article is good, handy point a praise Oh ~ ~ Your encouragement, is I continue to share the powerful power of knowledge!
--------------------------------------------------------------------------------------------------------------- --------------------------
This article originates from http://blog.csdn.net/luanlouis/, if need reprint, please indicate source, thank you!
Java Virtual machine schematic 2, a constant pool in class files