Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support dependOnClassesThat() for methods #1135

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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