第4回:実機に載せよう(ダウンサイズ)
public void <init>()
Attributes
Code
LineNumberTable
Byte offset | Instruction | Argument |
---|---|---|
0 | aload_0 | |
1 | invokespecial | Object.<init> ()V():void |
4 | aload_0 | |
5 | iconst_2 | |
6 | putfield | field3 I |
9 | return |
public static void main(String[])
Attributes
Code
LineNumberTable
Byte offset | Instruction | Argument |
---|---|---|
0 | new | Temp |
3 | dup | |
4 | invokespecial | Temp.<init> ()V():void |
7 | astore_1 | |
8 | aload_1 | |
9 | invokespecial | Temp.method1 ()V():void |
12 | return |
private void method1()
Attributes
Code
LineNumberTable
Byte offset | Instruction | Argument |
---|---|---|
0 | iconst_0 | |
1 | aload_0 | |
2 | invokespecial | Temp.method2 ()I():int |
5 | iadd | |
6 | istore_1 | |
7 | getstatic | System.out Ljava/io/PrintStream; |
10 | new | StringBuffer |
13 | dup | |
14 | invokespecial | StringBuffer.<init> ()V():void |
17 | ldc "method1:" | |
19 | invokevirtual | StringBuffer.append (Ljava/lang/String;)Ljava/lang/StringBuffer;(String):StringBuffer |
22 | iload_1 | |
23 | invokevirtual | StringBuffer.append (I)Ljava/lang/StringBuffer;(int):StringBuffer |
26 | invokevirtual | StringBuffer.toString ()Ljava/lang/String;():String |
29 | invokevirtual | java.io.PrintStream.println (Ljava/lang/String;)V(String):void |
32 | return |
private int method2()
Attributes
Code
LineNumberTable
Byte offset | Instruction Argument | |
---|---|---|
0 | getstatic | field2 I |
3 | ireturn |
static void <clinit>()
Attributes
Code
LineNumberTable
Byte offset | Instruction | Argument |
---|---|---|
0 | iconst_1 | |
1 | putstatic | field2 I |
4 | return |