Returns a tag of the specified kind in the specified Doc
element.
This function actually does the same as the following script:
So, when you are sure you need only oneallTags = tags(docElement, tagName); (allTags.length() > 0) ? allTags[0] : null;
Tag
element you may
rather use this function than the script above.
Note, the function returns the element identifier. To convert it to
the element object, you will need to use the findElementById()
function:
Parameters:findElementById(tag("@mytag"))
element
TheDoc
element whose tag is requested.It may be also a
Type
element, which is automatically converted to theClassDoc
by calling the Doclet API method:Type.asClassDoc()
If the
element
is not an instance ofDoc
orType
type, the function returnsnull
.If this parameter is not specified, the generator context element is assumed, i.e. the same as the call:
contextElement.tag(tagName)
tagName
The name of the tag kind to search for.
See Also:
hasTag(), tags(), findElementById(), GOMElement.id