srecode/java.srt
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 16 Jun 2021 12:50:08 +0300
changeset 1734 ae2c6a001464
parent 1205 40a4c859a994
permissions -rw-r--r--
Add some standard places to PATH if they are not set by login script. Rearrange the order of paths so system's are first, user's are last. For Cygwin this helps with Cygwin's paths to be situated before "C:/Windows" (Emacs is not started from a login shell on Windows!).


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]]; }

----