Attribute | Description | Required |
name | The package name (may be a wildcard) | Yes |
excludepackage
Same as one entry in the list given by excludepackagenames.
Parameters
Same as for package.
source
Same as one entry in the list given by sourcefiles.
Parameters
Attribute | Description | Required |
file | The source file to document | Yes |
bf doctitle
Same as the doctitle attribute, but you can nest text inside the element this way.
header
Similar to <doctitle>.
footer
Similar to <doctitle>.
bottom
Similar to <doctitle>.
link
Create link to javadoc output at the given URL. This performs the same role as the link and linkoffline attributes. You can use either syntax (or both at once), but with the nested elements you can easily specify multiple occurrences of the arguments.
Parameters
Attribute | Description | Required |
href | The URL for the external documentation you wish to link to | Yes |
offline | True if this link is not available online at the time of generating the documentation | No |
packagelistLoc | The location to the directory containing the package-list file for the external documentation | Only if the offline attribute is true |
group
Separates packages on the overview page into whatever groups you specify, one group per table. This performs the same role as the group attribute. You can use either syntax (or both at once), but with the nested elements you can easily specify multiple occurrences of the arguments.
Parameters
Attribute | Description | Required |
title | Title of the group | Yes, unless nested <title> given |
packages | List of packages to include in that group. Multiple packages are separated with ':'. | Yes, unless nested <package>s given |
The title may be specified as a nested <title> element with text contents, and the packages may be listed with nested <package> elements as for the main task.
doclet
The doclet nested element is used to specify the doclet that javadoc will use to process the input source files. A number of the standard javadoc arguments are actually arguments of the standard doclet. If these are specified in the javadoc task's attributes, they will be passed to the doclet specified in the <doclet> nested element. Such attributes should only be specified, therefore, if they can be interpreted by the doclet in use.
If the doclet requires additional parameters, these can be specified with <param> elements within the <doclet> element. These paramaters are restricted to simple strings. An example usage of the doclet element is shown below:
<javadoc ... > <doclet name="theDoclet" path="path/to/theDoclet"> <param name="-foo" value="foovalue"/> <param name="-bar" value="barvalue"/> </doclet> </javadoc>
tag
The tag nested element is used to specify custom tags. This option is only available with Java 1.4.
Parameters
Attribute | Description | Required |
name | Name of the tag (e.g. todo) | Yes |
description | Description for tag (e.g. To do:) | Yes |
enabled | Whether or not the tag is enabled (defaults to true) | No |
scope | Scope for the tag - the elements in which it can be used. This is a comma separated list of some of the elements: overview, packages, types, constructors, methods, fields or the default, all. | No |
taglet
The taglet nested element is used to specify custom taglets. This option is only available with Java 1.4.
Parameters
Attribute | Description | Required |
name | The name of the taglet class (e.g. com.sun.tools.doclets.ToDoTaglet) | Yes |
path | A path specifying the search path for the taglet class (e.g. /home/taglets). The path may also be specified by a nested <path> element | No |
sourcepath, classpath and bootclasspath
Javadoc's sourcepath, classpath and bootclasspath attributes are PATH like structure and can also be set via nested sourcepath, classpath and bootclasspath elements respectively.
Example
<javadoc packagenames="com.dummy.test.*" sourcepath="src" excludepackagenames="com.dummy.test.doc-files.*" defaultexcludes="yes" destdir="docs/api" author="true" version="true" use="true" windowtitle="Test API"> <doctitle><![CDATA[<h1>Test</h1>]]></doctitle> <bottom><![CDATA[<i>Copyright © 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom> <tag name="todo" scope="all" description="To do:" /> <group title="Group 1 Packages" packages="com.dummy.test.a*"/> <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/> <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/> <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/> </javadoc>is the same as
<javadoc destdir="docs/api" author="true" version="true" use="true" windowtitle="Test API"> <packageset dir="src" defaultexcludes="yes"> <include name="com/dummy/test/**" /> <exclude name="com/dummy/test/doc-files/**"/> </packageset> <doctitle><![CDATA[<h1>Test</h1>]]></doctitle> <bottom><![CDATA[<i>Copyright © 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom> <tag name="todo" scope="all" description="To do:" /> <group title="Group 1 Packages" packages="com.dummy.test.a*"/> <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/> <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/> <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/> </javadoc>or
<javadoc destdir="docs/api" author="true" version="true" use="true" windowtitle="Test API"> <fileset dir="src" defaultexcludes="yes"> <include name="com/dummy/test/**" /> <exclude name="com/dummy/test/doc-files/**"/> </fileset> <doctitle><![CDATA[<h1>Test</h1>]]></doctitle> <bottom><![CDATA[<i>Copyright © 2000 Dummy Corp. All Rights Reserved.</i>]]></bottom> <tag name="todo" scope="all" description="To do:" /> <group title="Group 1 Packages" packages="com.dummy.test.a*"/> <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/> <link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/> <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/> </javadoc>