Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lizhangqu/dexdeps

查看dex中class, field, method内部与外部依赖
https://github.com/lizhangqu/dexdeps

class deps dex filed method reference

Last synced: 8 days ago
JSON representation

查看dex中class, field, method内部与外部依赖

Awesome Lists containing this project

README

        

dexdeps
=======

### Maven

```

io.github.lizhangqu
dexdeps
1.0.2

```

### Gradle

```
implementation 'io.github.lizhangqu:dexdeps:1.0.2'
```

### Sample

```
List dexDataList = DexData.open(apkFile);
if (dexDataList != null && dexDataList.size() > 0) {
for (DexData dexData : dexDataList) {
ClassRef[] references = dexData.getReferences();
if (references != null) {
for (ClassRef classRef : references) {
System.out.println("classRef:" + classRef + " internal:" + classRef.isInternal());

FieldRef[] fieldArray = classRef.getFieldArray();
if (fieldArray != null && fieldArray.length > 0) {
for (FieldRef fieldRef : fieldArray) {
System.out.println("fieldRef:" + fieldRef + " internal:" + fieldRef.isInternal());
}
}
MethodRef[] methodArray = classRef.getMethodArray();

if (methodArray != null && methodArray.length > 0) {
for (MethodRef methodRef : methodArray) {
System.out.println("methodRef:" + methodRef + " internal:" + methodRef.isInternal());
}
}
}
}
}
}
```