@Contract(pure = true)
  default CallMatcher withContextFilter(@NotNull Predicate<? super PsiElement> filter) {
    return new CallMatcher() {
      @Override
      public Stream<String> names() {
        return CallMatcher.this.names();
      }

      @Override
      public boolean methodReferenceMatches(PsiMethodReferenceExpression methodRef) {
        if (methodRef == null || !filter.test(methodRef)) return false;
        return CallMatcher.this.methodReferenceMatches(methodRef);
      }

      @Override
      public boolean test(@Nullable PsiMethodCallExpression call) {
        if (call == null || !filter.test(call)) return false;
        return CallMatcher.this.test(call);
      }

      @Override
      public boolean methodMatches(@Nullable PsiMethod method) {
        if (method == null || !filter.test(method)) return false;
        return CallMatcher.this.methodMatches(method);
      }

      @Override
      public boolean uCallMatches(@Nullable UCallExpression call) {
        if (call == null || !filter.test(call.getSourcePsi())) return false;
        return CallMatcher.this.uCallMatches(call);
      }

      @Override
      public boolean uCallableReferenceMatches(@Nullable UCallableReferenceExpression reference) {
        if (reference == null || !filter.test(reference.getSourcePsi())) return false;
        return CallMatcher.this.uCallableReferenceMatches(reference);
      }

      @Override
      public String toString() {
        return CallMatcher.this.toString();
      }
    };
  }
@Contract(pure = true)
  default CallMatcher withContextFilter(@NotNull Predicate<? super PsiElement> filter)