LightMethodBuilder (@NotNull PsiClass builderClass, @NotNull String name, @NotNull PsiType type, @NotNull PsiAnnotation annotation, @NotNull PsiElement navigationElement, @NotNull TransformationContext context) { final LightMethodBuilder fieldSetter = new LightMethodBuilder(builderClass.getManager(), getFieldMethodName(annotation, name)); fieldSetter.addModifier(PsiModifier.PUBLIC); fieldSetter.addParameter(name, type); fieldSetter.setContainingClass(builderClass); fieldSetter.setMethodReturnType(context.eraseClassType(JavaPsiFacade.getElementFactory(builderClass.getProject()).createType(builderClass, PsiSubstitutor.EMPTY))); fieldSetter.setNavigationElement(navigationElement); fieldSetter.setOriginInfo(ORIGIN_INFO); return fieldSetter; }