I'd like to check that a class has at least one method with certain characteristics.
Something like:
classes()
.that().areAnnotatedWith(SomeAnnotation.class)
.should().containAnyMethodsThat().areAnnotatedWith(PreDestroy.class);
Unfortunately, the "containAnyMethodsThat" is only available as a DescribedPredicate, not as an ArchCondition.
As an alternative, I could use ArchConditions.does(...) to get an ArchCondition with a meaningful verb, but "does" is private (contrary to be(...) or have(...)), not sure why.
I'd like to check that a class has at least one method with certain characteristics.
Something like:
Unfortunately, the "containAnyMethodsThat" is only available as a DescribedPredicate, not as an ArchCondition.
As an alternative, I could use ArchConditions.does(...) to get an ArchCondition with a meaningful verb, but "does" is private (contrary to be(...) or have(...)), not sure why.