Class HtmlTag
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.javadoc.HtmlTag
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
closedTag
If this tag is self-closed.private String
id
The HTML tag name.private boolean
incompleteTag
If the tag is incomplete.private int
lineNo
The line number in the source file where this tag was found.private static int
MAX_TEXT_LEN
The maximum length of text to display with this tag.private int
position
The position within the line where this tag was found.private String
text
The comment line of text where this tag appears.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Returns the id (name) of this tag.int
getLineNo()
Returns the source line number where this tag was found.int
getPosition()
Returns the position with in the comment line where this tag was found.String
getText()
Returns the comment line of text where this tag appears.boolean
isClosedTag()
Indicates if this tag is a self-closed XHTML style.boolean
isCloseTag()
Indicates if this tag is a close (end) tag.boolean
isIncompleteTag()
Indicates if this tag is incomplete (has no close >).String
toString()
-
-
-
Field Detail
-
MAX_TEXT_LEN
private static final int MAX_TEXT_LEN
The maximum length of text to display with this tag.- See Also:
- Constant Field Values
-
lineNo
private final int lineNo
The line number in the source file where this tag was found.
-
position
private final int position
The position within the line where this tag was found.
-
closedTag
private final boolean closedTag
If this tag is self-closed.
-
incompleteTag
private final boolean incompleteTag
If the tag is incomplete.
-
-
Constructor Detail
-
HtmlTag
HtmlTag(String id, int lineNo, int position, boolean closedTag, boolean incomplete, String text)
Construct 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 Detail
-
isCloseTag
public boolean isCloseTag()
Indicates if this tag is a close (end) tag.- Returns:
true
is this is a close tag.
-
isClosedTag
public boolean isClosedTag()
Indicates if this tag is a self-closed XHTML style.- Returns:
true
is this is a self-closed tag.
-
isIncompleteTag
public boolean isIncompleteTag()
Indicates if this tag is incomplete (has no close >).- Returns:
true
if the tag is incomplete.
-
getLineNo
public int getLineNo()
Returns the source line number where this tag was found. Used for displaying a Checkstyle violation.- Returns:
- an int line number.
-
getPosition
public int getPosition()
Returns the position with in the comment line where this tag was found. Used for displaying a Checkstyle violation.- Returns:
- an int relative to zero.
-
-