You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

javadoc.html 32 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css"/>
  5. <title>Javadoc Task</title>
  6. </head>
  7. <body>
  8. <h2><a name="javadoc">Javadoc/<i>Javadoc2</i></a></h2>
  9. <h3>Description</h3>
  10. <p>Generates code documentation using the javadoc tool.</p>
  11. <p>The source directory will be recursively scanned for Java source files to process
  12. but only those matching the inclusion rules, and not matching the exclusions rules
  13. will be passed to the javadoc tool. This
  14. allows wildcards to be used to choose between package names, reducing verbosity
  15. and management costs over time. This task, however, has no notion of
  16. &quot;changed&quot; files, unlike the <a href="javac.html">javac</a> task. This means
  17. all packages will be processed each time this task is run. In general, however,
  18. this task is used much less frequently.</p>
  19. <p>This task works seamlessly between different javadoc versions (1.2 and 1.4),
  20. with the obvious restriction that the 1.4 attributes
  21. will be ignored if run in a 1.2 VM.</p>
  22. <p>NOTE: since javadoc calls System.exit(), javadoc cannot be run inside the
  23. same VM as Ant without breaking functionality. For this reason, this task
  24. always forks the VM. This overhead is not significant since javadoc is normally a heavy
  25. application and will be called infrequently.</p>
  26. <p>NOTE: the packagelist attribute allows you to specify the list of packages to
  27. document outside of the Ant file. It's a much better practice to include everything
  28. inside the <code>build.xml</code> file. This option was added in order to make it easier to
  29. migrate from regular makefiles, where you would use this option of javadoc.
  30. The packages listed in packagelist are not checked, so the task performs even
  31. if some packages are missing or broken. Use this option if you wish to convert from
  32. an existing makefile. Once things are running you should then switch to the regular
  33. notation. </p>
  34. <p><i><b>DEPRECATION:</b> the javadoc2 task simply points to the javadoc task and it's
  35. there for back compatibility reasons. Since this task will be removed in future
  36. versions, you are strongly encouraged to use <a href="javadoc.html">javadoc</a>
  37. instead.</i></p>
  38. <p>In the table below, 1.2 means available if your current Java VM is
  39. a 1.2 VM (but not 1.3 or later), 1.4+ for any VM of at least version 1.4, otherwise
  40. any VM of at least version 1.2 is acceptable. JDK 1.1 is no longer supported.
  41. If you specify the <code>executable</code> attribute it is up to you
  42. to ensure that this command supports the attributes you wish to use.</p>
  43. <h3>Parameters</h3>
  44. <table border="1" cellpadding="2" cellspacing="0">
  45. <tr>
  46. <td valign="top"><b>Attribute</b></td>
  47. <td valign="top"><b>Description</b></td>
  48. <td align="center" valign="top"><b>Availability</b></td>
  49. <td align="center" valign="top"><b>Required</b></td>
  50. </tr>
  51. <tr>
  52. <td valign="top">sourcepath</td>
  53. <td valign="top">Specify where to find source files</td>
  54. <td align="center" valign="top">all</td>
  55. <td align="center" rowspan="3">At least one of the three or nested
  56. <code>&lt;sourcepath&gt;</code>, <code>&lt;fileset&gt;</code> or
  57. <code>&lt;packageset&gt;</code></td>
  58. </tr>
  59. <tr>
  60. <td valign="top">sourcepathref</td>
  61. <td valign="top">Specify where to find source files by <a
  62. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  63. <td align="center" valign="top">all</td>
  64. </tr>
  65. <tr>
  66. <td valign="top">sourcefiles</td>
  67. <td valign="top">Comma separated list of source files -- see also
  68. the nested <code>source</code> element.</td>
  69. <td align="center" valign="top">all</td>
  70. </tr>
  71. <tr>
  72. <td valign="top">destdir</td>
  73. <td valign="top">Destination directory for output files</td>
  74. <td align="center" valign="top">all</td>
  75. <td align="center" valign="top">Yes, unless a doclet has been specified.</td>
  76. </tr>
  77. <tr>
  78. <td valign="top">maxmemory</td>
  79. <td valign="top">Max amount of memory to allocate to the javadoc VM</td>
  80. <td align="center" valign="top">all</td>
  81. <td align="center" valign="top">No</td>
  82. </tr>
  83. <tr>
  84. <td valign="top">packagenames</td>
  85. <td valign="top">Comma separated list of package files (with terminating
  86. wildcard) -- see also the nested <code>package</code> element.</td>
  87. <td align="center" valign="top">all</td>
  88. <td align="center" valign="top">No</td>
  89. </tr>
  90. <tr>
  91. <td valign="top">packageList</td>
  92. <td valign="top">The name of a file containing the packages to process</td>
  93. <td align="center" valign="top">all</td>
  94. <td align="center" valign="top">No</td>
  95. </tr>
  96. <tr>
  97. <td valign="top">classpath</td>
  98. <td valign="top">Specify where to find user class files</td>
  99. <td align="center" valign="top">all</td>
  100. <td align="center" valign="top">No</td>
  101. </tr>
  102. <tr>
  103. <td valign="top">Bootclasspath</td>
  104. <td valign="top">Override location of class files loaded by the bootstrap
  105. class loader</td>
  106. <td align="center" valign="top">all</td>
  107. <td align="center" valign="top">No</td>
  108. </tr>
  109. <tr>
  110. <td valign="top">classpathref</td>
  111. <td valign="top">Specify where to find user class files by <a
  112. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  113. <td align="center" valign="top">all</td>
  114. <td align="center" valign="top">No</td>
  115. </tr>
  116. <tr>
  117. <td valign="top">bootclasspathref</td>
  118. <td valign="top">Override location of class files loaded by the
  119. bootstrap class loader by <a href="../using.html#references">reference</a> to a
  120. PATH defined elsewhere.</td>
  121. <td align="center" valign="top">all</td>
  122. <td align="center" valign="top">No</td>
  123. </tr>
  124. <tr>
  125. <td valign="top">Extdirs</td>
  126. <td valign="top">Override location of installed extensions</td>
  127. <td align="center" valign="top">all</td>
  128. <td align="center" valign="top">No</td>
  129. </tr>
  130. <tr>
  131. <td valign="top">Overview</td>
  132. <td valign="top">Read overview documentation from HTML file</td>
  133. <td align="center" valign="top">all</td>
  134. <td align="center" valign="top">No</td>
  135. </tr>
  136. <tr>
  137. <td valign="top">access</td>
  138. <td valign="top">Access mode: one of <code>public</code>, <code>protected</code>,
  139. <code>package</code>, or <code>private</code></td>
  140. <td align="center" valign="top">all</td>
  141. <td align="center" valign="top">No (default <code>protected</code>)</td>
  142. </tr>
  143. <tr>
  144. <td valign="top">Public</td>
  145. <td valign="top">Show only public classes and members</td>
  146. <td align="center" valign="top">all</td>
  147. <td align="center" valign="top">No</td>
  148. </tr>
  149. <tr>
  150. <td valign="top">Protected</td>
  151. <td valign="top">Show protected/public classes and members (default)</td>
  152. <td align="center" valign="top">all</td>
  153. <td align="center" valign="top">No</td>
  154. </tr>
  155. <tr>
  156. <td valign="top">Package</td>
  157. <td valign="top">Show package/protected/public classes and members</td>
  158. <td align="center" valign="top">all</td>
  159. <td align="center" valign="top">No</td>
  160. </tr>
  161. <tr>
  162. <td valign="top">Private</td>
  163. <td valign="top">Show all classes and members</td>
  164. <td align="center" valign="top">all</td>
  165. <td align="center" valign="top">No</td>
  166. </tr>
  167. <tr>
  168. <td valign="top">Old</td>
  169. <td valign="top">Generate output using JDK 1.1 emulating doclet</td>
  170. <td align="center" valign="top">1.2</td>
  171. <td align="center" valign="top">No</td>
  172. </tr>
  173. <tr>
  174. <td valign="top">Verbose</td>
  175. <td valign="top">Output messages about what Javadoc is doing</td>
  176. <td align="center" valign="top">all</td>
  177. <td align="center" valign="top">No</td>
  178. </tr>
  179. <tr>
  180. <td valign="top">Locale</td>
  181. <td valign="top">Locale to be used, e.g. en_US or en_US_WIN</td>
  182. <td align="center" valign="top">all</td>
  183. <td align="center" valign="top">No</td>
  184. </tr>
  185. <tr>
  186. <td valign="top">Encoding</td>
  187. <td valign="top">Source file encoding name</td>
  188. <td align="center" valign="top">all</td>
  189. <td align="center" valign="top">No</td>
  190. </tr>
  191. <tr>
  192. <td valign="top">Version</td>
  193. <td valign="top">Include @version paragraphs</td>
  194. <td align="center" valign="top">all</td>
  195. <td align="center" valign="top">No</td>
  196. </tr>
  197. <tr>
  198. <td valign="top">Use</td>
  199. <td valign="top">Create class and package usage pages</td>
  200. <td align="center" valign="top">all</td>
  201. <td align="center" valign="top">No</td>
  202. </tr>
  203. <tr>
  204. <td valign="top">Author</td>
  205. <td valign="top">Include @author paragraphs</td>
  206. <td align="center" valign="top">all</td>
  207. <td align="center" valign="top">No</td>
  208. </tr>
  209. <tr>
  210. <td valign="top">Splitindex</td>
  211. <td valign="top">Split index into one file per letter</td>
  212. <td align="center" valign="top">all</td>
  213. <td align="center" valign="top">No</td>
  214. </tr>
  215. <tr>
  216. <td valign="top">Windowtitle</td>
  217. <td valign="top">Browser window title for the documentation (text)</td>
  218. <td align="center" valign="top">all</td>
  219. <td align="center" valign="top">No</td>
  220. </tr>
  221. <tr>
  222. <td valign="top">Doctitle</td>
  223. <td valign="top">Include title for the package index(first) page (html-code)</td>
  224. <td align="center" valign="top">all</td>
  225. <td align="center" valign="top">No</td>
  226. </tr>
  227. <tr>
  228. <td valign="top">Header</td>
  229. <td valign="top">Include header text for each page (html-code)</td>
  230. <td align="center" valign="top">all</td>
  231. <td align="center" valign="top">No</td>
  232. </tr>
  233. <tr>
  234. <td valign="top">Footer</td>
  235. <td valign="top">Include footer text for each page (html-code)</td>
  236. <td align="center" valign="top">all</td>
  237. <td align="center" valign="top">No</td>
  238. </tr>
  239. <tr>
  240. <td valign="top">bottom</td>
  241. <td valign="top">Include bottom text for each page (html-code)</td>
  242. <td align="center" valign="top">all</td>
  243. <td align="center" valign="top">No</td>
  244. </tr>
  245. <tr>
  246. <td valign="top">link</td>
  247. <td valign="top">Create links to javadoc output at the given URL
  248. -- see also the nested <code>link</code> element.</td>
  249. <td align="center" valign="top">all</td>
  250. <td align="center" valign="top">No</td>
  251. </tr>
  252. <tr>
  253. <td valign="top">linkoffline</td>
  254. <td valign="top">Link to docs at <code>&lt;url&gt;</code> using package list at
  255. <code>&lt;url2&gt;</code> - separate the URLs by using a space character -- see
  256. also the nested <code>link</code> element.</td>
  257. <td align="center" valign="top">all</td>
  258. <td align="center" valign="top">No</td>
  259. </tr>
  260. <tr>
  261. <td valign="top">group</td>
  262. <td valign="top">Group specified packages together in overview
  263. page. The format is as described <a
  264. href="#groupattribute">below</a> -- see also the nested
  265. <code>group</code> element.</td>
  266. <td align="center" valign="top">all</td>
  267. <td align="center" valign="top">No</td>
  268. </tr>
  269. <tr>
  270. <td valign="top">nodeprecated</td>
  271. <td valign="top">Do not include @deprecated information</td>
  272. <td align="center" valign="top">all</td>
  273. <td align="center" valign="top">No</td>
  274. </tr>
  275. <tr>
  276. <td valign="top">nodeprecatedlist</td>
  277. <td valign="top">Do not generate deprecated list</td>
  278. <td align="center" valign="top">all</td>
  279. <td align="center" valign="top">No</td>
  280. </tr>
  281. <tr>
  282. <td valign="top">notree</td>
  283. <td valign="top">Do not generate class hierarchy</td>
  284. <td align="center" valign="top">all</td>
  285. <td align="center" valign="top">No</td>
  286. </tr>
  287. <tr>
  288. <td valign="top">noindex</td>
  289. <td valign="top">Do not generate index</td>
  290. <td align="center" valign="top">all</td>
  291. <td align="center" valign="top">No</td>
  292. </tr>
  293. <tr>
  294. <td valign="top">nohelp</td>
  295. <td valign="top">Do not generate help link</td>
  296. <td align="center" valign="top">all</td>
  297. <td align="center" valign="top">No</td>
  298. </tr>
  299. <tr>
  300. <td valign="top">nonavbar</td>
  301. <td valign="top">Do not generate navigation bar</td>
  302. <td align="center" valign="top">all</td>
  303. <td align="center" valign="top">No</td>
  304. </tr>
  305. <tr>
  306. <td valign="top">serialwarn</td>
  307. <td valign="top">Generate warning about @serial tag</td>
  308. <td align="center" valign="top">all</td>
  309. <td align="center" valign="top">No</td>
  310. </tr>
  311. <tr>
  312. <td valign="top">helpfile</td>
  313. <td valign="top">Specifies the HTML help file to use</td>
  314. <td align="center" valign="top">all</td>
  315. <td align="center" valign="top">No</td>
  316. </tr>
  317. <tr>
  318. <td valign="top">stylesheetfile</td>
  319. <td valign="top">Specifies the CSS stylesheet to use</td>
  320. <td align="center" valign="top">all</td>
  321. <td align="center" valign="top">No</td>
  322. </tr>
  323. <tr>
  324. <td valign="top">charset</td>
  325. <td valign="top">Charset for cross-platform viewing of generated
  326. documentation</td>
  327. <td align="center" valign="top">all</td>
  328. <td align="center" valign="top">No</td>
  329. </tr>
  330. <tr>
  331. <td valign="top">docencoding</td>
  332. <td valign="top">Output file encoding name</td>
  333. <td align="center" valign="top">all</td>
  334. <td align="center" valign="top">No</td>
  335. </tr>
  336. <tr>
  337. <td valign="top">doclet</td>
  338. <td valign="top">Specifies the class file that starts the doclet
  339. used in generating the documentation -- see also the nested
  340. <code>doclet</code> element.</td>
  341. <td align="center" valign="top">all</td>
  342. <td align="center" valign="top">No</td>
  343. </tr>
  344. <tr>
  345. <td valign="top">docletpath</td>
  346. <td valign="top">Specifies the path to the doclet class file that is specified with the -doclet option.</td>
  347. <td align="center" valign="top">all</td>
  348. <td align="center" valign="top">No</td>
  349. </tr>
  350. <tr>
  351. <td valign="top">docletpathref</td>
  352. <td valign="top">Specifies the path to the doclet class file that
  353. is specified with the -doclet option by <a
  354. href="../using.html#references">reference</a> to a PATH defined elsewhere.</td>
  355. <td align="center" valign="top">all</td>
  356. <td align="center" valign="top">No</td>
  357. </tr>
  358. <tr>
  359. <td valign="top">additionalparam</td>
  360. <td valign="top">Lets you add additional parameters to the javadoc
  361. command line. Useful for doclets. Parameters containing spaces
  362. need to be quoted using &amp;quot; -- see also the nested
  363. <code>arg</code> element.</td>
  364. <td align="center" valign="top">all</td>
  365. <td align="center" valign="top">No</td>
  366. </tr>
  367. <tr>
  368. <td valign="top">failonerror</td>
  369. <td valign="top">Stop the buildprocess if the command exits with a
  370. returncode other than 0.</td>
  371. <td align="center" valign="top">all</td>
  372. <td align="center" valign="top">No</td>
  373. </tr>
  374. <tr>
  375. <td valign="top">excludepackagenames</td>
  376. <td valign="top">comma separated list of packages you don't want
  377. docs for -- see also the nested <code>excludepackage</code> element.</td>
  378. <td align="center" valign="top">all</td>
  379. <td valign="top" align="center">No</td>
  380. </tr>
  381. <tr>
  382. <td valign="top">defaultexcludes</td>
  383. <td valign="top">indicates whether default excludes should be used
  384. (<code>yes</code> | <code>no</code>); default excludes are used when omitted.</td>
  385. <td align="center" valign="top">all</td>
  386. <td valign="top" align="center">No</td>
  387. </tr>
  388. <tr>
  389. <td valign="top">useexternalfile</td>
  390. <td valign="top">indicates whether the sourcefile name specified
  391. in srcfiles or as nested source elements should be written to a
  392. temporary file to make the command line shorter. Also applies to
  393. the package names specified via the packagenames attribute or
  394. nested package elements.
  395. (<code>yes</code> | <code>no</code>). Default is no.</td>
  396. <td align="center" valign="top">all</td>
  397. <td valign="top" align="center">No</td>
  398. </tr>
  399. <tr>
  400. <td valign="top">source</td>
  401. <td valign="top">Necessary to enable javadoc to handle assertions
  402. present in J2SE v 1.4 source code. Set this to &quot;1.4&quot; to
  403. documents code that compiles using <code>&quot;javac -source
  404. 1.4&quot;</code>.</td>
  405. <td align="center" valign="top">1.4+</td>
  406. <td align="center" valign="top">No</td>
  407. </tr>
  408. <tr>
  409. <td valign="top">linksource</td>
  410. <td valign="top">Generate hyperlinks to source files.
  411. <em>since Ant 1.6</em>.
  412. (<code>yes</code> | <code>no</code>). Default is no.</td>
  413. <td align="center" valign="top">1.4+</td>
  414. <td align="center" valign="top">No</td>
  415. </tr>
  416. <tr>
  417. <td valign="top">breakiterator</td>
  418. <td valign="top">Use the new breakiterator algorithm.
  419. <em>since Ant 1.6</em>.
  420. (<code>yes</code> | <code>no</code>). Default is no.</td>
  421. <td align="center" valign="top">1.4+</td>
  422. <td align="center" valign="top">No</td>
  423. </tr>
  424. <tr>
  425. <td valign="top">noqualifier</td>
  426. <td valign="top">Enables the <code>-noqualifier</code> argument -
  427. must be <code>all</code> or a colon separated list of packages.
  428. <em>since Ant 1.6</em>.</td>
  429. <td align="center" valign="top">1.4+</td>
  430. <td align="center" valign="top">No</td>
  431. </tr>
  432. <tr>
  433. <td valign="top">includenosourcepackages</td>
  434. <td valign="top">If set to true, packages that don't contain Java
  435. source but a package.html will get documented as well.
  436. <em>since Ant 1.6.3</em>.</td>
  437. <td align="center" valign="top">all</td>
  438. <td align="center" valign="top">No (default is <code>false</code>)</td>
  439. </tr>
  440. </table>
  441. <h4><a name="groupattribute">Format of the group attribute</a></h4>
  442. <p>The arguments are comma-delimited. Each single argument is 2
  443. space-delimited strings, where the first one is the group's title and
  444. the second one a colon delimited list of packages.</p>
  445. <p>If you need to specify more than one group, or a group whose title
  446. contains a comma or a space character, using <a
  447. href="#groupelement">nested group elements</a> is highly
  448. recommended.</p>
  449. <p>E.g.:</p>
  450. <pre> group=&quot;XSLT_Packages org.apache.xalan.xslt*,XPath_Packages org.apache.xalan.xpath*&quot;</pre>
  451. <h3>Parameters specified as nested elements</h3>
  452. <h4>packageset</h4>
  453. <p>A <a href="../CoreTypes/dirset.html">DirSet</a>. All matched
  454. directories that contain Java source files will be passed to javadoc
  455. as package names. Package names are created from the directory names
  456. by translating the directory separator into dots. Ant assumes the
  457. base directory of the packageset points to the root of a package
  458. hierarchy.</p>
  459. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  460. <code>defaultexcludes</code> attributes of the task have no effect on
  461. the nested <code>&lt;packageset&gt;</code> elements.</p>
  462. <h4>fileset</h4>
  463. <p>A <a href="../CoreTypes/fileset.html">FileSet</a>. All matched
  464. files will be passed to javadoc as source files. Ant will
  465. automatically add the include pattern <code>**/*.java</code> (and
  466. <code>**/package.html</code> if inncludenosourcepackages is true) to
  467. these filesets.</p>
  468. <p>Nested filesets can be used to document sources that are in the
  469. default package or if you want to exclude certain files from
  470. documentation. If you want to document all source files and don't use
  471. the default package, packagesets should be used instead as this
  472. increases javadocs performance.</p>
  473. <p>The <code>packagenames</code>, <code>excludepackagenames</code> and
  474. <code>defaultexcludes</code> attributes of the task have no effect on
  475. the nested <code>&lt;fileset&gt;</code> elements.</p>
  476. <h4>package</h4>
  477. <p>Same as one entry in the list given by <code>packagenames</code>.</p>
  478. <h5>Parameters</h5>
  479. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  480. <tr>
  481. <td valign="top"><b>Attribute</b></td>
  482. <td valign="top"><b>Description</b></td>
  483. <td align="center" valign="top"><b>Required</b></td>
  484. </tr>
  485. <tr>
  486. <td valign="top">name</td>
  487. <td valign="top">The package name (may be a wildcard)</td>
  488. <td align="center" valign="top">Yes</td>
  489. </tr>
  490. </table>
  491. <h4>excludepackage</h4>
  492. <p>Same as one entry in the list given by <code>excludepackagenames</code>.</p>
  493. <h5>Parameters</h5>
  494. Same as for <code>package</code>.
  495. <h4>source</h4>
  496. <p>Same as one entry in the list given by <code>sourcefiles</code>.</p>
  497. <h5>Parameters</h5>
  498. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  499. <tr>
  500. <td valign="top"><b>Attribute</b></td>
  501. <td valign="top"><b>Description</b></td>
  502. <td align="center" valign="top"><b>Required</b></td>
  503. </tr>
  504. <tr>
  505. <td valign="top">file</td>
  506. <td valign="top">The source file to document</td>
  507. <td align="center" valign="top">Yes</td>
  508. </tr>
  509. </table>
  510. <h4>doctitle</h4>
  511. <p>Same as the <code>doctitle</code> attribute, but you can nest text
  512. inside the element this way.</p>
  513. <h4>header</h4>
  514. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  515. <h4>footer</h4>
  516. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  517. <h4>bottom</h4>
  518. <p>Similar to <code>&lt;doctitle&gt;</code>.</p>
  519. <h4>link</h4>
  520. <p>Create link to javadoc output at the given URL. This performs the
  521. same role as the link and linkoffline attributes. You can use either
  522. syntax (or both at once), but with the nested elements you can easily
  523. specify multiple occurrences of the arguments.</p>
  524. <h5>Parameters</h5>
  525. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  526. <tr>
  527. <td valign="top"><b>Attribute</b></td>
  528. <td valign="top"><b>Description</b></td>
  529. <td align="center" valign="top"><b>Required</b></td>
  530. </tr>
  531. <tr>
  532. <td valign="top">href</td>
  533. <td valign="top">The URL for the external documentation you wish
  534. to link to. This can be an absolute URL, or a relative file
  535. name.</td>
  536. <td align="center" valign="top">Yes</td>
  537. </tr>
  538. <tr>
  539. <td valign="top">offline</td>
  540. <td valign="top">True if this link is not available online at the time of
  541. generating the documentation</td>
  542. <td align="center" valign="top">No</td>
  543. </tr>
  544. <tr>
  545. <td valign="top">packagelistLoc</td>
  546. <td valign="top">The location to the directory containing the package-list file for
  547. the external documentation</td>
  548. <td align="center" valign="top">Only if the offline attribute is true</td>
  549. </tr>
  550. <tr>
  551. <td valign="top">resolveLink</td>
  552. <td valign="top">If the link attribute is a relative file name,
  553. Ant will first try to locate the file relative to the current
  554. project's basedir and if it finds a file there use an absolute URL
  555. for the link attribute, otherwise it will pass the file name
  556. verbatim to the javadoc command.</td>
  557. <td align="center" valign="top">No, default is false.</td>
  558. </tr>
  559. </table>
  560. <h4><a name="groupelement">group</a></h4>
  561. <p>Separates packages on the overview page into whatever groups you
  562. specify, one group per table. This performs the same role as the group
  563. attribute. You can use either syntax (or both at once), but with the
  564. nested elements you can easily specify multiple occurrences of the
  565. arguments.</p>
  566. <h5>Parameters</h5>
  567. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  568. <tr>
  569. <td valign="top"><b>Attribute</b></td>
  570. <td valign="top"><b>Description</b></td>
  571. <td align="center" valign="top"><b>Required</b></td>
  572. </tr>
  573. <tr>
  574. <td valign="top">title</td>
  575. <td valign="top">Title of the group</td>
  576. <td align="center" valign="top">Yes, unless nested <code>&lt;title&gt;</code> given</td>
  577. </tr>
  578. <tr>
  579. <td valign="top">packages</td>
  580. <td valign="top">List of packages to include in that group. Multiple packages are separated with ':'.</td>
  581. <td align="center" valign="top">Yes, unless nested <code>&lt;package&gt;</code>s given</td>
  582. </tr>
  583. </table>
  584. <p>The title may be specified as a nested <code>&lt;title&gt;</code> element
  585. with text contents, and the packages may be listed with nested
  586. <code>&lt;package&gt;</code> elements as for the main task.</p>
  587. <h4>doclet</h4>
  588. <p>The doclet nested element is used to specify the doclet that javadoc will
  589. use to process the input source files. A number of the standard javadoc arguments
  590. are actually arguments of the standard doclet. If these are specified in the javadoc
  591. task's attributes, they will be passed to the doclet specified in the
  592. <code>&lt;doclet&gt;</code> nested element. Such attributes should only be specified,
  593. therefore, if they can be interpreted by the doclet in use.</p>
  594. <p>If the doclet requires additional parameters, these can be specified with
  595. <code>&lt;param&gt;</code> elements within the <code>&lt;doclet&gt;</code>
  596. element. These parameters are restricted to simple strings. An example usage
  597. of the doclet element is shown below:</p>
  598. <pre> &lt;javadoc ... &gt;
  599. &lt;doclet name=&quot;theDoclet&quot;
  600. path=&quot;path/to/theDoclet&quot;&gt;
  601. &lt;param name=&quot;-foo&quot; value=&quot;foovalue&quot;/&gt;
  602. &lt;param name=&quot;-bar&quot; value=&quot;barvalue&quot;/&gt;
  603. &lt;/doclet&gt;
  604. &lt;/javadoc&gt;
  605. </pre>
  606. <h4><a name="tagelement">tag</a></h4>
  607. <p>The tag nested element is used to specify custom tags. This option
  608. is only available with Java 1.4.</p>
  609. <p>If you want to specify a standard tag using a nested tag element
  610. because you want to determine the order the tags are output, you must
  611. not set the description attribute for those tags.</p>
  612. <h5>Parameters</h5>
  613. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  614. <tr>
  615. <td valign="top"><b>Attribute</b></td>
  616. <td valign="top"><b>Description</b></td>
  617. <td align="center" valign="top"><b>Required</b></td>
  618. </tr>
  619. <tr>
  620. <td valign="top">name</td>
  621. <td valign="top">Name of the tag (e.g. <code>todo</code>)</td>
  622. <td align="center" valign="top">Yes, unless the <code>dir</code> attribute is specified.</td>
  623. </tr>
  624. <tr>
  625. <td valign="top">description</td>
  626. <td valign="top">Description for tag (e.g. <code>To do:</code>)</td>
  627. <td align="center" valign="top">Yes, unless the <code>dir</code>
  628. attribute is specified or name is a standard tag.</td>
  629. </tr>
  630. <tr>
  631. <td valign="top">enabled</td>
  632. <td valign="top">Whether or not the tag is enabled (defaults to <code>true</code>)</td>
  633. <td align="center" valign="top">No</td>
  634. </tr>
  635. <tr>
  636. <td valign="top">scope</td>
  637. <td valign="top">Scope for the tag - the elements in which it can be used. This
  638. is a comma separated list of some of the elements: <code>overview</code>,
  639. <code>packages</code>, <code>types</code>, <code>constructors</code>,
  640. <code>methods</code>, <code>fields</code> or the default, <code>all</code>.</td>
  641. <td align="center" valign="top">No</td>
  642. </tr>
  643. <tr>
  644. <td valign="top">dir</td>
  645. <td valign="top">If this attribute is specified, this element will behave as an implicit
  646. <a href="../CoreTypes/fileset.html">fileset</a>. The files included by this fileset should
  647. contain each tag definition on a separate line, as described in the
  648. <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#tag">Javadoc reference guide</a>:
  649. <pre>ejb.bean:t:"XDoclet EJB Tag"
  650. todo:a:"To Do"</pre>
  651. Note: If this attribute is specified, all the other attributes in this
  652. element will be ignored.
  653. </td>
  654. <td align="center" valign="top">No</td>
  655. </tr>
  656. <tr>
  657. <td valign="top">executable</td>
  658. <td valign="top">Specify a particular <code>javadoc</code> executable
  659. to use in place of the default binary (found in the same JDK as Ant is running in).
  660. <em>since Ant 1.7</em>.</td>
  661. <td align="center" valign="top">all</td>
  662. <td align="center" valign="top">No</td>
  663. </tr>
  664. </table>
  665. <h4><a name="tagletelement">taglet</a></h4>
  666. <p>The taglet nested element is used to specify custom taglets. This option is
  667. only available with Java 1.4.</p>
  668. <h5>Parameters</h5>
  669. <table width="60%" border="1" cellpadding="2" cellspacing="0">
  670. <tr>
  671. <td valign="top"><b>Attribute</b></td>
  672. <td valign="top"><b>Description</b></td>
  673. <td align="center" valign="top"><b>Required</b></td>
  674. </tr>
  675. <tr>
  676. <td valign="top">name</td>
  677. <td valign="top">The name of the taglet class
  678. (e.g. <code>com.sun.tools.doclets.ToDoTaglet</code>)</td>
  679. <td align="center" valign="top">Yes</td>
  680. </tr>
  681. <tr>
  682. <td valign="top">path</td>
  683. <td valign="top">A path specifying the search path for the taglet class
  684. (e.g. <code>/home/taglets</code>).
  685. The path may also be specified by a nested <code>&lt;path&gt;</code> element</td>
  686. <td align="center" valign="top">No</td>
  687. </tr>
  688. </table>
  689. <h4>sourcepath, classpath and bootclasspath</h4>
  690. <p><code>Javadoc</code>'s <i>sourcepath</i>, <i>classpath</i> and
  691. <i>bootclasspath</i> attributes are <a href="../using.html#path">PATH like
  692. structure</a> and can also be set via nested <i>sourcepath</i>,
  693. <i>classpath</i> and <i>bootclasspath</i> elements
  694. respectively.</p>
  695. <h4>arg</h4>
  696. <p>Use nested <code>&lt;arg&gt;</code> to specify additional
  697. arguments. See <a href="../using.html#arg">Command line
  698. arguments</a>. <em>Since Ant 1.6</em></p>
  699. <h3>Example</h3>
  700. <pre> &lt;javadoc packagenames=&quot;com.dummy.test.*&quot;
  701. sourcepath=&quot;src&quot;
  702. excludepackagenames=&quot;com.dummy.test.doc-files.*&quot;
  703. defaultexcludes=&quot;yes&quot;
  704. destdir=&quot;docs/api&quot;
  705. author=&quot;true&quot;
  706. version=&quot;true&quot;
  707. use=&quot;true&quot;
  708. windowtitle=&quot;Test API&quot;&gt;
  709. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  710. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  711. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  712. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  713. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  714. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/products/jdk/1.2/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  715. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  716. &lt/javadoc&gt;</pre>
  717. <p>is the same as</p>
  718. <pre> &lt;javadoc
  719. destdir=&quot;docs/api&quot;
  720. author=&quot;true&quot;
  721. version=&quot;true&quot;
  722. use=&quot;true&quot;
  723. windowtitle=&quot;Test API&quot;&gt;
  724. &lt;packageset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  725. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  726. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  727. &lt;/packageset&gt;
  728. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  729. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  730. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  731. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  732. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  733. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/products/jdk/1.2/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  734. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  735. &lt/javadoc&gt;</pre>
  736. <p>or</p>
  737. <pre> &lt;javadoc
  738. destdir=&quot;docs/api&quot;
  739. author=&quot;true&quot;
  740. version=&quot;true&quot;
  741. use=&quot;true&quot;
  742. windowtitle=&quot;Test API&quot;&gt;
  743. &lt;fileset dir=&quot;src&quot; defaultexcludes=&quot;yes&quot;&gt;
  744. &lt;include name=&quot;com/dummy/test/**&quot;/&gt;
  745. &lt;exclude name=&quot;com/dummy/test/doc-files/**&quot;/&gt;
  746. &lt;/fileset&gt;
  747. &lt;doctitle&gt;&lt;![CDATA[&lt;h1&gt;Test&lt;/h1&gt;]]&gt;&lt;/doctitle&gt;
  748. &lt;bottom&gt;&lt;![CDATA[&lt;i&gt;Copyright &amp;#169; 2000 Dummy Corp. All Rights Reserved.&lt;/i&gt;]]&gt;&lt;/bottom&gt;
  749. &lt;tag name=&quot;todo&quot; scope=&quot;all&quot; description=&quot;To do:&quot;/&gt;
  750. &lt;group title=&quot;Group 1 Packages&quot; packages=&quot;com.dummy.test.a*&quot;/&gt;
  751. &lt;group title=&quot;Group 2 Packages&quot; packages=&quot;com.dummy.test.b*:com.dummy.test.c*&quot;/&gt;
  752. &lt;link offline=&quot;true&quot; href=&quot;http://java.sun.com/products/jdk/1.2/docs/api/&quot; packagelistLoc=&quot;C:\tmp&quot;/&gt;
  753. &lt;link href=&quot;http://developer.java.sun.com/developer/products/xml/docs/api/&quot;/&gt;
  754. &lt/javadoc&gt;</pre>
  755. <hr>
  756. <p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. All rights
  757. Reserved.</p>
  758. </body>
  759. </html>