|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Taglet
The interface for a custom tag used by Doclets. A custom
tag must implement this interface. To be loaded and used by
doclets at run-time, the taglet must have a static method called
register that accepts a Map as an
argument with the following signature:
public void register(Map map)This method should add an instance of the custom taglet to the map with the name of the taglet as the key. If overriding a taglet, to avoid a name conflict, the overridden taglet must be deleted from the map before an instance of the new taglet is added to the map.
It is recommended that the taglet throw an exception when it fails to register itself. The exception that it throws is up to the user.
Here are two sample taglets:
For more information on how to create your own Taglets, please see the Taglet Overview.
| Method Summary | |
|---|---|
java.lang.String |
getName()
Return the name of this custom tag. |
TagletOutput |
getTagletOutput(Doc holder,
TagletWriter writer)
Given a Doc object, check if it holds any tags of
this type. |
TagletOutput |
getTagletOutput(Tag tag,
TagletWriter writer)
Given the Tag representation of this custom
tag, return its TagletOutput representation, which is output
to the generated page. |
boolean |
inConstructor()
Return true if this Taglet
is used in constructor documentation. |
boolean |
inField()
Return true if this Taglet
is used in field documentation. |
boolean |
inMethod()
Return true if this Taglet
is used in method documentation. |
boolean |
inOverview()
Return true if this Taglet
is used in overview documentation. |
boolean |
inPackage()
Return true if this Taglet
is used in package documentation. |
boolean |
inType()
Return true if this Taglet
is used in type documentation (classes or
interfaces). |
boolean |
isInlineTag()
Return true if this Taglet
is an inline tag. |
| Method Detail |
|---|
boolean inField()
Taglet
is used in field documentation.
Taglet
is used in field documentation and false
otherwise.boolean inConstructor()
Taglet
is used in constructor documentation.
Taglet
is used in constructor documentation and false
otherwise.boolean inMethod()
Taglet
is used in method documentation.
Taglet
is used in method documentation and false
otherwise.boolean inOverview()
Taglet
is used in overview documentation.
Taglet
is used in method documentation and false
otherwise.boolean inPackage()
Taglet
is used in package documentation.
Taglet
is used in package documentation and false
otherwise.boolean inType()
Taglet
is used in type documentation (classes or
interfaces).
Taglet
is used in type documentation and false
otherwise.boolean isInlineTag()
Taglet
is an inline tag. Return false otherwise.
Taglet
is an inline tag and false otherwise.java.lang.String getName()
TagletOutput getTagletOutput(Tag tag,
TagletWriter writer)
throws java.lang.IllegalArgumentException
Tag representation of this custom
tag, return its TagletOutput representation, which is output
to the generated page.
tag - the Tag representation of this custom tag.writer - a TagletWriter Taglet writer.
Tag.
java.lang.IllegalArgumentException - thrown when the method is not supported by the taglet.
TagletOutput getTagletOutput(Doc holder,
TagletWriter writer)
throws java.lang.IllegalArgumentException
Doc object, check if it holds any tags of
this type. If it does, return the string representing the output.
If it does not, return null.
holder - a Doc object holding the custom tag.writer - a TagletWriter Taglet writer.
Tag.
java.lang.IllegalArgumentException - thrown when the method is not supported by the taglet.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||