CharArrayCreationArgument (@Nullable PsiExpressionList argList) { if (argList == null || argList.getExpressionCount() != 1) return null; final PsiExpression arg = PsiUtil.skipParenthesizedExprDown(argList.getExpressions()[0]); final PsiNewExpression newExpression = tryCast(arg, PsiNewExpression.class); if (newExpression == null) return null; final PsiArrayInitializerExpression arrayInitializer = newExpression.getArrayInitializer(); if (arrayInitializer == null || !TypeUtils.typeEquals("char[]", newExpression.getType())) return null; final PsiExpression[] initializers = arrayInitializer.getInitializers(); if (initializers.length != 1) return null; final PsiExpression initializer = initializers[0]; final PsiType type = initializer.getType(); if (!PsiTypes.charType().equals(type) && !TypeUtils.typeEquals(JAVA_LANG_CHARACTER, type)) return null; return new CharArrayCreationArgument(newExpression, arrayInitializer, initializer); }