private void doDoclet(final Commandline toExecute) { if (doclet != null) { if (doclet.getName() == null) { throw new BuildException("The doclet name must be specified.", getLocation()); } toExecute.createArgument().setValue("-doclet"); toExecute.createArgument().setValue(doclet.getName()); if (doclet.getPath() != null) { final Path docletPath = doclet.getPath().concatSystemClasspath("ignore"); if (docletPath.size() != 0) { toExecute.createArgument().setValue("-docletpath"); toExecute.createArgument().setPath(docletPath); } } for (final DocletParam param : Collections.list(doclet.getParams())) { if (param.getName() == null) { throw new BuildException("Doclet parameters must have a name"); } toExecute.createArgument().setValue(param.getName()); if (param.getValue() != null) { toExecute.createArgument().setValue(param.getValue()); } } } }
/** * Set the classpath used to find the doclet class by reference. * * @param r the reference to the Path instance to use as the doclet * classpath. */ public void setDocletPathRef(final Reference r) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.createPath().setRefid(r); }
/** * Set the classpath used to find the doclet class. * * @param docletPath the doclet classpath. */ public void setDocletPath(final Path docletPath) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.setPath(docletPath); }
/** * Create a doclet to be used in the documentation generation. * * @return a new DocletInfo instance to be configured. */ public DocletInfo createDoclet() { if (doclet == null) { doclet = new DocletInfo(); } return doclet; }
/** * Set the class that starts the doclet used in generating the * documentation. * * @param docletName the name of the doclet class. */ public void setDoclet(final String docletName) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.setName(docletName); }