com.google.javascript.jscomp.lint.AutoValue_CheckRequiresSorted_ImportStatement 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.lint;
import com.google.common.collect.ImmutableList;
import com.google.javascript.rhino.Node;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CheckRequiresSorted_ImportStatement extends CheckRequiresSorted.ImportStatement {
private final ImmutableList nodes;
private final CheckRequiresSorted.ImportPrimitive primitive;
private final String namespace;
private final String alias;
private final ImmutableList destructures;
AutoValue_CheckRequiresSorted_ImportStatement(
ImmutableList nodes,
CheckRequiresSorted.ImportPrimitive primitive,
String namespace,
@Nullable String alias,
@Nullable ImmutableList destructures) {
if (nodes == null) {
throw new NullPointerException("Null nodes");
}
this.nodes = nodes;
if (primitive == null) {
throw new NullPointerException("Null primitive");
}
this.primitive = primitive;
if (namespace == null) {
throw new NullPointerException("Null namespace");
}
this.namespace = namespace;
this.alias = alias;
this.destructures = destructures;
}
@Override
ImmutableList nodes() {
return nodes;
}
@Override
CheckRequiresSorted.ImportPrimitive primitive() {
return primitive;
}
@Override
String namespace() {
return namespace;
}
@Nullable
@Override
String alias() {
return alias;
}
@Nullable
@Override
ImmutableList destructures() {
return destructures;
}
@Override
public String toString() {
return "ImportStatement{"
+ "nodes=" + nodes + ", "
+ "primitive=" + primitive + ", "
+ "namespace=" + namespace + ", "
+ "alias=" + alias + ", "
+ "destructures=" + destructures
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CheckRequiresSorted.ImportStatement) {
CheckRequiresSorted.ImportStatement that = (CheckRequiresSorted.ImportStatement) o;
return (this.nodes.equals(that.nodes()))
&& (this.primitive.equals(that.primitive()))
&& (this.namespace.equals(that.namespace()))
&& ((this.alias == null) ? (that.alias() == null) : this.alias.equals(that.alias()))
&& ((this.destructures == null) ? (that.destructures() == null) : this.destructures.equals(that.destructures()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= nodes.hashCode();
h$ *= 1000003;
h$ ^= primitive.hashCode();
h$ *= 1000003;
h$ ^= namespace.hashCode();
h$ *= 1000003;
h$ ^= (alias == null) ? 0 : alias.hashCode();
h$ *= 1000003;
h$ ^= (destructures == null) ? 0 : destructures.hashCode();
return h$;
}
}