howto use code examples, <pre> or <code>
i want to drop some code examples in my javadoc.i am currently using <pre> which works since it is html but is there another tag?i have found nothing in the javadoc manual.thnx
<pre> is correct for formatting code examples properly.
In 1.4.0, you can even omit the leading asterisks (*)
so that you can just paste examples into doc comments.
There is no standard tag, such as @example, for including
examples, though you could create one in 1.4.0 using
-tag or -taglet.
-Doug Kramer
Javadoc team
You mean an XML version of the API documentation, generated by an XML doclet? This is something we'd like to produce, but probably won't get to it in the next year.-Doug
yes, something like that. it would be interesting to search for libraries, packages, individuals classes themselves. just a thought.