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

Javascript.es6.partial_model_enum_class.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{#emitJSDoc}}/**
* Enum class {{classname}}.
* @enum {{=<% %>=}}{<%datatype%>}<%={{ }}=%>
* @readonly
*/{{/emitJSDoc}}
export default class {{classname}} {
    {{#allowableValues}}{{#enumVars}}
        {{#emitJSDoc}}/**
         * value: {{{value}}}
         * @const
         */{{/emitJSDoc}}
        {{name}} = {{{value}}};

    {{/enumVars}}{{/allowableValues}}

    {{#emitJSDoc}}/**
    * Returns a {{classname}} enum value from a Javascript object name.
    * @param {Object} data The plain JavaScript object containing the name of the enum value.
    * @return {{=< >=}}{module:<#invokerPackage>/<#modelPackage>/}<={{ }}=> The enum {{classname}} value.
    */{{/emitJSDoc}}
    static constructFromObject(object) {
        return object;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy