-
Notifications
You must be signed in to change notification settings - Fork 331
Open
Open
Check that a class has method that...#1588
Description
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);
.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.
Metadata
Metadata
Assignees
Labels
No labels