Skip to content

Instantly share code, notes, and snippets.

@irof
Last active December 14, 2015 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irof/5124552 to your computer and use it in GitHub Desktop.
Save irof/5124552 to your computer and use it in GitHub Desktop.
java -parameters 有無それぞれで javap -v ってみた。
Classfile /x/Hoge.class
Last modified 2013/03/10; size 301 bytes
MD5 checksum 41f968697a1e7fe44a4d38e2d709d560
Compiled from "Hoge.java"
public class Hoge
SourceFile: "Hoge.java"
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Methodref #3.#15 // java/lang/Object."<init>":()V
#2 = Class #16 // Hoge
#3 = Class #17 // java/lang/Object
#4 = Utf8 <init>
#5 = Utf8 ()V
#6 = Utf8 Code
#7 = Utf8 LineNumberTable
#8 = Utf8 hoge
#9 = Utf8 (Ljava/lang/String;I)V
#10 = Utf8 MethodParameters
#11 = Utf8 str
#12 = Utf8 i
#13 = Utf8 SourceFile
#14 = Utf8 Hoge.java
#15 = NameAndType #4:#5 // "<init>":()V
#16 = Utf8 Hoge
#17 = Utf8 java/lang/Object
{
public Hoge();
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 1: 0
public void hoge(java.lang.String, int);
flags: ACC_PUBLIC
Code:
stack=0, locals=3, args_size=3
0: return
LineNumberTable:
line 3: 0
MethodParameters:
Name Flags
str
i
}
Classfile /x/Hoge.class
Last modified 2013/03/10; size 253 bytes
MD5 checksum e0af2283b1c1452d9aef70c530fde0be
Compiled from "Hoge.java"
public class Hoge
SourceFile: "Hoge.java"
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Methodref #3.#12 // java/lang/Object."<init>":()V
#2 = Class #13 // Hoge
#3 = Class #14 // java/lang/Object
#4 = Utf8 <init>
#5 = Utf8 ()V
#6 = Utf8 Code
#7 = Utf8 LineNumberTable
#8 = Utf8 hoge
#9 = Utf8 (Ljava/lang/String;I)V
#10 = Utf8 SourceFile
#11 = Utf8 Hoge.java
#12 = NameAndType #4:#5 // "<init>":()V
#13 = Utf8 Hoge
#14 = Utf8 java/lang/Object
{
public Hoge();
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 1: 0
public void hoge(java.lang.String, int);
flags: ACC_PUBLIC
Code:
stack=0, locals=3, args_size=3
0: return
LineNumberTable:
line 3: 0
}
public class Hoge {
public void hoge(String str, int i) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment