Fwl的小花园

  博客园 :: 首页 :: 博问 :: 闪存 :: :: 联系 :: :: 管理 ::

Android 利用反射找到包下面所有的类

Android下其实有一个DexFile的东西,利用它我们可以很好的找到包下面所有的类

什么是DexFile?

官方的说明是这样的:

Manipulates DEX files. The class is similar in principle to ZipFile. It is used primarily by class loaders.

Note we don't directly open and read the DEX file here. They're memory-mapped read-only by the VM.

 

直接上代码:

下面是使用:

posted on 2016-10-31 18:01  Fwl的小花园  阅读(874)  评论(0编辑  收藏  举报