/** * @return the label of this block in rop form as a hex string */ public String getRopLabelString() { return Hex.u2(ropLabel); }
/** {@inheritDoc} */ @Override public String toString() { return "{" + index + ":" + Hex.u2(ropLabel) + '}'; }
/** * @return the label of this block in rop form as a hex string */ public String getRopLabelString() { return Hex.u2(ropLabel); }
/** {@inheritDoc} */ @Override public String toString() { return ("<addr:" + Hex.u2(subroutineAddress) + ">"); }
/** {@inheritDoc} */ @Override public String toHuman() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < locals.length; i++) { TypeBearer type = locals[i]; String s = (type == null) ? "<invalid>" : type.toString(); sb.append("locals[" + Hex.u2(i) + "]: " + s + "\n"); } return sb.toString(); }
/** * Throws the right exception for an invalid cpi. * * @param idx the bad cpi * @return never * @throws ExceptionWithContext always thrown */ private static Constant throwInvalid(int idx) { throw new ExceptionWithContext("invalid constant pool index " + Hex.u2(idx)); } }
/** {@inheritDoc} */ @Override public String toString() { int value = getIntBits(); return "short{0x" + Hex.u2(value) + " / " + value + '}'; }
/** {@inheritDoc} */ @Override public String toString() { int value = getIntBits(); return "char{0x" + Hex.u2(value) + " / " + value + '}'; }
/** {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(100); sb.append(getClass().getName()); sb.append('{'); sb.append(Hex.u2(getAccessFlags())); sb.append(' '); sb.append(field); sb.append('}'); return sb.toString(); }
/** * Throws a properly-formatted exception. * * @param idx the salient local index * @param msg {@code non-null;} useful message * @return never (keeps compiler happy) */ private static TypeBearer throwSimException(int idx, String msg) { throw new SimException("local " + Hex.u2(idx) + ": " + msg); } }
/** {@inheritDoc} */ @Override public String toString() { int value = getIntBits(); return "short{0x" + Hex.u2(value) + " / " + value + '}'; }
/** {@inheritDoc} */ @Override public String toString() { StringBuffer sb = new StringBuffer(100); sb.append(getClass().getName()); sb.append('{'); sb.append(Hex.u2(getAccessFlags())); sb.append(' '); sb.append(field); sb.append('}'); return sb.toString(); }
/** {@inheritDoc} */ @Override public void annotate(ExceptionWithContext ex) { for (int i = 0; i < locals.length; i++) { TypeBearer type = locals[i]; String s = (type == null) ? "<invalid>" : type.toString(); ex.addContext("locals[" + Hex.u2(i) + "]: " + s); } }
/** {@inheritDoc} */ @Override public String toString() { int value = getIntBits(); return "short{0x" + Hex.u2(value) + " / " + value + '}'; }
/** * Throws a properly-formatted exception. * * @param idx the salient local index * @param msg {@code non-null;} useful message * @return never (keeps compiler happy) */ private static TypeBearer throwSimException(int idx, String msg) { throw new SimException("local " + Hex.u2(idx) + ": " + msg); } }
/** * Helper method to return a branch address string. * * @param insn {@code non-null;} the instruction in question * @return {@code non-null;} the string form of the instruction's * branch target */ protected static String branchString(DalvInsn insn) { TargetInsn ti = (TargetInsn) insn; int address = ti.getTargetAddress(); return (address == (char) address) ? Hex.u2(address) : Hex.u4(address); }
/** * Helper method to return a branch address string. * * @param insn {@code non-null;} the instruction in question * @return {@code non-null;} the string form of the instruction's * branch target */ protected static String branchString(DalvInsn insn) { TargetInsn ti = (TargetInsn) insn; int address = ti.getTargetAddress(); return (address == (char) address) ? Hex.u2(address) : Hex.u4(address); }
/** {@inheritDoc} */ @Override public void visitBranch(int opcode, int offset, int length, int target) { String targetStr = (length <= 3) ? Hex.u2(target) : Hex.u4(target); observer.parsed(bytes, offset, length, header(offset) + " " + targetStr); }