summaryrefslogtreecommitdiff
path: root/ddl/templates/data.java.ede
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2016-03-20 22:44:29 +0100
committerCsaba Hruska <csaba.hruska@gmail.com>2016-03-21 14:12:02 +0100
commitc5e063b3c9aeff65161e24445e9672daff980b45 (patch)
treef469f6e8eb1a24060b01453f3f23db5c72a4850c /ddl/templates/data.java.ede
parent3b50722f433ec5ecc515ea1441fd633d85118cb9 (diff)
working c# backend
Diffstat (limited to 'ddl/templates/data.java.ede')
-rw-r--r--ddl/templates/data.java.ede33
1 files changed, 17 insertions, 16 deletions
diff --git a/ddl/templates/data.java.ede b/ddl/templates/data.java.ede
index c85a521..2aec628 100644
--- a/ddl/templates/data.java.ede
+++ b/ddl/templates/data.java.ede
@@ -1,26 +1,27 @@
1// generated file, do not modify! 1// generated file, do not modify!
2// {{ dateTime }} 2// {{ dateTime }}
3 3
4package {{ moduleName }};
5
6import java.util.ArrayList;
7import java.util.HashMap;
8
4{% for m in imports %} 9{% for m in imports %}
5import {{ m.value }}; 10import {{ m.value }}.*;
6{% endfor %} 11{% endfor %}
7 12
8public class {{ moduleName }} { 13{% case def | constType %}
9{% for t in dataAndType %}
10{% case t.value | constType %}
11{% when "DataDef" %} 14{% when "DataDef" %}
12 public class {{ t.value.dataName }} { 15public class {{ def.dataName }} {
13 public enum Tag { {% for c in t.value.constructors %} 16 public enum Tag { {% for c in def.constructors %}
14 {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %} 17 {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %}
15 }
16 public Tag tag;
17{% for c in t.value.constructors %}{% if !(c.value.fields | empty) %}
18 public class {{ c.value.name }}_ extends {{ t.value.dataName }} { {% for f in c.value.fields %}{% if c.value.fields | hasFieldNames %}
19 public {{ f.value.fieldType | javaType }} {{ f.value.fieldName }};{% else %}
20 public {{ f.value.fieldType | javaType }} _{{ f.index0 }};{% endif %}{% endfor %}
21 }{% endif %}{% endfor %}
22 } 18 }
19 public Tag tag;
20{% for c in def.constructors %}{% if !(c.value.fields | empty) %}
21 public class {{ c.value.name }}_ extends {{ def.dataName }} { {% for f in c.value.fields %}{% if c.value.fields | hasFieldNames %}
22 public {{ f.value.fieldType | javaType }} {{ f.value.fieldName }};{% else %}
23 public {{ f.value.fieldType | javaType }} _{{ f.index0 }};{% endif %}{% endfor %}
24 }{% endif %}{% endfor %}
25}
23 26
24{% endcase %} 27{% endcase %}
25{% endfor %}
26} \ No newline at end of file