private int getTargetIndex(DexFile file) { Constant ref = methodHandle.getRef(); if (methodHandle.isAccessor()) { FieldIdsSection fieldIds = file.getFieldIds(); return fieldIds.indexOf((CstFieldRef) ref); } else if (methodHandle.isInvocation()) { if (ref instanceof CstInterfaceMethodRef) { ref = ((CstInterfaceMethodRef)ref).toMethodRef(); } MethodIdsSection methodIds = file.getMethodIds(); return methodIds.indexOf((CstBaseMethodRef) ref); } else { throw new IllegalStateException("Unhandled invocation type"); } } }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotations.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
/** {@inheritDoc} */ public void writeTo(DexFile file, AnnotatedOutput out) { int methodIdx = file.getMethodIds().indexOf(method); int annotationsOff = annotationsItem.getAbsoluteOffset(); if (out.annotates()) { out.annotate(0, " " + method.toHuman()); out.annotate(4, " method_idx: " + Hex.u4(methodIdx)); out.annotate(4, " annotations_off: " + Hex.u4(annotationsOff)); } out.writeInt(methodIdx); out.writeInt(annotationsOff); }
public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int methodIdx = file.getMethodIds().indexOf(method); int diff = methodIdx - lastIndex; int accessFlags = getAccessFlags();
public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int methodIdx = file.getMethodIds().indexOf(method); int diff = methodIdx - lastIndex; int accessFlags = getAccessFlags();
public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int methodIdx = file.getMethodIds().indexOf(method); int diff = methodIdx - lastIndex; int accessFlags = getAccessFlags();