@Override public DexBackedFieldReference get(int index) { if (index < 0 || index >= getFieldCount()) { throw new IndexOutOfBoundsException(); } return new DexBackedFieldReference(DexBackedDexFile.this, index); }
DexBackedFieldReference fieldRef = new DexBackedFieldReference(dexFile, fieldIndex); size += fieldRef.getSize();
Instruction decompileInstanceFieldAccess(Instruction instruction) { final int fieldIndex = nextInfo().getIndex(); final DexBackedFieldReference fieldRef = (DexBackedFieldReference) DexBackedReference.makeReference(mDex, ReferenceType.FIELD, fieldIndex); final Opcode newOpcode = sInstrMapper.getAndCheckDeodexedOpcode( fieldRef.getType(), instruction.getOpcode()); final Instruction22cs instr = (Instruction22cs) instruction; return new ImmutableInstruction22c(newOpcode, instr.getRegisterA(), instr.getRegisterB(), fieldRef); }
DexBackedFieldReference fieldRef = new DexBackedFieldReference(dexFile, fieldIndex); size += fieldRef.getSize();
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Nonnull @Override public FieldReference getValue() { return new DexBackedFieldReference(dexFile, fieldIndex); } }
@Override public DexBackedFieldReference get(int index) { if (index < 0 || index >= getFieldCount()) { throw new IndexOutOfBoundsException(); } return new DexBackedFieldReference(DexBackedDexFile.this, index); }
public static Reference makeReference(@Nonnull DexBackedDexFile dexFile, int referenceType, int referenceIndex) { switch (referenceType) { case ReferenceType.STRING: return new DexBackedStringReference(dexFile, referenceIndex); case ReferenceType.TYPE: return new DexBackedTypeReference(dexFile, referenceIndex); case ReferenceType.METHOD: return new DexBackedMethodReference(dexFile, referenceIndex); case ReferenceType.FIELD: return new DexBackedFieldReference(dexFile, referenceIndex); default: throw new ExceptionWithContext("Invalid reference type: %d", referenceType); } } }
@Nonnull @Override public Reference getMemberReference() { int memberIndex = dexFile.readUshort(methodHandleOffset + MethodHandleItem.MEMBER_ID_OFFSET); switch (getMethodHandleType()) { case MethodHandleType.STATIC_PUT: case MethodHandleType.STATIC_GET: case MethodHandleType.INSTANCE_PUT: case MethodHandleType.INSTANCE_GET: return new DexBackedFieldReference(dexFile, memberIndex); case MethodHandleType.INVOKE_STATIC: case MethodHandleType.INVOKE_INSTANCE: case MethodHandleType.INVOKE_CONSTRUCTOR: case MethodHandleType.INVOKE_DIRECT: case MethodHandleType.INVOKE_INTERFACE: return new DexBackedMethodReference(dexFile, memberIndex); default: throw new ExceptionWithContext("Invalid method handle type: %d", getMethodHandleType()); } } }
@Nonnull @Override public Reference getMemberReference() { int memberIndex = dexFile.readUshort(methodHandleOffset + MethodHandleItem.MEMBER_ID_OFFSET); switch (getMethodHandleType()) { case MethodHandleType.STATIC_PUT: case MethodHandleType.STATIC_GET: case MethodHandleType.INSTANCE_PUT: case MethodHandleType.INSTANCE_GET: return new DexBackedFieldReference(dexFile, memberIndex); case MethodHandleType.INVOKE_STATIC: case MethodHandleType.INVOKE_INSTANCE: case MethodHandleType.INVOKE_CONSTRUCTOR: case MethodHandleType.INVOKE_DIRECT: case MethodHandleType.INVOKE_INTERFACE: return new DexBackedMethodReference(dexFile, memberIndex); default: throw new ExceptionWithContext("Invalid method handle type: %d", getMethodHandleType()); } } }
public static Reference makeReference(@Nonnull DexBackedDexFile dexFile, int referenceType, int referenceIndex) { switch (referenceType) { case ReferenceType.STRING: return new DexBackedStringReference(dexFile, referenceIndex); case ReferenceType.TYPE: return new DexBackedTypeReference(dexFile, referenceIndex); case ReferenceType.METHOD: return new DexBackedMethodReference(dexFile, referenceIndex); case ReferenceType.FIELD: return new DexBackedFieldReference(dexFile, referenceIndex); case ReferenceType.METHOD_PROTO: return new DexBackedMethodProtoReference(dexFile, referenceIndex); case ReferenceType.METHOD_HANDLE: return new DexBackedMethodHandleReference(dexFile, referenceIndex); case ReferenceType.CALL_SITE: return new DexBackedCallSiteReference(dexFile, referenceIndex); default: throw new ExceptionWithContext("Invalid reference type: %d", referenceType); } } }
public static Reference makeReference(@Nonnull DexBackedDexFile dexFile, int referenceType, int referenceIndex) { switch (referenceType) { case ReferenceType.STRING: return new DexBackedStringReference(dexFile, referenceIndex); case ReferenceType.TYPE: return new DexBackedTypeReference(dexFile, referenceIndex); case ReferenceType.METHOD: return new DexBackedMethodReference(dexFile, referenceIndex); case ReferenceType.FIELD: return new DexBackedFieldReference(dexFile, referenceIndex); case ReferenceType.METHOD_PROTO: return new DexBackedMethodProtoReference(dexFile, referenceIndex); case ReferenceType.METHOD_HANDLE: return new DexBackedMethodHandleReference(dexFile, referenceIndex); case ReferenceType.CALL_SITE: return new DexBackedCallSiteReference(dexFile, referenceIndex); default: throw new ExceptionWithContext("Invalid reference type: %d", referenceType); } } }