public static class SuppressWithNearbyCommentFilter.Tag extends java.lang.Object implements java.lang.Comparable<SuppressWithNearbyCommentFilter.Tag>
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 |
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 |
---|---|
int |
compareTo(SuppressWithNearbyCommentFilter.Tag other)
Compares the position of this tag in the file
with the position of another tag.
|
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
boolean |
isMatch(AuditEvent event)
Determines whether the source of an audit event
matches the text of this tag.
|
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
public 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.public int compareTo(SuppressWithNearbyCommentFilter.Tag other)
compareTo
in interface java.lang.Comparable<SuppressWithNearbyCommentFilter.Tag>
other
- 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