Created
May 12, 2016 13:35
-
-
Save adisesha/afe9bd99c6986a79f7bc326050679d66 to your computer and use it in GitHub Desktop.
Fluent setters and getters templates for InteliJ Idea
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
public ## | |
#if($field.modifierStatic) | |
static ## | |
#end | |
$field.type ## | |
#set($name = $StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))) | |
${name}() { | |
return $field.name; | |
} | |
#set($paramName = $helper.getParamName($field, $project)) | |
public ## | |
#if($field.modifierStatic) | |
static void ## | |
#else | |
$classname ## | |
#end | |
$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