void (@NotNull PsiMethod psiMethod, @NotNull PsiAnnotation psiAnnotation, @NotNull List<? super PsiElement> target) { final PsiClass psiClass = psiMethod.getContainingClass(); final BuilderHandler builderHandler = getHandler(); if (null != psiClass) { PsiClass builderClass = builderHandler.getExistInnerBuilderClass(psiClass, psiMethod, psiAnnotation).orElse(null); if (null == builderClass) { // have to create full class (with all methods) here, or auto-completion doesn't work builderClass = builderHandler.createBuilderClass(psiClass, psiMethod, psiAnnotation); } target.addAll( builderHandler.createBuilderDefaultProviderMethodsIfNecessary(psiClass, null, builderClass, psiAnnotation)); builderHandler.createBuilderMethodIfNecessary(psiClass, psiMethod, builderClass, psiAnnotation) .ifPresent(target::add); builderHandler.createToBuilderMethodIfNecessary(psiClass, psiMethod, builderClass, psiAnnotation) .ifPresent(target::add); } }