Set<PsiMember> () { HashSet<PsiMember> result = new HashSet<>(); Collections.addAll(result, (PsiMember[])myBaseClass.getAllFields()); Collections.addAll(result, (PsiMember[])myBaseClass.getAllInnerClasses()); Collections.addAll(result, (PsiMember[])myBaseClass.getAllMethods()); //remove java.lang.Object members for (Iterator<PsiMember> iterator = result.iterator(); iterator.hasNext();) { PsiMember member = iterator.next(); if (CommonClassNames.JAVA_LANG_OBJECT.equals(member.getContainingClass().getQualifiedName())) { iterator.remove(); } } return Collections.unmodifiableSet(result); }