概述
public class Pair<T, U> {
private T first;
private U second;
public Pair(T first, U second) {
this.first = first;
this.second = second;
}
public T getFirst() {
return first;
}
public U getSecond() {
return second;
}
public void setFirst(T newValue) {
first = newValue;
}
public void setSecond(U newValue) {
second = newValue;
}
}
编译生成Pair.class文件之后,执行javap -c -s Pair
D:webspaceJavaNewsrcitit>javap -c -s Pair
Warning: Binary file Pair contains it.it.Pair
Compiled from "Pair.java"
public class it.it.Pair<T, U> {
public it.it.Pair(T, U);
Signature: (Ljava/lang/Object;Ljava/lang/Object;)V
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: aload_0
5: aload_1
6: putfield #2 // Field first:Ljava/lang/Object;
9: aload_0
10: aload_2
11: putfield #3 // Field second:Ljava/lang/Object;
14: return
public T getFirst();
Signature: ()Ljava/lang/Object;
Code:
0: aload_0
1: getfield #2 // Field first:Ljava/lang/Object;
4: areturn
public U getSecond();
Signature: ()Ljava/lang/Object;
Code:
0: aload_0
1: getfield #3 // Field second:Ljava/lang/Object;
4: areturn
public void setFirst(T);
Signature: (Ljava/lang/Object;)V
Code:
0: aload_0
1: aload_1
2: putfield #2 // Field first:Ljava/lang/Object;
5: return
public void setSecond(U);
Signature: (Ljava/lang/Object;)V
Code:
0: aload_0
1: aload_1
2: putfield #3 // Field second:Ljava/lang/Object;
最后
以上就是完美网络为你收集整理的Javap反编译class文件的全部内容,希望文章能够帮你解决Javap反编译class文件所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复