/** * Append a referency type * * @param type Type to append * @param nullable Nullness of type * @param output Output to append to * @param <A> Type of output * @return Supplied output to append to */ public <A extends Appendable> A appendReferenceTypeSignature(Generic type, Nullness nullable, A output) { try { if (type.isArray()) { appendArrayTypeSignature(type, nullable, output); } else if (type.getSort() == Sort.VARIABLE) { appendTypeVariableSignature(type, nullable, output); } else { appendClassTypeSignature(type, nullable, output); } return output; } catch (Exception e) { throw new RuntimeException(String.format("Could not write reference type signature %s", type)); } }
/** * Append a referency type * * @param type Type to append * @param nullable Nullness of type * @param output Output to append to * @param <A> Type of output * @return Supplied output to append to */ public <A extends Appendable> A appendReferenceTypeSignature(Generic type, Nullness nullable, A output) { try { if (type.isArray()) { appendArrayTypeSignature(type, nullable, output); } else if (type.getSort() == Sort.VARIABLE) { appendTypeVariableSignature(type, nullable, output); } else { appendClassTypeSignature(type, nullable, output); } return output; } catch (Exception e) { throw new RuntimeException(String.format("Could not write reference type signature %s", type)); } }