Skip to content

Conversation

@leonardhusmann
Copy link
Contributor

This adds the following new methods to the public API to check if methods depend on a certain class (matched by predicate):

  • dependOnArgumentsThat(DescribedPredicate<? super JavaClass> predicate)
  • dependOnReturnTypesThat(DescribedPredicate<? super JavaClass> predicate)
  • accessClassesThat(DescribedPredicate<? super JavaClass> predicate)
  • dependOnClassesThat(DescribedPredicate<? super JavaClass> predicate)

The first three methods check for violations of 1) arguments 2) return types and 3) class access referencing BadClass. The last rule (dependOnClassesThat()) checks for any violation of the first three rules (somehow a convenience function if none of the fine granular access is desired)

What do you think? Any feedback is highly appreciated :)

Resolves: #1060

Issue: TNG#1060
Signed-off-by: Leonard Husmann <[email protected]>
@leonardhusmann leonardhusmann changed the title add new methods for public API support dependOnClassesThat() for methods Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support .dependOnClassesThat() for Methods

1 participant