Skip to content

Instantly share code, notes, and snippets.

@mttchpmn
Created February 25, 2021 20:06
Show Gist options
  • Save mttchpmn/c4b77b409a15d01642dfb35ade536af8 to your computer and use it in GitHub Desktop.
Save mttchpmn/c4b77b409a15d01642dfb35ade536af8 to your computer and use it in GitHub Desktop.
Java Snippets
{
"Getter and setter for Java class fields": {
"prefix": "getset",
"body": [
"public void set${1:field}(${2:type} value) {",
" this.${1/(.*)/${1:/downcase}/} = value;",
"}",
"public ${2} get${1}() {",
" return this.${1/(.*)/${1:/downcase}/};",
"}"
],
"description": "Getter and setter for Java class fields"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment