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

way-auto-builder.Builder.mustache Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package {{superClass.package.name}};

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

@javax.annotation.Generated("br.com.objectos.way.auto.AutoBuilderProcessor")
abstract class {{superClass.name}}Pojo 
    implements 
    {{superClass.name}}, 
    {{#innerInterfaces}}
    {{^last}}
    {{name}},
    {{/last}}
    {{#last}}
    {{name}} { 
    {{/last}}
    {{/innerInterfaces}}

  {{#methods}}
  {{#parameters}}
  {{#parameter}}
  private {{{type.name}}} {{methodName}};
  {{/parameter}}
  {{/parameters}}
  {{/methods}}

  {{#methods}}
  @Override
  public {{{returnType.name}}} {{name}}({{#parameters}}{{#parameter}}{{{type.name}}} {{methodName}}{{/parameter}}{{/parameters}}) {  
    {{#parameters}}
    {{#parameter}}
    {{^type.primitive}}
    if ({{methodName}} == null) {
      throw new NullPointerException();
    }
    {{/type.primitive}}
    this.{{methodName}} = {{methodName}};
    {{/parameter}}
    {{/parameters}}
    return this;
  }
  
  {{/methods}}
  {{#methods}}
  {{#parameters}}
  {{#parameter}}
  {{{type.name}}} {{methodName}}() {
    return {{methodName}};
  }
  {{/parameter}}
  {{/parameters}}
  
  {{/methods}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy