ArrayList<ResponseParameter> responseParams =
new ArrayList<ResponseParameter>();
// Add return type
if (methodDoc.returnType() != null) {
responseParams.add(new ResponseParameter(DocTypeUtils
.getTypeName(methodDoc.returnType()), DocTypeUtils
.getTypeName(methodDoc.returnType()), DocletUtils
.preserveJavadocFormatting(DocTypeUtils.getReturnDoc(methodDoc))));
}
// Add any checked exceptions
for (ClassDoc exceptionDoc : methodDoc.thrownExceptions()) {
responseParams.add(new ResponseParameter(DocTypeUtils
.getTypeName(exceptionDoc),
DocTypeUtils.getTypeName(exceptionDoc), DocletUtils
.preserveJavadocFormatting(DocTypeUtils
.getTypeDoc(exceptionDoc))));
}