Under 'Refactor' menu you can find options to 
a) Replace constructor with Builder;
b) Replace constructor with Factory
But I don't think you can generate builders directly.

-----Original Message-----
From: Mitch Claborn <mitch...@claborn.net> 
Sent: Tuesday, September 6, 2022 10:20 AM
To: users@netbeans.apache.org
Subject: Re: Generate setters that return this

Yes, I suppose Builder is the more correct term. The question is the 
same: Is there a way in NetBeans to generate those?


Mitch

On 9/6/22 11:52, Greenberg, Gary wrote:
> I think you are confusing setters with builders.
> Setters do not return anything, but builders do return this.
> Lookup design patterns.
> 
> -----Original Message-----
> From: Mitch Claborn <mitch...@claborn.net>
> Sent: Tuesday, September 6, 2022 5:49 AM
> To: users@netbeans.apache.org
> Subject: Re: Generate setters that return this
> 
> I assume from the lack of response that this is not currently possible and 
> would require development. Does anyone have an idea of how much work would be 
> required to develop this?
> 
> 
> Mitch
> 
> On 8/30/22 13:40, Mitch Claborn wrote:
>> The "Generate Getters and Setters" dialog generates setters plain Java
>> setters with return type "void". Many times I'd like the setter to
>> return "this" instead. Is there a way to have those generated
>> automatically?
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7C69aeaefe5d984239883d08da902c0e97%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637980816142573703%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=m5q3zwm8CtjXLUVTogvUPQsFIjMsEN0HLD5lTeRURy8%3D&amp;reserved=0
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7C69aeaefe5d984239883d08da902c0e97%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637980816142573703%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=m5q3zwm8CtjXLUVTogvUPQsFIjMsEN0HLD5lTeRURy8%3D&amp;reserved=0
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=05%7C01%7Cggreenbe%40visa.com%7C69aeaefe5d984239883d08da902c0e97%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C0%7C637980816142573703%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=m5q3zwm8CtjXLUVTogvUPQsFIjMsEN0HLD5lTeRURy8%3D&amp;reserved=0


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to