差满多乃几

jd-gui反编译 access$xxx类函数说明

.access$ 反编译偶内部类调用外部类成员问题
很简单的一个测试类源码: 
public class testOuter {
private int a;
private int b;

private void fun() {
a += 1;
}

class testInner {
int x = 0;
testInner() {
b = 1;
a = 0;
fun();
}
}
编译生成的Class文件:
class testOuter$testInner {
int x = 0;
testOuter$testInner(testOuter paramtestOuter) {
testOuter.access$002(paramtestOuter, 1);
testOuter.access$102(paramtestOuter, 0);
testOuter.access$200(paramtestOuter);
}
}
可以看出,为了使内部类访问外部类的私有成员,编译器生成了形似 “外部类.access$XYZ”的函数。XYZ为数字。X是按照私有成员在内部类出现的顺序递增的。YZ为02的话,标明是基本变量成员;YZ为00的话标明是对象成员或者函数。