the class inspection in JVM
来源:互联网 发布:哪里购买淘宝店铺 编辑:程序博客网 时间:2024/05/16 11:42
before the Java classloader begin to excute a class file, it will need to check out the file four times.
1.check the structure of the file
the first inspection happen before the class was loaded. JVM will check the Magic number 0XCAFEBABE to make sure it load a Java class file. Then it will check the main version and sub version to ensure the JVM can support it.
also JVM will check the type and length of all parts of the class file.
2.check the semantic of the type data
this phrase happen in the link stage. it will check all parts of the file. the inspection will detect the structures. also it will make sure that the class file observes the java language specification
3.byte code inspection
in this phrase the jvm will analyse the byte code stream via data graph. it is excuted in the link stage. for example, the jvm will ensure that operate stack contains the correct value and type, the local param has been evaluated before using, and in the class field it contains the rigth type, when a method was called, it pass the right value and type param. the bytecode inspection also will ensure that every operation should be legal.
4.symbol reference inspection
in the dynamic link stage, if a symbol reference including in one class file is resolving, the jvm will trace such reference to make sure it is correct. if the jvm find that the class which the referenc point to can not be loaded it will throw a NoClassDefFoundError exception. if not, the jvm will load the class if necessary and then replace the symbol reference with direct reference.
1.check the structure of the file
the first inspection happen before the class was loaded. JVM will check the Magic number 0XCAFEBABE to make sure it load a Java class file. Then it will check the main version and sub version to ensure the JVM can support it.
also JVM will check the type and length of all parts of the class file.
2.check the semantic of the type data
this phrase happen in the link stage. it will check all parts of the file. the inspection will detect the structures. also it will make sure that the class file observes the java language specification
3.byte code inspection
in this phrase the jvm will analyse the byte code stream via data graph. it is excuted in the link stage. for example, the jvm will ensure that operate stack contains the correct value and type, the local param has been evaluated before using, and in the class field it contains the rigth type, when a method was called, it pass the right value and type param. the bytecode inspection also will ensure that every operation should be legal.
4.symbol reference inspection
in the dynamic link stage, if a symbol reference including in one class file is resolving, the jvm will trace such reference to make sure it is correct. if the jvm find that the class which the referenc point to can not be loaded it will throw a NoClassDefFoundError exception. if not, the jvm will load the class if necessary and then replace the symbol reference with direct reference.
- the class inspection in JVM
- The Inspection Process
- Code Inspection in Software Development
- Life in the Philosophy Class
- Inspection
- TOJ 4349: The Tallest in the Class
- Automation for the people: Continuous Inspection
- hollister france the Commission for Discipline Inspection
- 校园英语单词 one in the class
- [Django] Base class in the model layer
- The File Class in I/O
- When a class is loaded and initialized in JVM - Java
- Count the depth of the stack in JVM.
- Pointed-toe N. Prive fabric Pigalle pump in black Terms of the new regulatory remediation King Jiangsu inspection of small ticke
- How to use the class in assembly in XAML
- Comparing the Timer Classes in the .NET Framework Class Library
- The method load(Class, Serializable) in the type Session is not applicable for the arguments (Class<
- whether the results are the same of getClass().getName() called in child class and parent class?
- Lecture Notes on Static Analysis
- String
- The structure of a class file
- what is a synthetic field and method
- SecurityManager
- the class inspection in JVM
- Java Inner Class
- How to build a independent java program
- Selenium Command
- Serialization: Understand
- Keil uVision2学习笔记1
- 程序員的七種武器
- 静态XTREE的使用
- 環境搭好,紀念一下