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

com.google.j2cl.junit.apt.AutoValue_ParameterizedDataMethod Maven / Gradle / Ivy

The newest version!


package com.google.j2cl.junit.apt;

import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_ParameterizedDataMethod extends ParameterizedDataMethod {

  private final String javaMethodName;
  private final boolean isStatic;
  private final String parameterizedNameTemplate;

  private AutoValue_ParameterizedDataMethod(
      String javaMethodName,
      boolean isStatic,
      String parameterizedNameTemplate) {
    this.javaMethodName = javaMethodName;
    this.isStatic = isStatic;
    this.parameterizedNameTemplate = parameterizedNameTemplate;
  }

  @Override
  public String javaMethodName() {
    return javaMethodName;
  }

  @Override
  public boolean isStatic() {
    return isStatic;
  }

  @Override
  public String parameterizedNameTemplate() {
    return parameterizedNameTemplate;
  }

  @Override
  public String toString() {
    return "ParameterizedDataMethod{"
         + "javaMethodName=" + javaMethodName + ", "
         + "isStatic=" + isStatic + ", "
         + "parameterizedNameTemplate=" + parameterizedNameTemplate
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ParameterizedDataMethod) {
      ParameterizedDataMethod that = (ParameterizedDataMethod) o;
      return (this.javaMethodName.equals(that.javaMethodName()))
           && (this.isStatic == that.isStatic())
           && (this.parameterizedNameTemplate.equals(that.parameterizedNameTemplate()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= javaMethodName.hashCode();
    h$ *= 1000003;
    h$ ^= isStatic ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= parameterizedNameTemplate.hashCode();
    return h$;
  }

  static final class Builder extends ParameterizedDataMethod.Builder {
    private String javaMethodName;
    private Boolean isStatic;
    private String parameterizedNameTemplate;
    Builder() {
    }
    @Override
    ParameterizedDataMethod.Builder javaMethodName(String javaMethodName) {
      if (javaMethodName == null) {
        throw new NullPointerException("Null javaMethodName");
      }
      this.javaMethodName = javaMethodName;
      return this;
    }
    @Override
    ParameterizedDataMethod.Builder isStatic(boolean isStatic) {
      this.isStatic = isStatic;
      return this;
    }
    @Override
    ParameterizedDataMethod.Builder parameterizedNameTemplate(String parameterizedNameTemplate) {
      if (parameterizedNameTemplate == null) {
        throw new NullPointerException("Null parameterizedNameTemplate");
      }
      this.parameterizedNameTemplate = parameterizedNameTemplate;
      return this;
    }
    @Override
    ParameterizedDataMethod build() {
      String missing = "";
      if (this.javaMethodName == null) {
        missing += " javaMethodName";
      }
      if (this.isStatic == null) {
        missing += " isStatic";
      }
      if (this.parameterizedNameTemplate == null) {
        missing += " parameterizedNameTemplate";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ParameterizedDataMethod(
          this.javaMethodName,
          this.isStatic,
          this.parameterizedNameTemplate);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy