|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.h2b.taglets.InlineTaglet
de.h2b.taglets.reflets.RefTaglet
@ClassLabel(copyright="Copyright (C) 2008 Hans-Hermann Bode", ident="$Id: RefTaglet.java,v 1.5 2008/12/14 17:05:37 h2b Exp $") public class RefTaglet
An inline taglet for numerical referencing.
The @ref
tag is intended to be used in conjunction with the
@label
tag. By providing the same symbolic key as argument
to both tags, an identical number will appear in the output at both places;
also, a hyperlink is created that points from the reference to the label.
The scope of this mechanism is limited to the file boundary.
The number is allocated by the @label
tag. When using the
@ref
tag for a forward reference, this number is not known in the
first pass of the javadoc tool, instead the symbolic key itself will appear.
However, the references will be stored in an auxiliary file; so, in the
second run of javadoc, the references will be there. Admittedly,
this requires manual deletion of that file if new labels are inserted
who disturb the numeric order; this may be done automatically by some
clean operation of your development tool.
The syntax is {@ref
key} or
{@ref
key1,key2,...}, i.e., you can reference
several labels at once. Obviously, a key string must not contain a comma;
furthermore, to avoid conflicts with future versions you should restrict
the key string to alphanumeric characters, periods, colons, hyphens and
underlines. Keys are case-sensitive. If you wish to have your reference
enclosed by parentheses or something like that, you have to do it yourself.
For example, {@ref here}
results in the reference 1,
when label {@label here}
1 is defined here, and with
{@label there}
2 you get {@ref here,there}
1, 2.
LabelTaglet
Constructor Summary | |
---|---|
RefTaglet()
Creates this taglet. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name of this custom tag. |
static void |
register(java.util.Map tagletMap)
Deprecated. Use central registration of Registration instead. |
java.lang.String |
toString(com.sun.javadoc.Tag tag)
Returns the processed text of the tag. |
Methods inherited from class de.h2b.taglets.InlineTaglet |
---|
inConstructor, inField, inMethod, inOverview, inPackage, inType, isInlineTag, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RefTaglet()
Method Detail |
---|
@Deprecated public static void register(java.util.Map tagletMap)
Registration
instead.
tagletMap
- the map to register this tag topublic java.lang.String getName()
InlineTaglet
getName
in interface com.sun.tools.doclets.Taglet
getName
in class InlineTaglet
public java.lang.String toString(com.sun.javadoc.Tag tag)
toString
in interface com.sun.tools.doclets.Taglet
toString
in class InlineTaglet
tag
- the tag to be processed
InlineTaglet.toString(com.sun.javadoc.Tag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |