JVM学习笔记-方法信息(Method Information)
For each method declared in the type, the following information must be stored in the method area. As with fields, the order in which the methods are declared by the class or interface must be recorded as well as the data. Hereís the list:
对于类型中声明的每一个方法,方法区中必须保存下面的信息。和字段一样,这些方法在类或者接口中的生命顺序也必须保存。下面是方法信息的清单:
- The method's name
- 方法名
- The method's return type (or void)
- 方法的返回类型(或void)
- The number and types (in order) of the method's parameters
- 方法参数的数量和类型(按声明顺序)
- The method's modifiers (some subset of public, private, protected, static, final, synchronized, native, abstract)
- 方法的修饰符(public,private,protected,static,final,volatile,transient的某个子集)
In addition to the items listed above, the following information must also be stored with each method that is not abstract or native:
除上面的清单中列出的条目之外,如果某个方法不是抽象的和本地的,它还必须保存下列信息:
- The method's bytecodes
- 方法的字节码(bytecodes)
- The sizes of the operand stack and local variables sections of the method's stack frame (these are described in a later section of this chapter)
- 操作数栈和该方法的栈帧中的局部变量区的大小
- An exception table (this is described in Chapter 17, "Exceptions")
- 异常表