public static class SuppressionCommentFilter.Tag extends java.lang.Object implements java.lang.Comparable<SuppressionCommentFilter.Tag>
Modifier and Type | Field and Description |
---|---|
private int |
column
The column number of the tag.
|
private int |
line
The line number of the tag.
|
private boolean |
reportingOn
Determines whether the suppression turns checkstyle reporting on.
|
private java.util.regex.Pattern |
tagCheckRegexp
The parsed check regexp, expanded for the text of this tag.
|
private java.util.regex.Pattern |
tagMessageRegexp
The parsed message regexp, expanded for the text of this tag.
|
private java.lang.String |
text
The text of the tag.
|
Constructor and Description |
---|
Tag(int line,
int column,
java.lang.String text,
boolean reportingOn,
SuppressionCommentFilter filter)
Constructs a tag.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SuppressionCommentFilter.Tag object)
Compares the position of this tag in the file
with the position of another tag.
|
boolean |
equals(java.lang.Object other) |
int |
getColumn()
Determines the column number of the tag in the source file.
|
int |
getLine()
Returns line number of the tag in the source file.
|
int |
hashCode() |
boolean |
isMatch(AuditEvent event)
Determines whether the source of an audit event
matches the text of this tag.
|
boolean |
isReportingOn()
Determines whether the suppression turns checkstyle reporting on or
off.
|
java.lang.String |
toString() |
private final java.lang.String text
private final int line
private final int column
private final boolean reportingOn
private final java.util.regex.Pattern tagCheckRegexp
private final java.util.regex.Pattern tagMessageRegexp
public Tag(int line, int column, java.lang.String text, boolean reportingOn, SuppressionCommentFilter filter)
line
- the line number.column
- the column number.text
- the text of the suppression.reportingOn
- true
if the tag turns checkstyle reporting.filter
- the SuppressionCommentFilter
with the contextjava.lang.IllegalArgumentException
- if unable to parse expanded text.public int getLine()
public int getColumn()
public boolean isReportingOn()
true
if the suppression turns reporting on.public int compareTo(SuppressionCommentFilter.Tag object)
compareTo
in interface java.lang.Comparable<SuppressionCommentFilter.Tag>
object
- the tag to compare with this one.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isMatch(AuditEvent event)
event
- the AuditEvent
to check.public final java.lang.String toString()
toString
in class java.lang.Object