Each implementation of a taglet must provide a public no-argument constructor to be used by doclets to instantiate the taglet. A doclet will interact with classes implementing this interface as follows:
init
method with an appropriate environment and doclet.
getName,
getAllowedLocations, and
isInlineTag, to determine the characteristics
of the tags supported by the taglet.
toString method on the taglet object,
giving it a list of tags, the element whose documentation comment contains
the tags, and the root URI of the generated output, from which the taglet
can determine the string to be included in the documentation.
The doclet will typically specify any requirements on the contents of
the string that is returned.
If a taglet object is created and used without the above protocol being followed, then the taglet's behavior is not defined by this interface specification.
API Note
It is typical for a taglet to be designed to work in conjunction with a specific doclet.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Taglet.
The kind of location in which a tag may be used. |
| Modifier and Type | Method and Description |
|---|---|
| public Set | Returns: the set of supported locations for block tagsReturns the set of supported locations for block tags. |
| public String | |
| public default void | init(DocletEnvironment
the environment in which the doclet and taglet are running env, Doclet the doclet that instantiated this taglet doclet)Initializes this taglet with the given doclet environment and doclet. |
| public default boolean | Returns: true if this taglet supports block tagsIndicates whether this taglet supports block tags. |
| public boolean | Returns: true if this taglet supports inline tagsIndicates whether this taglet supports inline tags. |
| public String | Returns: the string representation of the tags to be included in the generated outputthe list of instances of this tag tags, Element the element to which the enclosing comment belongs element)Returns the string representation of the specified instances of this tag to be included in the generated output. |
| public default String | Returns: the string representation of the tags to be included in the generated outputthe list of instances of this tag tags, Element the element to which the enclosing comment belongs element, URI the root URI of the generated output docRoot)Returns the string representation of the specified instances of this tag to be included in the generated output. |
| getAllowedLocations | back to summary |
|---|---|
| public Set Returns the set of supported locations for block tags. | |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of the tag supported by this taglet.
| |
| init | back to summary |
|---|---|
| public default void init(DocletEnvironment env, Doclet doclet) Initializes this taglet with the given doclet environment and doclet. Implementation Specification This implementation does nothing.
| |
| isBlockTag | back to summary |
|---|---|
| public default boolean isBlockTag() Indicates whether this taglet supports block tags. Implementation Specification This implementation returns the inverse
result to
| |
| isInlineTag | back to summary |
|---|---|
| public boolean isInlineTag() Indicates whether this taglet supports inline tags.
| |
| toString | back to summary |
|---|---|
| public String toString(List<? extends DocTree> tags, Element element) Returns the string representation of the specified instances of this tag to be included in the generated output. If this taglet supports API Note Taglets that do not need the root URI of the generated output may
implement this method only. Taglets that require the root URI to link to other
doclet-generated resources should override
| |
| toString | back to summary |
|---|---|
| public default String toString(List<? extends DocTree> tags, Element element, URI docRoot) Returns the string representation of the specified instances of this tag to be included in the generated output. If this taglet supports The API Note The exact form of Implementation Specification The default implementation invokes
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Taglet. | CONSTRUCTOR
In the documentation for a constructor. |
| public static final Taglet. | FIELD
In the documentation for a field. |
| public static final Taglet. | METHOD
In the documentation for a method. |
| public static final Taglet. | MODULE
In the documentation for a module. |
| public static final Taglet. | OVERVIEW
In an Overview document. |
| public static final Taglet. | PACKAGE
In the documentation for a package. |
| public static final Taglet. | TYPE
In the documentation for a type, such as a class, interface or enum. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Taglet. | |
| public static Taglet. |
| CONSTRUCTOR | back to summary |
|---|---|
| public static final Taglet. In the documentation for a constructor. | |
| FIELD | back to summary |
|---|---|
| public static final Taglet. In the documentation for a field. | |
| METHOD | back to summary |
|---|---|
| public static final Taglet. In the documentation for a method. | |
| MODULE | back to summary |
|---|---|
| public static final Taglet. In the documentation for a module. | |
| OVERVIEW | back to summary |
|---|---|
| public static final Taglet. In an Overview document. | |
| PACKAGE | back to summary |
|---|---|
| public static final Taglet. In the documentation for a package. | |
| TYPE | back to summary |
|---|---|
| public static final Taglet. In the documentation for a type, such as a class, interface or enum. | |
| Location | back to summary |
|---|---|
| private Location() | |
| valueOf | back to summary |
|---|---|
| public static Taglet. | |
| values | back to summary |
|---|---|
| public static Taglet. | |