PsiElementClassMember[] (PsiField[] filteredFields, PsiMethod[] filteredMethods) { PsiElementClassMember[] members = new PsiElementClassMember[filteredFields.length + filteredMethods.length]; // first add fields for (int i = 0; i < filteredFields.length; i++) { members[i] = new PsiFieldMember(filteredFields[i]); } // then add methods for (int i = 0; i < filteredMethods.length; i++) { members[filteredFields.length + i] = new PsiMethodMember(filteredMethods[i]); } return members; }