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 PatternThe regexp which is used to match the event ID.private final PatternThe regexp which is used to match the event message.private final PatternThe regexp which is used to match the event source.private final intSuppression line.private final SuppressWithPlainTextCommentFilter.SuppressionTypeSuppression type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSuppression(String text, int lineNo, SuppressWithPlainTextCommentFilter.SuppressionType suppressionType, SuppressWithPlainTextCommentFilter filter) Creates new suppression instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()private booleanisCheckMatch(AuditEvent event) Checks whetherAuditEventsource name matches the check format.private booleanisIdMatch(AuditEvent event) Checks whether theAuditEventmodule ID matches the ID format.private booleanisInScopeOfSuppression(AuditEvent event) Checks whetherAuditEventis in the scope of the suppression.private booleanisMatch(AuditEvent event) Checks whether the suppression matches the givenAuditEvent.private booleanisMessageMatch(AuditEvent event) Checks whether theAuditEventmessage 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- theSuppressWithPlainTextCommentFilterwith 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-AuditEventinstance.- Returns:
- true if the suppression matches
AuditEvent.
-
isInScopeOfSuppression
Checks whetherAuditEventis in the scope of the suppression.- Parameters:
event-AuditEventinstance.- Returns:
- true if
AuditEventis in the scope of the suppression.
-
isCheckMatch
Checks whetherAuditEventsource name matches the check format.- Parameters:
event-AuditEventinstance.- Returns:
- true if the
AuditEventsource name matches the check format.
-
isIdMatch
Checks whether theAuditEventmodule ID matches the ID format.- Parameters:
event-AuditEventinstance.- Returns:
- true if the
AuditEventmodule ID matches the ID format.
-
isMessageMatch
Checks whether theAuditEventmessage matches the message format.- Parameters:
event-AuditEventinstance.- Returns:
- true if the
AuditEventmessage matches the message format.
-