summaryrefslogtreecommitdiff
path: root/ddl/templates/data.java.ede
blob: 2aec6287eecbe70c4c432ff40145aa2a6ec37afc (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
27
// generated file, do not modify!
// {{ dateTime }}

package {{ moduleName }};

import java.util.ArrayList;
import java.util.HashMap;

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

{% case def | constType %}
{% when "DataDef" %}
public class {{ def.dataName }} {
  public enum Tag { {% for c in def.constructors %}
    {{ c.value.name }}{% if !c.last %},{% endif %}{% endfor %}
  }
  public Tag tag;
{% for c in def.constructors %}{% if !(c.value.fields | empty) %}
  public class {{ c.value.name }}_ extends {{ def.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 %}