Package com.tngtech.archunit.lang
Interface ConditionEvents
Collects
events that occur when checking ArchConditions.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ConditionEvent event) Adds aConditionEventto these events.booleanvoidsetInformationAboutNumberOfViolations(String informationAboutNumberOfViolations) Can be used to override the information about the number of violations.
-
Method Details
-
add
Adds aConditionEventto these events.- Parameters:
event- AConditionEventcaused by anArchConditionwhen 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
eventsthat correspond to violations.
-
containViolation
boolean containViolation()- Returns:
true, if these events contain anyviolatingevent, otherwisefalse
-