Skip to content

Instantly share code, notes, and snippets.

@YuriDenison
Created April 6, 2015 19:40
Show Gist options
  • Save YuriDenison/6126a57be065a07865fe to your computer and use it in GitHub Desktop.
Save YuriDenison/6126a57be065a07865fe to your computer and use it in GitHub Desktop.
Api setter template for IDEA
#set($paramName = $helper.getParamName($field, $project))
public ##
#if($field.modifierStatic)
static ##
#end
void set$StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project)))($field.type $paramName) {
checkReadOnly();
#if (!$field.primitive)
checkIfNull($paramName);
#end
#if ($field.name == $paramName)
#if (!$field.modifierStatic)
this.##
#else
$classname.##
#end
#end
$field.name = $paramName;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment