com.google.javascript.jscomp.AutoValue_JSError 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.
The newest version!
package com.google.javascript.jscomp;
import com.google.javascript.rhino.Node;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_JSError extends JSError {
private final DiagnosticType type;
private final String description;
private final @Nullable String sourceName;
private final int lineno;
private final int charno;
private final @Nullable Node node;
private final CheckLevel defaultLevel;
private final @Nullable Requirement requirement;
AutoValue_JSError(
DiagnosticType type,
String description,
@Nullable String sourceName,
int lineno,
int charno,
@Nullable Node node,
CheckLevel defaultLevel,
@Nullable Requirement requirement) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
this.sourceName = sourceName;
this.lineno = lineno;
this.charno = charno;
this.node = node;
if (defaultLevel == null) {
throw new NullPointerException("Null defaultLevel");
}
this.defaultLevel = defaultLevel;
this.requirement = requirement;
}
@Override
public DiagnosticType getType() {
return type;
}
@Override
public String getDescription() {
return description;
}
@Override
public @Nullable String getSourceName() {
return sourceName;
}
@Override
public int getLineno() {
return lineno;
}
@Override
public int getCharno() {
return charno;
}
@Override
public @Nullable Node getNode() {
return node;
}
@Override
public CheckLevel getDefaultLevel() {
return defaultLevel;
}
@Override
public @Nullable Requirement getRequirement() {
return requirement;
}
@Override
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
if (o instanceof JSError) {
JSError that = (JSError) o;
return this.type.equals(that.getType())
&& this.description.equals(that.getDescription())
&& (this.sourceName == null ? that.getSourceName() == null : this.sourceName.equals(that.getSourceName()))
&& this.lineno == that.getLineno()
&& this.charno == that.getCharno()
&& (this.node == null ? that.getNode() == null : this.node.equals(that.getNode()))
&& this.defaultLevel.equals(that.getDefaultLevel())
&& (this.requirement == null ? that.getRequirement() == null : this.requirement.equals(that.getRequirement()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= description.hashCode();
h$ *= 1000003;
h$ ^= (sourceName == null) ? 0 : sourceName.hashCode();
h$ *= 1000003;
h$ ^= lineno;
h$ *= 1000003;
h$ ^= charno;
h$ *= 1000003;
h$ ^= (node == null) ? 0 : node.hashCode();
h$ *= 1000003;
h$ ^= defaultLevel.hashCode();
h$ *= 1000003;
h$ ^= (requirement == null) ? 0 : requirement.hashCode();
return h$;
}
}