Package com.tngtech.archunit.lang
Class ConditionEvents
- java.lang.Object
-
- com.tngtech.archunit.lang.ConditionEvents
-
- All Implemented Interfaces:
java.lang.Iterable<ConditionEvent>
public final class ConditionEvents extends java.lang.Object implements java.lang.Iterable<ConditionEvent>
-
-
Constructor Summary
Constructors Constructor Description ConditionEvents()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ConditionEvent event)
boolean
containViolation()
void
describeFailuresTo(CollectsLines messages)
java.util.Collection<ConditionEvent>
getAllowed()
java.util.Collection<ConditionEvent>
getViolating()
void
handleViolations(ViolationHandler<?> violationHandler)
Passes violations to the suppliedViolationHandler
.boolean
isEmpty()
java.util.Iterator<ConditionEvent>
iterator()
java.lang.String
toString()
-
-
-
Method Detail
-
add
public void add(ConditionEvent event)
-
getViolating
public java.util.Collection<ConditionEvent> getViolating()
-
getAllowed
public java.util.Collection<ConditionEvent> getAllowed()
-
containViolation
public boolean containViolation()
-
isEmpty
public boolean isEmpty()
-
describeFailuresTo
public void describeFailuresTo(CollectsLines messages)
-
handleViolations
public void handleViolations(ViolationHandler<?> violationHandler)
Passes violations to the suppliedViolationHandler
. The passed violations will automatically be filtered by the reified type of the givenViolationHandler
. That is, if aViolationHandler<SomeClass>
is passed, only violations by objects assignable toSomeClass
will be reported. The term 'reified' means, that the type parameter was not erased, i.e. ArchUnit can still determine the actual type parameter of the passed violation handler, otherwise the upper bound, in extreme casesObject
, will be used (i.e. all violations will be passed).- Parameters:
violationHandler
- The violation handler that is supposed to handle all violations matching the respective type parameter
-
iterator
public java.util.Iterator<ConditionEvent> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<ConditionEvent>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-