/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Constructs an instance. * * @param cst {@code non-null;} the constant for the member */ public MemberIdItem(CstMemberRef cst) { super(cst.getDefiningClass()); this.cst = cst; }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); // TODO(oth): what scenarios is this guard valid under? Is it not just an error? if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst = insn.getConstant(); int index = callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); // TODO(oth): what scenarios is this guard valid under? Is it not just an error? if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(MultiCstInsn insn, DalvCode.AssignIndicesCallback callback) { for (int i = 0; i < insn.getNumberOfConstants(); ++i) { Constant cst = insn.getConstant(i); int index = callback.getIndex(cst); insn.setIndex(i, index); if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(CstInsn insn, DalvCode.AssignIndicesCallback callback) { Constant cst= insn.getConstant(); int index= callback.getIndex(cst); if (index >= 0) { insn.setIndex(index); } if (cst instanceof CstMemberRef) { CstMemberRef member= (CstMemberRef) cst; CstType definer= member.getDefiningClass(); index= callback.getIndex(definer); if (index >= 0) { insn.setClassIndex(index); } } }
/** * Helper for {@link #assignIndices} which does assignment for one * instruction. * * @param insn {@code non-null;} the instruction * @param callback {@code non-null;} the callback */ private static void assignIndices(MultiCstInsn insn, DalvCode.AssignIndicesCallback callback) { for (int i = 0; i < insn.getNumberOfConstants(); ++i) { Constant cst = insn.getConstant(i); int index = callback.getIndex(cst); insn.setIndex(i, index); if (cst instanceof CstMemberRef) { CstMemberRef member = (CstMemberRef) cst; CstType definer = member.getDefiningClass(); index = callback.getIndex(definer); insn.setClassIndex(index); } } }
String definingClassType= memberRef.getDefiningClass().getClassType().toHuman();
methodDeps.addDependency(memberRef.getDefiningClass().getClassType().toHuman(), memberRef.getNat().getName().toHuman());