boolean (PsiVariable variable) { final PsiType type = variable.getType(); final PsiType componentType = type.getDeepComponentType(); if (!(componentType instanceof PsiClassType classType)) { return false; } final PsiType[] parameterTypes = classType.getParameters(); for (PsiType parameterType : parameterTypes) { if (parameterType != null) { return true; } } return false; }