Skip to content

Instantly share code, notes, and snippets.

@preethamhegdes
Last active August 5, 2017 04:51
Show Gist options
  • Save preethamhegdes/b4c726381810fc97741aef4451afa7d8 to your computer and use it in GitHub Desktop.
Save preethamhegdes/b4c726381810fc97741aef4451afa7d8 to your computer and use it in GitHub Desktop.
Method chaining template for IntelliJ IDEA - POJO setter method
#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;
  #if (!$field.modifierStatic)
    return this;
  #end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment