diff options
Diffstat (limited to 'etc/srecode/java.srt')
| -rw-r--r-- | etc/srecode/java.srt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/etc/srecode/java.srt b/etc/srecode/java.srt index a4a6fc2e863..e1fbb50eff6 100644 --- a/etc/srecode/java.srt +++ b/etc/srecode/java.srt | |||
| @@ -43,6 +43,23 @@ package {{FILENAME_AS_PACKAGE}}; | |||
| 43 | ---- | 43 | ---- |
| 44 | bind "e" | 44 | bind "e" |
| 45 | 45 | ||
| 46 | template empty-main :file :user :time :java :indent | ||
| 47 | "Fill out an empty file with a class having a static main method" | ||
| 48 | sectiondictionary "CLASSSECTION" | ||
| 49 | set NAME macro "FILENAME_AS_CLASS" | ||
| 50 | ---- | ||
| 51 | {{>:filecomment}} | ||
| 52 | |||
| 53 | package {{FILENAME_AS_PACKAGE}}; | ||
| 54 | |||
| 55 | {{<CLASSSECTION:declaration:class}} | ||
| 56 | public static void main(String args[]) { | ||
| 57 | {{^}} | ||
| 58 | } | ||
| 59 | {{/CLASSSECTION}} | ||
| 60 | ---- | ||
| 61 | bind "l" | ||
| 62 | |||
| 46 | context declaration | 63 | context declaration |
| 47 | 64 | ||
| 48 | template import :blank :indent | 65 | template import :blank :indent |
| @@ -74,8 +91,8 @@ Override this to affect applications, or the outer class structure for | |||
| 74 | the user-facing template." | 91 | the user-facing template." |
| 75 | ---- | 92 | ---- |
| 76 | {{>:declaration:javadoc-class}} | 93 | {{>:declaration:javadoc-class}} |
| 77 | public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}} | 94 | public class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}} |
| 78 | { | 95 | { |
| 79 | {{^}} | 96 | {{^}} |
| 80 | }; | 97 | }; |
| 81 | ---- | 98 | ---- |