use of com.iggroup.oss.restdoclet.doclet.type.ResponseParameter in project RESTdoclet by IG-Group.
the class MethodBuilder method initResponseParams.
private void initResponseParams(Method method, final MethodDoc methodDoc) {
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))));
}
method.setResponseParams(responseParams);
}
Aggregations