private static final 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 java.util.regex.Pattern |
tagCheckRegexp
The parsed check regexp, expanded for the text of this tag.
|
private java.util.regex.Pattern |
tagIdRegexp
The parsed check ID 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 SuppressionCommentFilter.TagType |
tagType
Determines whether the suppression turns checkstyle reporting on.
|
private java.lang.String |
text
The text of the tag.
|
| Constructor and Description |
|---|
Tag(int line,
int column,
java.lang.String text,
SuppressionCommentFilter.TagType tagType,
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)
Indicates whether some other object is "equal to" this one.
|
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.
|
SuppressionCommentFilter.TagType |
getTagType()
Determines whether the suppression turns checkstyle reporting on or
off.
|
int |
hashCode() |
private boolean |
isCheckMatch(TreeWalkerAuditEvent event)
Checks whether
TreeWalkerAuditEvent source name matches the check format. |
private boolean |
isIdMatch(TreeWalkerAuditEvent event)
Checks whether the
TreeWalkerAuditEvent module ID matches the ID format. |
boolean |
isMatch(TreeWalkerAuditEvent event)
Determines whether the source of an audit event
matches the text of this tag.
|
private boolean |
isMessageMatch(TreeWalkerAuditEvent event)
Checks whether the
TreeWalkerAuditEvent message matches the message format. |
java.lang.String |
toString() |
private final java.lang.String text
private final int line
private final int column
private final SuppressionCommentFilter.TagType tagType
private final java.util.regex.Pattern tagCheckRegexp
private final java.util.regex.Pattern tagMessageRegexp
private final java.util.regex.Pattern tagIdRegexp
Tag(int line, int column, java.lang.String text, SuppressionCommentFilter.TagType tagType, SuppressionCommentFilter filter)
line - the line number.column - the column number.text - the text of the suppression.tagType - ON 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 SuppressionCommentFilter.TagType getTagType()
ON 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.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isMatch(TreeWalkerAuditEvent event)
event - the TreeWalkerAuditEvent to check.private boolean isCheckMatch(TreeWalkerAuditEvent event)
TreeWalkerAuditEvent source name matches the check format.event - TreeWalkerAuditEvent instance.TreeWalkerAuditEvent source name matches the check format.private boolean isIdMatch(TreeWalkerAuditEvent event)
TreeWalkerAuditEvent module ID matches the ID format.event - TreeWalkerAuditEvent instance.TreeWalkerAuditEvent module ID matches the ID format.private boolean isMessageMatch(TreeWalkerAuditEvent event)
TreeWalkerAuditEvent message matches the message format.event - TreeWalkerAuditEvent instance.TreeWalkerAuditEvent message matches the message format.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2022. All Rights Reserved.