Package com.tngtech.archunit.lang
Interface ArchCondition.ConditionByPredicate.EventDescriber
- Enclosing class:
- ArchCondition.ConditionByPredicate<T extends HasDescription & HasSourceCodeLocation>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@PublicAPI(usage=INHERITANCE)
public static interface ArchCondition.ConditionByPredicate.EventDescriber
Defines how to describe a single
ConditionEvent
. E.g. how to describe the concrete violation of some class
com.Example
that violates the ArchCondition.ConditionByPredicate
.-
Method Summary
Modifier and TypeMethodDescriptionDescribes aConditionEvent
created byConditionByPredicate
, given the description of the defining predicate and whether the predicate was satisfied.
For example, if the definingDescribedPredicate
would beJavaClass.Predicates.simpleName(String)
, then the created description could be(satisfied ? "has " : "does not have ") + predicateDescription
.
-
Method Details
-
describe
Describes aConditionEvent
created byConditionByPredicate
, given the description of the defining predicate and whether the predicate was satisfied.
For example, if the definingDescribedPredicate
would beJavaClass.Predicates.simpleName(String)
, then the created description could be(satisfied ? "has " : "does not have ") + predicateDescription
.- Parameters:
predicateDescription
- The description of theDescribedPredicate
defining theConditionByPredicate
satisfied
- Whether the object tested by theConditionByPredicate
satisfied the condition- Returns:
- The description of the
ConditionEvent
to be created
-