Idea 模板创建Builder内部类
参考:https://www.cnblogs.com/happyflyingpig/p/9071316.html
自定义模板
public static class Builder { private ${class0.name} instance = new ${class0.name}(); private Builder() {} #if ( $members.size() > 0 ) #foreach( $member in $members ) public Builder ${member.accessor}(${member.type} ${member.accessor}) { this.instance.${member.accessor} = ${member.accessor}; return this; } #end #end public ${class0.name} build() { return this.instance; } } public static Builder builder() { return new Builder(); }