/**
* 不推荐使用:http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html
* Reflection的getCallerClass的使用:可以得到调用者的类.这个方法是很好用的.
0 和小于0 - 返回 Reflection类
1 - 返回自己的类
2 - 返回调用者的类
3. 4. ....层层上传。
result:
class sun.reflect.Reflection
class sun.reflect.Reflection
class fileTest
class com.intellij.rt.execution.application.AppMain
null
null
*/
System.out.println(Reflection.getCallerClass(-1));
System.out.println(Reflection.getCallerClass(0));
System.out.println(Reflection.getCallerClass(1));
System.out.println(Reflection.getCallerClass(2));
System.out.println(Reflection.getCallerClass(3));
System.out.println(Reflection.getCallerClass(4));