class HtmlTag
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
closedTag
If this tag is self-closed.
|
private java.lang.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 java.lang.String |
text
The comment line of text where this tag appears.
|
Constructor and Description |
---|
HtmlTag(java.lang.String id,
int lineNo,
int position,
boolean closedTag,
boolean incomplete,
java.lang.String text)
Construct the HtmlTag.
|
Modifier and Type | Method and Description |
---|---|
java.lang.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.
|
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 >).
|
java.lang.String |
toString() |
private static final int MAX_TEXT_LEN
private final java.lang.String id
private final int lineNo
private final int position
private final java.lang.String text
private final boolean closedTag
private final boolean incompleteTag
HtmlTag(java.lang.String id, int lineNo, int position, boolean closedTag, boolean incomplete, java.lang.String text)
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.public java.lang.String getId()
public boolean isCloseTag()
true
is this is a close tag.public boolean isClosedTag()
true
is this is a self-closed tag.public boolean isIncompleteTag()
true
if the tag is incomplete.public int getLineNo()
public int getPosition()
public java.lang.String toString()
toString
in class java.lang.Object