summaryrefslogtreecommitdiff
path: root/ddl/templates/data.java.ede
blob: c85a5217f6d80baa59b4ea5b2aeb6224de3453b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// generated file, do not modify!
// {{ dateTime }}

{% for m in imports %}
import {{ m.value }};
{% endfor %}

public class {{ moduleName }} {
{% for t in dataAndType %}
{% case t.value | constType %}
{% when "DataDef" %}
  public class {{ t.value.dataName }} {
    public enum Tag { {% for c in t.value.constructors %}
      {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %}
    }
    public Tag tag;
{% for c in t.value.constructors %}{% if !(c.value.fields | empty) %}
    public class {{ c.value.name }}_ extends {{ t.value.dataName }} { {% for f in c.value.fields %}{% if c.value.fields | hasFieldNames %}
      public {{ f.value.fieldType | javaType }} {{ f.value.fieldName }};{% else %}
      public {{ f.value.fieldType | javaType }} _{{ f.index0 }};{% endif %}{% endfor %}
    }{% endif %}{% endfor %}
  }

{% endcase %}
{% endfor %}
}