private static void checkMethodHandleInvocation(@NotNull PsiMethodCallExpression handleFactoryCall,
                                                  @NotNull PsiMethodCallExpression invokeCall,
                                                  @NotNull ProblemsHolder holder) {
    final String factoryMethodName = handleFactoryCall.getMethodExpression().getReferenceName();
    if (factoryMethodName != null && JavaLangInvokeHandleSignatureInspection.KNOWN_METHOD_NAMES.contains(factoryMethodName)) {

      final PsiExpression[] handleFactoryArguments = handleFactoryCall.getArgumentList().getExpressions();
      final boolean isFindConstructor = FIND_CONSTRUCTOR.equals(factoryMethodName);
      if (handleFactoryArguments.length == 3 && !isFindConstructor ||
          handleFactoryArguments.length == 2 && isFindConstructor ||
          handleFactoryArguments.length == 4 && FIND_SPECIAL.equals(factoryMethodName)) {

        final PsiMethod factoryMethod = handleFactoryCall.resolveMethod();
        if (factoryMethod != null && isClassWithName(factoryMethod.getContainingClass(), JAVA_LANG_INVOKE_METHOD_HANDLES_LOOKUP)) {
          final ReflectiveType receiverType = getReflectiveType(handleFactoryArguments[0]);
          final boolean isExact = INVOKE_EXACT.equals(invokeCall.getMethodExpression().getReferenceName());

          if (isFindConstructor) {
            if (!checkMethodSignature(invokeCall, handleFactoryArguments[1], isExact, true, 0, holder)) return;
            checkReturnType(invokeCall, receiverType, isExact, holder);
            return;
          }

          final PsiExpression typeExpression = handleFactoryArguments[2];
          switch (factoryMethodName) {
            case FIND_VIRTUAL, FIND_SPECIAL -> {
              if (!checkMethodSignature(invokeCall, typeExpression, isExact, false, 1, holder)) return;
              checkCallReceiver(invokeCall, receiverType, holder);
            }
            case FIND_STATIC -> checkMethodSignature(invokeCall, typeExpression, isExact, false, 0, holder);
            case FIND_GETTER -> {
              if (!checkGetter(invokeCall, typeExpression, isExact, 1, holder)) return;
              checkCallReceiver(invokeCall, receiverType, holder);
            }
            case FIND_SETTER -> {
              if (!checkSetter(invokeCall, typeExpression, isExact, 1, holder)) return;
              checkCallReceiver(invokeCall, receiverType, holder);
            }
            case FIND_STATIC_GETTER -> checkGetter(invokeCall, typeExpression, isExact, 0, holder);
            case FIND_STATIC_SETTER -> checkSetter(invokeCall, typeExpression, isExact, 0, holder);
            case FIND_VAR_HANDLE, FIND_STATIC_VAR_HANDLE -> { }
          }
        }
      }
    }
  }
private static void checkMethodHandleInvocation(@NotNull PsiMethodCallExpression handleFactoryCall,
                                                  @NotNull PsiMethodCallExpression invokeCall,
                                                  @NotNull ProblemsHolder holder)