com.google.j2cl.junit.apt.AutoValue_TestMethod Maven / Gradle / Ivy
The newest version!
package com.google.j2cl.junit.apt;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_TestMethod extends TestMethod {
private final String javaMethodName;
private final boolean isStatic;
private final String expectedExceptionQualifiedName;
private final boolean isAsync;
private final double timeout;
private final boolean isIgnored;
private AutoValue_TestMethod(
String javaMethodName,
boolean isStatic,
@Nullable String expectedExceptionQualifiedName,
boolean isAsync,
double timeout,
boolean isIgnored) {
this.javaMethodName = javaMethodName;
this.isStatic = isStatic;
this.expectedExceptionQualifiedName = expectedExceptionQualifiedName;
this.isAsync = isAsync;
this.timeout = timeout;
this.isIgnored = isIgnored;
}
@Override
public String javaMethodName() {
return javaMethodName;
}
@Override
public boolean isStatic() {
return isStatic;
}
@Nullable
@Override
public String expectedExceptionQualifiedName() {
return expectedExceptionQualifiedName;
}
@Override
public boolean isAsync() {
return isAsync;
}
@Override
public double timeout() {
return timeout;
}
@Override
public boolean isIgnored() {
return isIgnored;
}
@Override
public String toString() {
return "TestMethod{"
+ "javaMethodName=" + javaMethodName + ", "
+ "isStatic=" + isStatic + ", "
+ "expectedExceptionQualifiedName=" + expectedExceptionQualifiedName + ", "
+ "isAsync=" + isAsync + ", "
+ "timeout=" + timeout + ", "
+ "isIgnored=" + isIgnored
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof TestMethod) {
TestMethod that = (TestMethod) o;
return (this.javaMethodName.equals(that.javaMethodName()))
&& (this.isStatic == that.isStatic())
&& ((this.expectedExceptionQualifiedName == null) ? (that.expectedExceptionQualifiedName() == null) : this.expectedExceptionQualifiedName.equals(that.expectedExceptionQualifiedName()))
&& (this.isAsync == that.isAsync())
&& (Double.doubleToLongBits(this.timeout) == Double.doubleToLongBits(that.timeout()))
&& (this.isIgnored == that.isIgnored());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= javaMethodName.hashCode();
h$ *= 1000003;
h$ ^= isStatic ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (expectedExceptionQualifiedName == null) ? 0 : expectedExceptionQualifiedName.hashCode();
h$ *= 1000003;
h$ ^= isAsync ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (int) ((Double.doubleToLongBits(timeout) >>> 32) ^ Double.doubleToLongBits(timeout));
h$ *= 1000003;
h$ ^= isIgnored ? 1231 : 1237;
return h$;
}
static final class Builder extends TestMethod.Builder {
private String javaMethodName;
private Boolean isStatic;
private String expectedExceptionQualifiedName;
private Boolean isAsync;
private Double timeout;
private Boolean isIgnored;
Builder() {
}
@Override
TestMethod.Builder javaMethodName(String javaMethodName) {
if (javaMethodName == null) {
throw new NullPointerException("Null javaMethodName");
}
this.javaMethodName = javaMethodName;
return this;
}
@Override
TestMethod.Builder isStatic(boolean isStatic) {
this.isStatic = isStatic;
return this;
}
@Override
TestMethod.Builder expectedExceptionQualifiedName(@Nullable String expectedExceptionQualifiedName) {
this.expectedExceptionQualifiedName = expectedExceptionQualifiedName;
return this;
}
@Override
TestMethod.Builder isAsync(boolean isAsync) {
this.isAsync = isAsync;
return this;
}
@Override
TestMethod.Builder timeout(double timeout) {
this.timeout = timeout;
return this;
}
@Override
TestMethod.Builder isIgnored(boolean isIgnored) {
this.isIgnored = isIgnored;
return this;
}
@Override
TestMethod build() {
String missing = "";
if (this.javaMethodName == null) {
missing += " javaMethodName";
}
if (this.isStatic == null) {
missing += " isStatic";
}
if (this.isAsync == null) {
missing += " isAsync";
}
if (this.timeout == null) {
missing += " timeout";
}
if (this.isIgnored == null) {
missing += " isIgnored";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_TestMethod(
this.javaMethodName,
this.isStatic,
this.expectedExceptionQualifiedName,
this.isAsync,
this.timeout,
this.isIgnored);
}
}
}