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 aConditionEventcreated byConditionByPredicate, given the description of the defining predicate and whether the predicate was satisfied.
For example, if the definingDescribedPredicatewould beJavaClass.Predicates.simpleName(String), then the created description could be(satisfied ? "has " : "does not have ") + predicateDescription.
-
Method Details
-
describe
Describes aConditionEventcreated byConditionByPredicate, given the description of the defining predicate and whether the predicate was satisfied.
For example, if the definingDescribedPredicatewould beJavaClass.Predicates.simpleName(String), then the created description could be(satisfied ? "has " : "does not have ") + predicateDescription.- Parameters:
predicateDescription- The description of theDescribedPredicatedefining theConditionByPredicatesatisfied- Whether the object tested by theConditionByPredicatesatisfied the condition- Returns:
- The description of the
ConditionEventto be created
-