Skip to content

Instantly share code, notes, and snippets.

@AyatKhraisat
Created October 17, 2018 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AyatKhraisat/08f47bf6c1cc1b59baf74ccefa669c40 to your computer and use it in GitHub Desktop.
Save AyatKhraisat/08f47bf6c1cc1b59baf74ccefa669c40 to your computer and use it in GitHub Desktop.
#if($field.modifierStatic)
static ##
#end
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
#if ($field.boolean && $field.primitive)
is##
#else
get##
#end
${name}() {
#if ($field.String)
return $field.name == null ? "" : $field.name;
#else
#if ($field.List)
return new ArrayList<>($field.name);
#else
return $field.name;
#end
#end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment