Class HtmlTag
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.javadoc.HtmlTag
Used to keep track of a tag and the text that follows it.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanIf this tag is self-closed.private final StringThe HTML tag name.private final booleanIf the tag is incomplete.private final intThe line number in the source file where this tag was found.private static final intThe maximum length of text to display with this tag.private final intThe position within the line where this tag was found.private final StringThe comment line of text where this tag appears.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetId()Returns the id (name) of this tag.intReturns the source line number where this tag was found.intReturns the position with in the comment line where this tag was found.getText()Returns the comment line of text where this tag appears.booleanIndicates if this tag is a self-closed XHTML style.booleanIndicates if this tag is a close (end) tag.booleanIndicates if this tag is incomplete (has no close >).toString()
- 
Field Details- 
MAX_TEXT_LENThe maximum length of text to display with this tag.- See Also:
 
- 
idThe HTML tag name.
- 
lineNoThe line number in the source file where this tag was found.
- 
positionThe position within the line where this tag was found.
- 
textThe comment line of text where this tag appears.
- 
closedTagIf this tag is self-closed.
- 
incompleteTagIf the tag is incomplete.
 
- 
- 
Constructor Details- 
HtmlTagConstruct the HtmlTag.- Parameters:
- id- the HTML tag name.
- lineNo- the source line number of this tag.
- position- the position within the text of this tag.
- closedTag- if this tag is self-closed (XHTML style)
- incomplete- is the tag is incomplete.
- text- the line of comment text for this tag.
 
 
- 
- 
Method Details- 
getIdReturns the id (name) of this tag.- Returns:
- a String id.
 
- 
isCloseTagIndicates if this tag is a close (end) tag.- Returns:
- trueis this is a close tag.
 
- 
isClosedTagIndicates if this tag is a self-closed XHTML style.- Returns:
- trueis this is a self-closed tag.
 
- 
isIncompleteTagIndicates if this tag is incomplete (has no close >).- Returns:
- trueif the tag is incomplete.
 
- 
getLineNoReturns the source line number where this tag was found. Used for displaying a Checkstyle violation.- Returns:
- an int line number.
 
- 
getPositionReturns the position with in the comment line where this tag was found. Used for displaying a Checkstyle violation.- Returns:
- an int relative to zero.
 
- 
toString
- 
getTextReturns the comment line of text where this tag appears.- Returns:
- text of the tag
 
 
-