updated fields
This commit is contained in:
parent
ded0fba8a7
commit
b1764bf5cf
|
|
@ -13,5 +13,6 @@ import org.joda.time.DateTime //TODO update
|
|||
*/
|
||||
{%- endif %}
|
||||
open class {% include 'blocks/class/classtype.twig' with { type: type } %} (
|
||||
{%- include 'blocks/class/constructor-fields.twig' with { fields: fields, superclassesFields: superclassesFields } %}
|
||||
{%- include 'blocks/class/constructor-fields-info.twig' with { fields: superclassesFields, includeVal: false, addCommaAtTheEnd: (fields is not empty) } %}
|
||||
{%- include 'blocks/class/constructor-fields-info.twig' with { fields: fields, includeVal: true, addComma: false } %}
|
||||
) : {% include 'blocks/class/supertype.twig' with { type: type, parent: parent } %} ({%- include 'blocks/class/fields-super-initialization.twig' with { fields: superclassesFields } -%})
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
{%- import '../../utils.twig' as utils -%}
|
||||
|
||||
{%- if includeVal %} val {% endif %} {{ field.name }}: {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }} {{ utils.writeNullCheckAnnotation(field.type.type.baseTypeName, field.nullable, field.optional) }}
|
||||
{%- for field in fields %}
|
||||
{%- if includeVal %}
|
||||
val
|
||||
{%- else %}
|
||||
{% endif %} {{ field.name }}: {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }} {{ utils.writeNullCheckAnnotation(field.type.type.baseTypeName, field.nullable, field.optional) }} {%- if (not (loop.last)) or (addCommaAtTheEnd)%}, {% endif %}
|
||||
{%- endfor -%}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{%- import '../../utils.twig' as utils -%}
|
||||
|
||||
{%- for field in superclassesFields %}
|
||||
{{ field.name }}{{ utils.writeNullCheckAnnotation(field.type.type.baseTypeName, field.nullable, field.optional) }} {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }} {%- if (not (loop.last)) or (fields is not empty)%}, {% endif %}
|
||||
{%- endfor -%}
|
||||
{%- for field in fields %}
|
||||
{{ utils.writeNullCheckAnnotation(field.type.type.baseTypeName, field.nullable, field.optional) }} val {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }} {{ field.name }} {%- if not (loop.last) %}, {% endif %}
|
||||
{%- endfor -%}
|
||||
Loading…
Reference in New Issue