void (@NotNull String factoryMethodName, @NotNull PsiReferenceExpression factoryMethodExpression, PsiExpression @NotNull [] arguments, @NotNull ProblemsHolder holder) { if (arguments.length == 2) { if (FIND_CONSTRUCTOR.equals(factoryMethodName)) { final ReflectiveClass ownerClass = getReflectiveClass(arguments[0]); if (ownerClass != null) { final PsiExpression typeExpression = PsiUtil.skipParenthesizedExprDown(arguments[1]); if (typeExpression == null) return; checkConstructor(ownerClass, typeExpression, holder); } } } else if (arguments.length >= 3) { final ReflectiveClass ownerClass = getReflectiveClass(arguments[0]); if (ownerClass != null) { final PsiExpression nameExpression = PsiUtil.skipParenthesizedExprDown(arguments[1]); final PsiExpression nameDefinition = findDefinition(nameExpression); final String memberName = computeConstantExpression(nameDefinition, String.class); if (!StringUtil.isEmpty(memberName)) { final PsiExpression typeExpression = PsiUtil.skipParenthesizedExprDown(arguments[2]); if (typeExpression == null) return; switch (factoryMethodName) { case FIND_GETTER, FIND_SETTER, FIND_VAR_HANDLE -> checkField(ownerClass, memberName, nameExpression, typeExpression, false, factoryMethodExpression, holder); case FIND_STATIC_GETTER, FIND_STATIC_SETTER, FIND_STATIC_VAR_HANDLE -> checkField(ownerClass, memberName, nameExpression, typeExpression, true, factoryMethodExpression, holder); case FIND_VIRTUAL -> checkMethod(ownerClass, memberName, nameExpression, typeExpression, false, true, factoryMethodExpression, holder); case FIND_STATIC -> checkMethod(ownerClass, memberName, nameExpression, typeExpression, true, true, factoryMethodExpression, holder); case FIND_SPECIAL -> { checkMethod(ownerClass, memberName, nameExpression, typeExpression, false, false, factoryMethodExpression, holder); if (arguments.length > 3) { checkSpecial(ownerClass, arguments[3], holder); } } } } } } }