Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check that a class has method that... #1588

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);

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions