boolean (@NotNull PsiSwitchBlock psiSwitchBlock, ProcessingContext context) { PsiExpression expression = psiSwitchBlock.getExpression(); if (expression == null) return false; PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(expression.getType()); return aClass != null && aClass.isEnum(); }