一、内部类
1、this.this$0.handler.sendEmptyMessage(1);-----------------------------------handler.sendEmptyMessage(1);
this.this$0.movePrevious();-------------------------------------------------------------MyGallery.this.movePrevious();
class MyGallery$a1 extends Handler()------------------------------------------------class a1 extends Handler()
参考:
java内部类 http://baike.baidu.com/view/7942850.htm
java this$0 http://plkong.iteye.com/blog/1513056
内部类学习(一) http://dev.21tx.com/2007/05/23/10882.html
内部类学习(二) http://dev.21tx.com/2007/05/29/10935.html
领略内部类的“内部” http://blog.sina.com.cn/s/blog_4cd5d2bb0100ssdd.html
分析APK反编译后的代码 http://blog.csdn.net/hp_2008/article/details/8626010
------------------------------------------------------------------------------------
java反编译,内部类调用外部类成员总结
很简单的一个测试类如下:
源码:
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的话标明是对象成员或者函数。
---------------------------------------------------------------------------------------------
There is one more category of compiler-generated members. A private member m of a class C may be used by another class D, if one class encloses the other, or if they are enclosed by a common class. Since the virtual machine does not know about this sort of grouping, the compiler creates a local protocol of access methods in C to allow D to read, write, or call the member m. These methods have names of the form access$0, access$1, etc. They are never public. Access methods are unique in that they may be added to enclosing classes, not just inner classes.
八、jar替换、分析
http://download.forge.objectweb.org/asm
九、防止反编译
Java混淆器和java混淆编译 http://hi.baidu.com/zeorliu/item/b2787859addfca08e7c4a55b