Class SuppressWithPlainTextCommentFilter.Suppression
java.lang.Object
com.puppycrawl.tools.checkstyle.filters.SuppressWithPlainTextCommentFilter.Suppression
- Enclosing class:
- SuppressWithPlainTextCommentFilter
The class which represents the suppression.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pattern
The regexp which is used to match the event ID.private final Pattern
The regexp which is used to match the event message.private final Pattern
The regexp which is used to match the event source.private final int
Suppression line.private final SuppressWithPlainTextCommentFilter.SuppressionType
Suppression type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Suppression
(String text, int lineNo, SuppressWithPlainTextCommentFilter.SuppressionType suppressionType, SuppressWithPlainTextCommentFilter filter) Creates new suppression instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
private boolean
isCheckMatch
(AuditEvent event) Checks whetherAuditEvent
source name matches the check format.private boolean
isIdMatch
(AuditEvent event) Checks whether theAuditEvent
module ID matches the ID format.private boolean
isInScopeOfSuppression
(AuditEvent event) Checks whetherAuditEvent
is in the scope of the suppression.private boolean
isMatch
(AuditEvent event) Checks whether the suppression matches the givenAuditEvent
.private boolean
isMessageMatch
(AuditEvent event) Checks whether theAuditEvent
message matches the message format.
-
Field Details
-
eventSourceRegexp
The regexp which is used to match the event source. -
eventMessageRegexp
The regexp which is used to match the event message. -
eventIdRegexp
The regexp which is used to match the event ID. -
lineNo
Suppression line. -
suppressionType
Suppression type.
-
-
Constructor Details
-
Suppression
private Suppression(String text, int lineNo, SuppressWithPlainTextCommentFilter.SuppressionType suppressionType, SuppressWithPlainTextCommentFilter filter) Creates new suppression instance.- Parameters:
text
- suppression text.lineNo
- suppression line number.suppressionType
- suppression type.filter
- theSuppressWithPlainTextCommentFilter
with the context.- Throws:
IllegalArgumentException
- if there is an error in the filter regex syntax.
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
-
isMatch
Checks whether the suppression matches the givenAuditEvent
.- Parameters:
event
-AuditEvent
instance.- Returns:
- true if the suppression matches
AuditEvent
.
-
isInScopeOfSuppression
Checks whetherAuditEvent
is in the scope of the suppression.- Parameters:
event
-AuditEvent
instance.- Returns:
- true if
AuditEvent
is in the scope of the suppression.
-
isCheckMatch
Checks whetherAuditEvent
source name matches the check format.- Parameters:
event
-AuditEvent
instance.- Returns:
- true if the
AuditEvent
source name matches the check format.
-
isIdMatch
Checks whether theAuditEvent
module ID matches the ID format.- Parameters:
event
-AuditEvent
instance.- Returns:
- true if the
AuditEvent
module ID matches the ID format.
-
isMessageMatch
Checks whether theAuditEvent
message matches the message format.- Parameters:
event
-AuditEvent
instance.- Returns:
- true if the
AuditEvent
message matches the message format.
-