Package com.tngtech.archunit.lang
Interface ConditionEvents
Collects
events
that occur when checking ArchConditions
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ConditionEvent event) Adds aConditionEvent
to these events.boolean
void
setInformationAboutNumberOfViolations
(String informationAboutNumberOfViolations) Can be used to override the information about the number of violations.
-
Method Details
-
add
Adds aConditionEvent
to these events.- Parameters:
event
- AConditionEvent
caused by anArchCondition
when checking some element
-
getInformationAboutNumberOfViolations
-
setInformationAboutNumberOfViolations
Can be used to override the information about the number of violations. If absent the violated rule will simply report the number of violation lines as the number of violations (which is typically correct, since ArchUnit usually reports one violation per line). However, in cases where violations are omitted (e.g. because a limit of reported violations is configured), this information can be supplied here to inform users that there actually were more violations than reported.- Parameters:
informationAboutNumberOfViolations
- The text to be shown for the number of times a rule has been violated
-
getViolating
Collection<ConditionEvent> getViolating()- Returns:
- All
events
that correspond to violations.
-
containViolation
boolean containViolation()- Returns:
true
, if these events contain anyviolating
event, otherwisefalse
-