com.puppycrawl.tools.checkstyle.filters
Class SuppressionCommentFilter.Tag
java.lang.Object
com.puppycrawl.tools.checkstyle.filters.SuppressionCommentFilter.Tag
- SuppressionCommentFilter
- Comparable
public class SuppressionCommentFilter.Tag
implements Comparable
A Tag holds a suppression comment and its location, and determines
whether the supression turns checkstyle reporting on or off.
Tag(int aLine, int aColumn, String aText, boolean aOn) - Constructs a tag.
|
int | compareTo(Object aObject) - Compares the position of this tag in the file
with the position of another tag.
|
int | getColumn() - Determines the column number of the tag in the source file.
|
int | getLine()
|
String | getText()
|
boolean | isMatch(AuditEvent aEvent) - Determines whether the source of an audit event
matches the text of this tag.
|
boolean | isOn() - Determines whether the suppression turns checkstyle reporting on or
off.
|
String | toString() -
|
Tag
public Tag(int aLine,
int aColumn,
String aText,
boolean aOn)
throws ConversionException
Constructs a tag.
aLine
- the line number.aColumn
- the column number.aText
- the text of the suppression.aOn
- true
if the tag turns checkstyle reporting.
compareTo
public int compareTo(Object aObject)
Compares the position of this tag in the file
with the position of another tag.
aObject
- the tag to compare with this one.
- a negative number if this tag is before the other tag,
0 if they are at the same position, and a positive number if this
tag is after the other tag.
getColumn
public int getColumn()
Determines the column number of the tag in the source file.
Will be 0 for all lines of multiline comment, except the
first line.
- the column number of the tag in the source file.
getLine
public int getLine()
- the line number of the tag in the source file.
getText
public String getText()
isMatch
public boolean isMatch(AuditEvent aEvent)
Determines whether the source of an audit event
matches the text of this tag.
aEvent
- the AuditEvent
to check.
- true if the source of aEvent matches the text of this tag.
isOn
public boolean isOn()
Determines whether the suppression turns checkstyle reporting on or
off.
true
if the suppression turns reporting on.
toString
public final String toString()