Java Code Examples for org.jf.dexlib2.dexbacked.DexBackedDexFile#getMethodIdItemOffset()

The following examples show how to use org.jf.dexlib2.dexbacked.DexBackedDexFile#getMethodIdItemOffset() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MethodIdItem.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static String asString(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    int methodOffset = dexFile.getMethodIdItemOffset(methodIndex);
    int classIndex = dexFile.readUshort(methodOffset + CLASS_OFFSET);
    String classType = dexFile.getType(classIndex);

    int protoIndex = dexFile.readUshort(methodOffset + PROTO_OFFSET);
    String protoString = ProtoIdItem.asString(dexFile, protoIndex);

    int nameIndex = dexFile.readSmallUint(methodOffset + NAME_OFFSET);
    String methodName = dexFile.getString(nameIndex);

    return String.format("%s->%s%s", classType, methodName, protoString);
}
 
Example 2
Source File: MethodIdItem.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static String asString(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    int methodOffset = dexFile.getMethodIdItemOffset(methodIndex);
    int classIndex = dexFile.readUshort(methodOffset + CLASS_OFFSET);
    String classType = dexFile.getType(classIndex);

    int protoIndex = dexFile.readUshort(methodOffset + PROTO_OFFSET);
    String protoString = ProtoIdItem.asString(dexFile, protoIndex);

    int nameIndex = dexFile.readSmallUint(methodOffset + NAME_OFFSET);
    String methodName = dexFile.getString(nameIndex);

    return String.format("%s->%s%s", classType, methodName, protoString);
}
 
Example 3
Source File: MethodIdItem.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static String asString(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    int methodOffset = dexFile.getMethodIdItemOffset(methodIndex);
    int classIndex = dexFile.readUshort(methodOffset + CLASS_OFFSET);
    String classType = dexFile.getType(classIndex);

    int protoIndex = dexFile.readUshort(methodOffset + PROTO_OFFSET);
    String protoString = ProtoIdItem.asString(dexFile, protoIndex);

    int nameIndex = dexFile.readSmallUint(methodOffset + NAME_OFFSET);
    String methodName = dexFile.getString(nameIndex);

    return String.format("%s->%s%s", classType, methodName, protoString);
}
 
Example 4
Source File: MethodIdItem.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static String asString(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    int methodOffset = dexFile.getMethodIdItemOffset(methodIndex);
    int classIndex = dexFile.readUshort(methodOffset + CLASS_OFFSET);
    String classType = dexFile.getType(classIndex);

    int protoIndex = dexFile.readUshort(methodOffset + PROTO_OFFSET);
    String protoString = ProtoIdItem.asString(dexFile, protoIndex);

    int nameIndex = dexFile.readSmallUint(methodOffset + NAME_OFFSET);
    String methodName = dexFile.getString(nameIndex);

    return String.format("%s->%s%s", classType, methodName, protoString);
}
 
Example 5
Source File: DexBackedMethodReference.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public DexBackedMethodReference(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    this.dexFile = dexFile;
    this.methodIdItemOffset = dexFile.getMethodIdItemOffset(methodIndex);
}
 
Example 6
Source File: DexBackedMethodReference.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
public DexBackedMethodReference(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    this.dexFile = dexFile;
    this.methodIdItemOffset = dexFile.getMethodIdItemOffset(methodIndex);
}
 
Example 7
Source File: DexBackedMethodReference.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
public DexBackedMethodReference(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    this.dexFile = dexFile;
    this.methodIdItemOffset = dexFile.getMethodIdItemOffset(methodIndex);
}
 
Example 8
Source File: DexBackedMethodReference.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public DexBackedMethodReference(@Nonnull DexBackedDexFile dexFile, int methodIndex) {
    this.dexFile = dexFile;
    this.methodIdItemOffset = dexFile.getMethodIdItemOffset(methodIndex);
}