/** * Append type arguments * * @param typeArguments Type arguments to append * @param output Output to append to * @param <A> Type of output * @return Supplied output to append to */ public <A extends Appendable> A appendTypeArguments(TypeList.Generic typeArguments, A output) { try { output.append('<'); for (Generic typeArgument : typeArguments) { appendTypeArgument(typeArgument, output); } output.append('>'); return output; } catch (Exception e) { throw new RuntimeException(String.format("Could not write type arguments %s", typeArguments)); } }
/** * Append type arguments * * @param typeArguments Type arguments to append * @param output Output to append to * @param <A> Type of output * @return Supplied output to append to */ public <A extends Appendable> A appendTypeArguments(TypeList.Generic typeArguments, A output) { try { output.append('<'); for (Generic typeArgument : typeArguments) { appendTypeArgument(typeArgument, output); } output.append('>'); return output; } catch (Exception e) { throw new RuntimeException(String.format("Could not write type arguments %s", typeArguments)); } }