boolean (PsiClass clazz, @Nullable ClassKind classKind, boolean instantiatable, boolean concrete, boolean notInterface, boolean notEnum) { if (classKind == ClassKind.ANNOTATION) return clazz.isAnnotationType(); if (classKind == ClassKind.ENUM) return clazz.isEnum(); if (instantiatable) { if (PsiUtil.isInstantiatable(clazz)) { return true; } } else if (concrete) { if (!clazz.hasModifierProperty(PsiModifier.ABSTRACT) && !clazz.isInterface()) { return true; } } else if (notInterface) { if (!clazz.isInterface()) { return true; } } else if (notEnum) { if (!clazz.isEnum()) { return true; } } else { return true; } return false; }