Пример #1
0
  /**
   * Gets the string form of a register spec list to be used as a catches list.
   *
   * @param catches non-null; the catches list
   * @return non-null; the string form
   */
  public static String toCatchString(TypeList catches) {
    StringBuffer sb = new StringBuffer(100);

    sb.append("catch");

    int sz = catches.size();
    for (int i = 0; i < sz; i++) {
      sb.append(" ");
      sb.append(catches.getType(i).toHuman());
    }

    return sb.toString();
  }
Пример #2
0
 /** {@inheritDoc} */
 @Override
 public Insn withAddedCatch(Type type) {
   return new ThrowingInsn(
       getOpcode(), getPosition(),
       getSources(), catches.withAddedType(type));
 }