boolean (@NotNull StubElement<?> stub) { PsiModifierListStub type = stub.findChildStubByType(JavaStubElementTypes.MODIFIER_LIST); if (type == null) { return false; } int mask = type.getModifiersMask(); if (ModifierFlags.hasModifierProperty(PsiModifier.PRIVATE, mask)) { return false; } if (ModifierFlags.hasModifierProperty(PsiModifier.STATIC, mask)) { return true; } return stub instanceof PsiFieldStub && stub.getStubType() == JavaElementType.ENUM_CONSTANT || stub.getParentStub() instanceof PsiClassStub && ((PsiClassStub<?>)stub.getParentStub()).isInterface(); }