StructureViewTreeElement[] (PsiElement parent) { final PsiClass parentClass = (PsiClass) parent; final Stream<PsiFieldTreeElement> lombokFields = Arrays.stream(parentClass.getFields()) .filter(LombokLightFieldBuilder.class::isInstance) .map(psiField -> new PsiFieldTreeElement(psiField, false)); final Stream<PsiMethodTreeElement> lombokMethods = Arrays.stream(parentClass.getMethods()) .filter(LombokLightMethodBuilder.class::isInstance) .map(psiMethod -> new PsiMethodTreeElement(psiMethod, false)); final Stream<JavaClassTreeElement> lombokInnerClasses = Arrays.stream(parentClass.getInnerClasses()) .filter(LombokLightClassBuilder.class::isInstance) .map(psiClass -> new JavaClassTreeElement(psiClass, false)); return Stream.concat(Stream.concat(lombokFields, lombokMethods), lombokInnerClasses) .toArray(StructureViewTreeElement[]::new); }