Collection<EncapsulatableClassMember> (PsiClass s) { if (!(s instanceof GrTypeDefinition)) return Collections.emptyList(); final List<EncapsulatableClassMember> result = new ArrayList<>(); for (PsiField field : s.getFields()) { if (!(field instanceof PsiEnumConstant) && field instanceof GrField) { result.add(new GrFieldMember(field)); } } return result; }