PsiMethod (@NotNull PsiClass psiClass, @NotNull Collection<MemberInfo> memberInfos, @NotNull PsiAnnotation psiAnnotation, boolean forceCallSuper) { final PsiManager psiManager = psiClass.getManager(); final String paramString = createParamString(psiClass, memberInfos, psiAnnotation, forceCallSuper); final String blockText = String.format("return \"%s(%s)\";", getSimpleClassName(psiClass), paramString); final LombokLightMethodBuilder methodBuilder = new LombokLightMethodBuilder(psiManager, TO_STRING_METHOD_NAME) .withMethodReturnType(PsiType.getJavaLangString(psiManager, GlobalSearchScope.allScope(psiClass.getProject()))) .withContainingClass(psiClass) .withNavigationElement(psiAnnotation) .withModifier(PsiModifier.PUBLIC) .withBodyText(blockText); LombokAddNullAnnotations.createRelevantNonNullAnnotation(psiClass, methodBuilder); return methodBuilder; }