private static final class SuppressWithNearbyCommentFilter.Tag extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private int |
firstLine
The first line where warnings may be suppressed.
|
private int |
lastLine
The last line where warnings may be suppressed.
|
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 java.lang.String |
text
The text of the tag.
|
| Constructor and Description |
|---|
Tag(java.lang.String text,
int line,
SuppressWithNearbyCommentFilter filter)
Constructs a tag.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
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. |
private boolean |
isInScopeOfSuppression(TreeWalkerAuditEvent event)
Checks whether the
TreeWalkerAuditEvent is in the scope of the suppression. |
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. |
private static int |
parseInfluence(java.lang.String format,
java.lang.String influenceFormat,
java.lang.String text)
Gets influence from suppress filter influence format param.
|
java.lang.String |
toString() |
private final java.lang.String text
private final int firstLine
private final int lastLine
private final java.util.regex.Pattern tagCheckRegexp
private final java.util.regex.Pattern tagMessageRegexp
private final java.util.regex.Pattern tagIdRegexp
Tag(java.lang.String text, int line, SuppressWithNearbyCommentFilter filter)
text - the text of the suppression.line - the line number.filter - the SuppressWithNearbyCommentFilter with the contextjava.lang.IllegalArgumentException - if unable to parse expanded text.private static int parseInfluence(java.lang.String format, java.lang.String influenceFormat, java.lang.String text)
format - influence format to parseinfluenceFormat - raw influence formattext - text of the suppressionjava.lang.IllegalArgumentException - when unable to parse int in formatpublic 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 isInScopeOfSuppression(TreeWalkerAuditEvent event)
TreeWalkerAuditEvent is in the scope of the suppression.event - TreeWalkerAuditEvent instance.TreeWalkerAuditEvent is in the scope of the suppression.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.