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

JavaJaxRS.enumOuterClass.mustache Maven / Gradle / Ivy

The newest version!
/**
 * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
 */
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
  {{#gson}}
  {{#allowableValues}}{{#enumVars}}
  @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
  {{{name}}}({{{value}}}){{^-last}},
  {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
  {{/gson}}
  {{^gson}}
  {{#allowableValues}}{{#enumVars}}
  {{{name}}}({{{value}}}){{^-last}},
  {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
  {{/gson}}

  private {{{dataType}}} value;

  {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
    this.value = value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy