boolean (@Nullable PsiExpression argument, @Nullable PsiExpression qualifier) { if (qualifier == null) return false; PsiNewExpression newExpression = ObjectUtils.tryCast(PsiUtil.skipParenthesizedExprDown(argument), PsiNewExpression.class); if (newExpression == null) return false; PsiExpression[] dimensions = newExpression.getArrayDimensions(); if (dimensions.length != 1) return false; return CollectionUtils.isCollectionOrMapSize(dimensions[0], qualifier); }