/** {@inheritDoc} */ @Override protected final int compareTo0(Constant other) { int cmp = super.compareTo0(other); if (cmp != 0) { return cmp; } CstBaseMethodRef otherMethod = (CstBaseMethodRef) other; return prototype.compareTo(otherMethod.prototype); }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** {@inheritDoc} */ @Override public final void writeTo(DexFile file, AnnotatedOutput out) { TypeIdsSection typeIds = file.getTypeIds(); StringIdsSection stringIds = file.getStringIds(); CstNat nat = cst.getNat(); int classIdx = typeIds.indexOf(getDefiningClass()); int nameIdx = stringIds.indexOf(nat.getName()); int typoidIdx = getTypoidIdx(file); if (out.annotates()) { out.annotate(0, indexString() + ' ' + cst.toHuman()); out.annotate(2, " class_idx: " + Hex.u2(classIdx)); out.annotate(2, String.format(" %-10s %s", getTypoidName() + ':', Hex.u2(typoidIdx))); out.annotate(4, " name_idx: " + Hex.u4(nameIdx)); } out.writeShort(classIdx); out.writeShort(typoidIdx); out.writeInt(nameIdx); }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { super.addContents(file); StringIdsSection stringIds = file.getStringIds(); stringIds.intern(getRef().getNat().getName()); }
methodDeps.addDependency(memberRef.getDefiningClass().getClassType().toHuman(), memberRef.getNat().getName().toHuman());
/** {@inheritDoc} */ @Override public final void writeTo(DexFile file, AnnotatedOutput out) { TypeIdsSection typeIds = file.getTypeIds(); StringIdsSection stringIds = file.getStringIds(); CstNat nat = cst.getNat(); int classIdx = typeIds.indexOf(getDefiningClass()); int nameIdx = stringIds.indexOf(nat.getName()); int typoidIdx = getTypoidIdx(file); if (out.annotates()) { out.annotate(0, indexString() + ' ' + cst.toHuman()); out.annotate(2, " class_idx: " + Hex.u2(classIdx)); out.annotate(2, String.format(" %-10s %s", getTypoidName() + ':', Hex.u2(typoidIdx))); out.annotate(4, " name_idx: " + Hex.u4(nameIdx)); } out.writeShort(classIdx); out.writeShort(typoidIdx); out.writeInt(nameIdx); }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { super.addContents(file); StringIdsSection stringIds = file.getStringIds(); stringIds.intern(getRef().getNat().getName()); }
String definingClassType= memberRef.getDefiningClass().getClassType().toHuman(); CstNat nameAndType= memberRef.getNat(); String memberType= nameAndType.getFieldType().getType().toHuman(); dexInstruction.setAttribute("member-type", memberType);
/** {@inheritDoc} */ @Override public final void writeTo(DexFile file, AnnotatedOutput out) { TypeIdsSection typeIds = file.getTypeIds(); StringIdsSection stringIds = file.getStringIds(); CstNat nat = cst.getNat(); int classIdx = typeIds.indexOf(getDefiningClass()); int nameIdx = stringIds.indexOf(nat.getName()); int typoidIdx = getTypoidIdx(file); if (out.annotates()) { out.annotate(0, indexString() + ' ' + cst.toHuman()); out.annotate(2, " class_idx: " + Hex.u2(classIdx)); out.annotate(2, String.format(" %-10s %s", getTypoidName() + ':', Hex.u2(typoidIdx))); out.annotate(4, " name_idx: " + Hex.u4(nameIdx)); } out.writeShort(classIdx); out.writeShort(typoidIdx); out.writeInt(nameIdx); }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** {@inheritDoc} */ @Override protected final int compareTo0(Constant other) { int cmp = super.compareTo0(other); if (cmp != 0) { return cmp; } CstBaseMethodRef otherMethod = (CstBaseMethodRef) other; return prototype.compareTo(otherMethod.prototype); }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { super.addContents(file); StringIdsSection stringIds = file.getStringIds(); stringIds.intern(getRef().getNat().getName()); }
/** {@inheritDoc} */ @Override public final void writeTo(DexFile file, AnnotatedOutput out) { TypeIdsSection typeIds = file.getTypeIds(); StringIdsSection stringIds = file.getStringIds(); CstNat nat = cst.getNat(); int classIdx = typeIds.indexOf(getDefiningClass()); int nameIdx = stringIds.indexOf(nat.getName()); int typoidIdx = getTypoidIdx(file); if (out.annotates()) { out.annotate(0, indexString() + ' ' + cst.toHuman()); out.annotate(2, " class_idx: " + Hex.u2(classIdx)); out.annotate(2, String.format(" %-10s %s", getTypoidName() + ':', Hex.u2(typoidIdx))); out.annotate(4, " name_idx: " + Hex.u4(nameIdx)); } out.writeShort(classIdx); out.writeShort(typoidIdx); out.writeInt(nameIdx); }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** {@inheritDoc} */ @Override protected final int compareTo0(Constant other) { int cmp = super.compareTo0(other); if (cmp != 0) { return cmp; } CstBaseMethodRef otherMethod = (CstBaseMethodRef) other; return prototype.compareTo(otherMethod.prototype); }
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { super.addContents(file); StringIdsSection stringIds = file.getStringIds(); stringIds.intern(getRef().getNat().getName()); }