com.google.javascript.jscomp.AutoValue_CodingConvention_AssertionFunctionSpec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
package com.google.javascript.jscomp;
import com.google.javascript.rhino.ClosurePrimitive;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CodingConvention_AssertionFunctionSpec extends CodingConvention.AssertionFunctionSpec {
private final @Nullable String functionName;
private final @Nullable ClosurePrimitive closurePrimitive;
private final CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind;
private final int paramIndex;
private AutoValue_CodingConvention_AssertionFunctionSpec(
@Nullable String functionName,
@Nullable ClosurePrimitive closurePrimitive,
CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind,
int paramIndex) {
this.functionName = functionName;
this.closurePrimitive = closurePrimitive;
this.assertionKind = assertionKind;
this.paramIndex = paramIndex;
}
@Override
@Nullable String getFunctionName() {
return functionName;
}
@Override
@Nullable ClosurePrimitive getClosurePrimitive() {
return closurePrimitive;
}
@Override
CodingConvention.AssertionFunctionSpec.AssertionKind getAssertionKind() {
return assertionKind;
}
@Override
int getParamIndex() {
return paramIndex;
}
@Override
public String toString() {
return "AssertionFunctionSpec{"
+ "functionName=" + functionName + ", "
+ "closurePrimitive=" + closurePrimitive + ", "
+ "assertionKind=" + assertionKind + ", "
+ "paramIndex=" + paramIndex
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CodingConvention.AssertionFunctionSpec) {
CodingConvention.AssertionFunctionSpec that = (CodingConvention.AssertionFunctionSpec) o;
return ((this.functionName == null) ? (that.getFunctionName() == null) : this.functionName.equals(that.getFunctionName()))
&& ((this.closurePrimitive == null) ? (that.getClosurePrimitive() == null) : this.closurePrimitive.equals(that.getClosurePrimitive()))
&& (this.assertionKind.equals(that.getAssertionKind()))
&& (this.paramIndex == that.getParamIndex());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (functionName == null) ? 0 : functionName.hashCode();
h$ *= 1000003;
h$ ^= (closurePrimitive == null) ? 0 : closurePrimitive.hashCode();
h$ *= 1000003;
h$ ^= assertionKind.hashCode();
h$ *= 1000003;
h$ ^= paramIndex;
return h$;
}
static final class Builder extends CodingConvention.AssertionFunctionSpec.Builder {
private @Nullable String functionName;
private @Nullable ClosurePrimitive closurePrimitive;
private CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind;
private Integer paramIndex;
Builder() {
}
@Override
public CodingConvention.AssertionFunctionSpec.Builder setFunctionName(String functionName) {
this.functionName = functionName;
return this;
}
@Override
CodingConvention.AssertionFunctionSpec.Builder setClosurePrimitive(ClosurePrimitive closurePrimitive) {
this.closurePrimitive = closurePrimitive;
return this;
}
@Override
CodingConvention.AssertionFunctionSpec.Builder setAssertionKind(CodingConvention.AssertionFunctionSpec.AssertionKind assertionKind) {
if (assertionKind == null) {
throw new NullPointerException("Null assertionKind");
}
this.assertionKind = assertionKind;
return this;
}
@Override
public CodingConvention.AssertionFunctionSpec.Builder setParamIndex(int paramIndex) {
this.paramIndex = paramIndex;
return this;
}
@Override
CodingConvention.AssertionFunctionSpec autoBuild() {
String missing = "";
if (this.assertionKind == null) {
missing += " assertionKind";
}
if (this.paramIndex == null) {
missing += " paramIndex";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CodingConvention_AssertionFunctionSpec(
this.functionName,
this.closurePrimitive,
this.assertionKind,
this.paramIndex);
}
}
}