@Nullable
  static List<? extends MethodContract> getContracts(@NotNull PsiExpression anchor) {
    List<? extends MethodContract> contracts;
    if (anchor instanceof PsiCallExpression call) {
      contracts = JavaMethodContractUtil.getMethodCallContracts(call);
    }
    else if (anchor instanceof PsiMethodReferenceExpression methodRef && methodRef.resolve() instanceof PsiMethod method) {
      contracts = JavaMethodContractUtil.getMethodContracts(method);
    }
    else {
      return null;
    }
    return contracts;
  }
@Nullable
  static List<? extends MethodContract> getContracts(@NotNull PsiExpression anchor)