LombokLightClassBuilder (@NotNull PsiClass psiClass, @NotNull PsiTypeParameterListOwner psiTypeParameterListOwner, final boolean isStatic, @NotNull PsiAnnotation psiAnnotation) { PsiMethod psiMethod = null; if (psiTypeParameterListOwner instanceof PsiMethod) { psiMethod = (PsiMethod)psiTypeParameterListOwner; } final String builderClassName = getBuilderClassName(psiClass, psiAnnotation, psiMethod); final String builderClassQualifiedName = psiClass.getQualifiedName() + "." + builderClassName; final LombokLightClassBuilder classBuilder = new LombokLightClassBuilder(psiClass, builderClassName, builderClassQualifiedName) .withContainingClass(psiClass) .withNavigationElement(psiAnnotation) .withParameterTypes((null != psiMethod && psiMethod.isConstructor()) ? psiClass.getTypeParameterList() : psiTypeParameterListOwner.getTypeParameterList()) .withModifier(getBuilderOuterAccessVisibility(psiAnnotation)); if (isStatic) { classBuilder.withModifier(PsiModifier.STATIC); } return classBuilder; }