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

flash.model.mustache Maven / Gradle / Ivy

package {{package}} {

{{#imports}}import {{import}};
{{/imports}}

{{#models}}
{{#model}}
    [XmlRootNode(name="{{classname}}")]
    public class {{classname}} {
        {{#vars}}
        {{#description}}/* {{description}} */
        {{/description}}
        {{#isContainer}}
        // This declaration below of _{{name}}_obj_class is to force flash compiler to include this class
        private var _{{name}}_obj_class: {{baseType}} = null;
        [XmlElementWrapper(name="{{baseName}}")]
        [XmlElements(name="{{name}}", type="{{baseType}}")]
        {{/isContainer}}
        {{^isContainer}}[XmlElement(name="{{baseName}}")]
        {{/isContainer}}
        public var {{name}}: {{{dataType}}} = {{{defaultValue}}};
    {{/vars}}

    public function toString(): String {
        var str: String = "{{classname}}: ";
        {{#vars}}
        str += " ({{name}}: " + {{name}} + ")";
        {{/vars}}
        return str;
    }

}
{{/model}}
{{/models}}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy