private static boolean isFinalLibraryClassOrPrimitives(PsiMethodCallExpression expression) {
      final PsiExpressionList argumentList = expression.getArgumentList();
      if (argumentList.getExpressionCount() < 1) return false;
      PsiType type = argumentList.getExpressions()[0].getType();
      if (type == null) return false;

      if (TypeConversionUtil.isPrimitiveAndNotNull(type)) return true;
      if (type instanceof PsiArrayType) return true;
      PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(type);
      if (aClass == null) return false;
      if (!aClass.hasModifierProperty(PsiModifier.FINAL)) return false;
      return LibraryUtil.classIsInLibrary(aClass);
    }
private static boolean isFinalLibraryClassOrPrimitives(PsiMethodCallExpression expression)