Builder pattern code generation in IntelliJ

前端 未结 11 1358
猫巷女王i
猫巷女王i 2021-01-30 01:36

Is there any way to automate writing Builder patterns in IntelliJ?

For example, given this simple class:

class Film {
   private String title;
   private         


        
11条回答
  •  萌比男神i
    2021-01-30 01:53

    For those wanting to replace "too many parameters" with a builder pattern, do "extract parameter object" and then the convert constructor to builder mentioned in other answers here.

提交回复
热议问题