Created
August 31, 2016 17:33
-
-
Save tao-qian/8742281e75cdcb8512849350d8386f3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{#model}} | |
public static class Builder { | |
{{#vars}} | |
private {{{datatypeWithEnum}}} {{name}}; | |
{{/vars}} | |
{{#vars}} | |
public Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { | |
this.{{name}} = {{name}}; | |
return this; | |
} | |
{{/vars}} | |
public {{classname}} build() { | |
{{classname}} temp = new {{classname}}(); | |
{{#vars}} | |
temp.{{name}} = this.{{name}}; | |
{{/vars}} | |
return temp; | |
} | |
} | |
{{/model}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment