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 34 KiB

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