Class SuppressWithNearbyCommentFilter.Tag
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.filters.SuppressWithNearbyCommentFilter.Tag
-
- Enclosing class:
- SuppressWithNearbyCommentFilter
public static class SuppressWithNearbyCommentFilter.Tag extends java.lang.Object
A Tag holds a suppression comment and its location.
-
-
Constructor Summary
Constructors Constructor Description Tag(java.lang.String text, int line, SuppressWithNearbyCommentFilter filter)
Constructs a tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
int
hashCode()
boolean
isMatch(TreeWalkerAuditEvent event)
Determines whether the source of an audit event matches the text of this tag.java.lang.String
toString()
-
-
-
Constructor Detail
-
Tag
public Tag(java.lang.String text, int line, SuppressWithNearbyCommentFilter filter)
Constructs a tag.- Parameters:
text
- the text of the suppression.line
- the line number.filter
- theSuppressWithNearbyCommentFilter
with the context- Throws:
java.lang.IllegalArgumentException
- if unable to parse expanded text.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isMatch
public boolean isMatch(TreeWalkerAuditEvent event)
Determines whether the source of an audit event matches the text of this tag.- Parameters:
event
- theTreeWalkerAuditEvent
to check.- Returns:
- true if the source of event matches the text of this tag.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-