use of com.iggroup.oss.restdoclet.doclet.type.builder.ControllerBuilder in project RESTdoclet by IG-Group.
the class XmlDoclet method controllerDocs.
/**
* Generates Java documentation for controllers.
*
* @param rootDoc the root Java documentation object.
* @throws IoException
* @throws JiBXException
*/
public static void controllerDocs(final RootDoc rootDoc) throws IOException, JiBXException {
LOG.info("Finding controllers.....");
Boolean found = false;
for (ClassDoc classDoc : rootDoc.classes()) {
LOG.debug("Controller? " + classDoc.qualifiedName() + ".java");
if (isAnnotated(classDoc, org.springframework.stereotype.Controller.class)) {
LOG.info("Found controller. Generating javadoc xml for " + classDoc.qualifiedName() + ".java");
marshallController(new ControllerBuilder().build(new Controller(), classDoc), DocletUtils.documentationFile(classDoc));
found = true;
}
}
if (!found) {
throw new IllegalArgumentException("No controllers with Spring @Controller annotation found");
}
LOG.info("Done finding controllers.");
}
Aggregations