srecode/java.srt
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 10 Dec 2022 18:34:57 +0200
changeset 1765 5cabf87dd450
parent 1205 40a4c859a994
permissions -rw-r--r--
Fixed M-x shell in Mingw Emacs, Bash "-i" is not supported in dumb Emacs terminal. bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell tput: unknown terminal "emacs"


set mode "java-mode"
set escape_start "[["
set escape_end "]]"

context my

set comment_start  "/**"
set comment_end    " */"
set comment_prefix " *"

;; :file :user :time

template empty :java
"Fill out an empty file."
----
package [[FILENAME_AS_PACKAGE]];

import java.util.*;

public class [[FILENAME_AS_CLASS]] {

    public [[FILENAME_AS_CLASS]]() {[[^]] }

}
----

template getset :indent
"Getter/Setter."
----
   private [[?TYPE]] [[?NAME]];
   /** [[^]] */
   public [[TYPE]] get[[NAME:upcase-initials]]() { return [[NAME]]; }
   /**  */
   public void set[[NAME:upcase-initials]]([[TYPE]] [[NAME]]) { this.[[NAME]] = [[NAME]]; }

----