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

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

The newest version!


package com.google.j2cl.junit.apt;

import com.google.common.collect.ImmutableList;
import java.util.Optional;
import javax.annotation.processing.Generated;

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

  private final String packageName;
  private final String simpleName;
  private final String qualifiedName;
  private final TestConstructor testConstructor;
  private final ImmutableList testMethods;
  private final ImmutableList beforeMethods;
  private final ImmutableList afterMethods;
  private final ImmutableList beforeClassMethods;
  private final ImmutableList afterClassMethods;
  private final ImmutableList beforeParamMethods;
  private final ImmutableList afterParamMethods;
  private final boolean isJUnit3;
  private final Optional parameterizedDataMethod;
  private final ImmutableList parameterizedFields;

  private AutoValue_TestClass(
      String packageName,
      String simpleName,
      String qualifiedName,
      TestConstructor testConstructor,
      ImmutableList testMethods,
      ImmutableList beforeMethods,
      ImmutableList afterMethods,
      ImmutableList beforeClassMethods,
      ImmutableList afterClassMethods,
      ImmutableList beforeParamMethods,
      ImmutableList afterParamMethods,
      boolean isJUnit3,
      Optional parameterizedDataMethod,
      ImmutableList parameterizedFields) {
    this.packageName = packageName;
    this.simpleName = simpleName;
    this.qualifiedName = qualifiedName;
    this.testConstructor = testConstructor;
    this.testMethods = testMethods;
    this.beforeMethods = beforeMethods;
    this.afterMethods = afterMethods;
    this.beforeClassMethods = beforeClassMethods;
    this.afterClassMethods = afterClassMethods;
    this.beforeParamMethods = beforeParamMethods;
    this.afterParamMethods = afterParamMethods;
    this.isJUnit3 = isJUnit3;
    this.parameterizedDataMethod = parameterizedDataMethod;
    this.parameterizedFields = parameterizedFields;
  }

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

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

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

  @Override
  public TestConstructor testConstructor() {
    return testConstructor;
  }

  @Override
  public ImmutableList testMethods() {
    return testMethods;
  }

  @Override
  public ImmutableList beforeMethods() {
    return beforeMethods;
  }

  @Override
  public ImmutableList afterMethods() {
    return afterMethods;
  }

  @Override
  public ImmutableList beforeClassMethods() {
    return beforeClassMethods;
  }

  @Override
  public ImmutableList afterClassMethods() {
    return afterClassMethods;
  }

  @Override
  public ImmutableList beforeParamMethods() {
    return beforeParamMethods;
  }

  @Override
  public ImmutableList afterParamMethods() {
    return afterParamMethods;
  }

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

  @Override
  public Optional parameterizedDataMethod() {
    return parameterizedDataMethod;
  }

  @Override
  public ImmutableList parameterizedFields() {
    return parameterizedFields;
  }

  @Override
  public String toString() {
    return "TestClass{"
         + "packageName=" + packageName + ", "
         + "simpleName=" + simpleName + ", "
         + "qualifiedName=" + qualifiedName + ", "
         + "testConstructor=" + testConstructor + ", "
         + "testMethods=" + testMethods + ", "
         + "beforeMethods=" + beforeMethods + ", "
         + "afterMethods=" + afterMethods + ", "
         + "beforeClassMethods=" + beforeClassMethods + ", "
         + "afterClassMethods=" + afterClassMethods + ", "
         + "beforeParamMethods=" + beforeParamMethods + ", "
         + "afterParamMethods=" + afterParamMethods + ", "
         + "isJUnit3=" + isJUnit3 + ", "
         + "parameterizedDataMethod=" + parameterizedDataMethod + ", "
         + "parameterizedFields=" + parameterizedFields
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TestClass) {
      TestClass that = (TestClass) o;
      return (this.packageName.equals(that.packageName()))
           && (this.simpleName.equals(that.simpleName()))
           && (this.qualifiedName.equals(that.qualifiedName()))
           && (this.testConstructor.equals(that.testConstructor()))
           && (this.testMethods.equals(that.testMethods()))
           && (this.beforeMethods.equals(that.beforeMethods()))
           && (this.afterMethods.equals(that.afterMethods()))
           && (this.beforeClassMethods.equals(that.beforeClassMethods()))
           && (this.afterClassMethods.equals(that.afterClassMethods()))
           && (this.beforeParamMethods.equals(that.beforeParamMethods()))
           && (this.afterParamMethods.equals(that.afterParamMethods()))
           && (this.isJUnit3 == that.isJUnit3())
           && (this.parameterizedDataMethod.equals(that.parameterizedDataMethod()))
           && (this.parameterizedFields.equals(that.parameterizedFields()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= packageName.hashCode();
    h$ *= 1000003;
    h$ ^= simpleName.hashCode();
    h$ *= 1000003;
    h$ ^= qualifiedName.hashCode();
    h$ *= 1000003;
    h$ ^= testConstructor.hashCode();
    h$ *= 1000003;
    h$ ^= testMethods.hashCode();
    h$ *= 1000003;
    h$ ^= beforeMethods.hashCode();
    h$ *= 1000003;
    h$ ^= afterMethods.hashCode();
    h$ *= 1000003;
    h$ ^= beforeClassMethods.hashCode();
    h$ *= 1000003;
    h$ ^= afterClassMethods.hashCode();
    h$ *= 1000003;
    h$ ^= beforeParamMethods.hashCode();
    h$ *= 1000003;
    h$ ^= afterParamMethods.hashCode();
    h$ *= 1000003;
    h$ ^= isJUnit3 ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= parameterizedDataMethod.hashCode();
    h$ *= 1000003;
    h$ ^= parameterizedFields.hashCode();
    return h$;
  }

  static final class Builder extends TestClass.Builder {
    private String packageName;
    private String simpleName;
    private String qualifiedName;
    private TestConstructor testConstructor;
    private ImmutableList testMethods;
    private ImmutableList beforeMethods;
    private ImmutableList afterMethods;
    private ImmutableList beforeClassMethods;
    private ImmutableList afterClassMethods;
    private ImmutableList beforeParamMethods;
    private ImmutableList afterParamMethods;
    private Boolean isJUnit3;
    private Optional parameterizedDataMethod = Optional.empty();
    private ImmutableList parameterizedFields;
    Builder() {
    }
    @Override
    TestClass.Builder packageName(String packageName) {
      if (packageName == null) {
        throw new NullPointerException("Null packageName");
      }
      this.packageName = packageName;
      return this;
    }
    @Override
    TestClass.Builder simpleName(String simpleName) {
      if (simpleName == null) {
        throw new NullPointerException("Null simpleName");
      }
      this.simpleName = simpleName;
      return this;
    }
    @Override
    TestClass.Builder qualifiedName(String qualifiedName) {
      if (qualifiedName == null) {
        throw new NullPointerException("Null qualifiedName");
      }
      this.qualifiedName = qualifiedName;
      return this;
    }
    @Override
    TestClass.Builder testConstructor(TestConstructor testConstructor) {
      if (testConstructor == null) {
        throw new NullPointerException("Null testConstructor");
      }
      this.testConstructor = testConstructor;
      return this;
    }
    @Override
    TestClass.Builder testMethods(ImmutableList testMethods) {
      if (testMethods == null) {
        throw new NullPointerException("Null testMethods");
      }
      this.testMethods = testMethods;
      return this;
    }
    @Override
    TestClass.Builder beforeMethods(ImmutableList beforeMethods) {
      if (beforeMethods == null) {
        throw new NullPointerException("Null beforeMethods");
      }
      this.beforeMethods = beforeMethods;
      return this;
    }
    @Override
    TestClass.Builder afterMethods(ImmutableList afterMethods) {
      if (afterMethods == null) {
        throw new NullPointerException("Null afterMethods");
      }
      this.afterMethods = afterMethods;
      return this;
    }
    @Override
    TestClass.Builder beforeClassMethods(ImmutableList beforeClassMethods) {
      if (beforeClassMethods == null) {
        throw new NullPointerException("Null beforeClassMethods");
      }
      this.beforeClassMethods = beforeClassMethods;
      return this;
    }
    @Override
    TestClass.Builder afterClassMethods(ImmutableList afterClassMethods) {
      if (afterClassMethods == null) {
        throw new NullPointerException("Null afterClassMethods");
      }
      this.afterClassMethods = afterClassMethods;
      return this;
    }
    @Override
    TestClass.Builder beforeParamMethods(ImmutableList beforeParamMethods) {
      if (beforeParamMethods == null) {
        throw new NullPointerException("Null beforeParamMethods");
      }
      this.beforeParamMethods = beforeParamMethods;
      return this;
    }
    @Override
    TestClass.Builder afterParamMethods(ImmutableList afterParamMethods) {
      if (afterParamMethods == null) {
        throw new NullPointerException("Null afterParamMethods");
      }
      this.afterParamMethods = afterParamMethods;
      return this;
    }
    @Override
    TestClass.Builder isJUnit3(boolean isJUnit3) {
      this.isJUnit3 = isJUnit3;
      return this;
    }
    @Override
    TestClass.Builder parameterizedDataMethod(Optional parameterizedDataMethod) {
      if (parameterizedDataMethod == null) {
        throw new NullPointerException("Null parameterizedDataMethod");
      }
      this.parameterizedDataMethod = parameterizedDataMethod;
      return this;
    }
    @Override
    TestClass.Builder parameterizedFields(ImmutableList parameterizedFields) {
      if (parameterizedFields == null) {
        throw new NullPointerException("Null parameterizedFields");
      }
      this.parameterizedFields = parameterizedFields;
      return this;
    }
    @Override
    TestClass autoBuild() {
      String missing = "";
      if (this.packageName == null) {
        missing += " packageName";
      }
      if (this.simpleName == null) {
        missing += " simpleName";
      }
      if (this.qualifiedName == null) {
        missing += " qualifiedName";
      }
      if (this.testConstructor == null) {
        missing += " testConstructor";
      }
      if (this.testMethods == null) {
        missing += " testMethods";
      }
      if (this.beforeMethods == null) {
        missing += " beforeMethods";
      }
      if (this.afterMethods == null) {
        missing += " afterMethods";
      }
      if (this.beforeClassMethods == null) {
        missing += " beforeClassMethods";
      }
      if (this.afterClassMethods == null) {
        missing += " afterClassMethods";
      }
      if (this.beforeParamMethods == null) {
        missing += " beforeParamMethods";
      }
      if (this.afterParamMethods == null) {
        missing += " afterParamMethods";
      }
      if (this.isJUnit3 == null) {
        missing += " isJUnit3";
      }
      if (this.parameterizedFields == null) {
        missing += " parameterizedFields";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_TestClass(
          this.packageName,
          this.simpleName,
          this.qualifiedName,
          this.testConstructor,
          this.testMethods,
          this.beforeMethods,
          this.afterMethods,
          this.beforeClassMethods,
          this.afterClassMethods,
          this.beforeParamMethods,
          this.afterParamMethods,
          this.isJUnit3,
          this.parameterizedDataMethod,
          this.parameterizedFields);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy