net.cscott.sinjdoc

Interface Tag

public interface Tag

The Tag class represents a documentation tag. The tag name and tag text are available for queries; tags with structure or which require special processing are handled by subclasses.

Every tag can have both inline and trailing tags, although in practice only top-level 'Text' tags contain trailing tags.

Version: $Id: Tag.java,v 1.7 2003/05/08 03:54:25 cananian Exp $

Author: C. Scott Ananian (cscott@cscott.net)

See Also: com.sun.javadoc.Tag

Method Summary
<T> Taccept(TagVisitor<T> visitor)
Accept a visitor.
List<Tag>contents()
Return the contents of this tag; that is, the portion beyond the tag name and before the closing brace.
booleanisInline()
Returns true if this is an inline tag.
booleanisText()
Returns true if this is a "Text" tag.
booleanisTrailing()
Returns true if this is a trailing tag.
Stringname()
Return the name of this tag, or null if isText() is true.
SourcePositionposition()
Return the source position of this tag.
Stringtext()
Return the plain-text represented by this tag, or null if isText() is false.
StringtoString()
Return a human-readable representation of this tag object.

Method Detail

accept

public <T> T accept(TagVisitor<T> visitor)
Accept a visitor.

contents

public List<Tag> contents()
Return the contents of this tag; that is, the portion beyond the tag name and before the closing brace. The returned list of tags will never contain Tags with isTrailing() true. Returns null if isText() is true.

isInline

public boolean isInline()
Returns true if this is an inline tag. Inline tags may contain text with other inline tags (!) but never contain trailing tags.

isText

public boolean isText()
Returns true if this is a "Text" tag. Text tags represent a string of plain-text, possibly with embedded inline tags.

isTrailing

public boolean isTrailing()
Returns true if this is a trailing tag. Trailing tags may contain content with inline tags, but never contain other trailing tags.

name

public String name()
Return the name of this tag, or null if isText() is true.

position

public SourcePosition position()
Return the source position of this tag. Will never return null.

text

public String text()
Return the plain-text represented by this tag, or null if isText() is false.

toString

public String toString()
Return a human-readable representation of this tag object.
Copyright © 2003 C. Scott Ananian