String (@NotNull PsiMethod psiMethod, @NotNull PsiClass builderClass) { final PsiClass containingClass = psiMethod.getContainingClass(); StringBuilder className = new StringBuilder(); if (null != containingClass) { className.append(containingClass.getName()).append("."); if (!psiMethod.isConstructor() && !psiMethod.hasModifierProperty(PsiModifier.STATIC)) { className.append("this."); } if (builderClass.hasTypeParameters()) { className.append( Arrays.stream(builderClass.getTypeParameters()).map(PsiTypeParameter::getName).collect(Collectors.joining(",", "<", ">"))); } } return className + psiMethod.getName(); }