Builder pattern code generation in IntelliJ

前端 未结 11 1240
猫巷女王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条回答
  •  一整个雨季
    2021-01-30 02:00

    Generate constructor of the class by right clicking on class Generate>Constructor. Then, on Windows, press is Ctrl+Shift+A to find action and type "builder", select "Replace constructor with builder.."

提交回复
热议问题