com.google.javascript.jscomp.AutoValue_TypeMismatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler Show documentation
Show all versions of closure-compiler 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.
The newest version!
package com.google.javascript.jscomp;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.jstype.JSType;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_TypeMismatch extends TypeMismatch {
private final JSType found;
private final JSType required;
private final Node location;
AutoValue_TypeMismatch(
JSType found,
JSType required,
Node location) {
if (found == null) {
throw new NullPointerException("Null found");
}
this.found = found;
if (required == null) {
throw new NullPointerException("Null required");
}
this.required = required;
if (location == null) {
throw new NullPointerException("Null location");
}
this.location = location;
}
@Override
public JSType getFound() {
return found;
}
@Override
public JSType getRequired() {
return required;
}
@Override
public Node getLocation() {
return location;
}
@Override
public String toString() {
return "TypeMismatch{"
+ "found=" + found + ", "
+ "required=" + required + ", "
+ "location=" + location
+ "}";
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof TypeMismatch) {
TypeMismatch that = (TypeMismatch) o;
return this.found.equals(that.getFound())
&& this.required.equals(that.getRequired())
&& this.location.equals(that.getLocation());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= found.hashCode();
h$ *= 1000003;
h$ ^= required.hashCode();
h$ *= 1000003;
h$ ^= location.hashCode();
return h$;
}
}