Skip to content

Instantly share code, notes, and snippets.

@coverdh
Last active November 8, 2016 10:12
Show Gist options
  • Save coverdh/1e9b18e99fac84f057358eb9535e108c to your computer and use it in GitHub Desktop.
Save coverdh/1e9b18e99fac84f057358eb9535e108c to your computer and use it in GitHub Desktop.
getter & setter
windows Alt + insert
mac commond + N
right at prop
open getter/setter
click right button of setter ...
#set($paramName = $helper.getParamName($field, $project))
#if($field.modifierStatic)
static ##
#end
$classname set$StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))($field.type $paramName) {
#if ($field.name == $paramName)
#if (!$field.modifierStatic)
this.##
#else
$classname.##
#end
#end
$field.name = $paramName;
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment