static void checkArgumentType(@NotNull PsiExpression argument,
                                @Nullable ReflectiveType requiredType,
                                @NotNull PsiExpressionList argumentList,
                                boolean isExact,
                                boolean maybeVararg,
                                @NotNull ProblemsHolder holder) {
    if (requiredType == null) return;
    final PsiType actualType = argument.getType();
    if (actualType == null) return;
    if (!isCompatible(requiredType, actualType, isExact)) {
      if (maybeVararg) {
        ReflectiveType componentType = requiredType.getArrayComponentType();
        if (componentType != null) {
          requiredType = componentType;
          if (isCompatible(requiredType, actualType, isExact)) return;
        }
      }
      if (PsiTreeUtil.isAncestor(argumentList, argument, false)) {
        holder.registerProblem(argument,
                               JavaBundle.message(isExact
                                                         ? "inspection.reflect.handle.invocation.argument.not.exact"
                                                         : "inspection.reflection.invocation.argument.not.assignable",
                                                         requiredType.getQualifiedName()));
      }
    }
    else if (requiredType.isPrimitive()) {
      final PsiExpression definition = findDefinition(argument);
      if (definition != null && PsiTypes.nullType().equals(definition.getType())) {
        if (PsiTreeUtil.isAncestor(argumentList, argument, false)) {
          holder.registerProblem(argument,
                                 JavaBundle.message("inspection.reflect.handle.invocation.primitive.argument.null",
                                                           requiredType.getQualifiedName()));
        }
      }
    }
  }
static void checkArgumentType(@NotNull PsiExpression argument,
                                @Nullable ReflectiveType requiredType,
                                @NotNull PsiExpressionList argumentList,
                                boolean isExact,
                                boolean maybeVararg,
                                @NotNull ProblemsHolder holder)