/** {@inheritDoc} */ @Override public String cstComment() { if (!hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); sb.append(getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); } }
/** {@inheritDoc} */ @Override public String cstComment() { if (!hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); sb.append(getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); } }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }
/** * Helper method to return an instruction comment for a constant. * * @param insn {@code non-null;} a constant-bearing instruction * @return {@code non-null;} comment string representing the constant */ protected static String cstComment(DalvInsn insn) { CstInsn ci = (CstInsn) insn; if (! ci.hasIndex()) { return ""; } StringBuilder sb = new StringBuilder(20); int index = ci.getIndex(); sb.append(ci.getConstant().typeName()); sb.append('@'); if (index < 65536) { sb.append(Hex.u2(index)); } else { sb.append(Hex.u4(index)); } return sb.toString(); }