All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dart-jaguar.class.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
part '{{classFilename}}.jser.dart';

class {{classname}} {
  {{#vars}}{{#description}} /* {{{description}}} */{{/description}}
  final {{{datatype}}} {{name}};
  {{#allowableValues}}{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{{/allowableValues}}{{/vars}}

  {{classname}}(
    {{#vars}}{{^defaultValue}}{{#required}} this.{{name}}, {{/required}}{{/defaultValue}}{{/vars}}

{{#vendorExtensions}}{{#hasVars}}{
    {{#vars}}{{^required}} this.{{name}}{{#defaultValue}} = {{{defaultValue}}}{{#hasMore}}, {{/hasMore}} {{/defaultValue}}{{/required}}
    {{#required}} {{#defaultValue}}this.{{name}} = {{{defaultValue}}}{{#hasMore}}, {{/hasMore}} {{/defaultValue}}{{/required}}{{/vars}}
    }{{/hasVars}}{{/vendorExtensions}}
  );

  @override
  String toString() {
    return '{{classname}}[{{#vars}}{{name}}=${{name}}, {{/vars}}]';
  }
}

@GenSerializer()
class {{classname}}Serializer extends Serializer<{{classname}}> with _${{classname}}Serializer {

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy