com.google.javascript.jscomp.AutoValue_PolyfillUsageFinder_PolyfillUsage 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.Node;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PolyfillUsageFinder_PolyfillUsage extends PolyfillUsageFinder.PolyfillUsage {
private final PolyfillUsageFinder.Polyfill polyfill;
private final Node node;
private final String name;
private final boolean isExplicitGlobal;
AutoValue_PolyfillUsageFinder_PolyfillUsage(
PolyfillUsageFinder.Polyfill polyfill,
Node node,
String name,
boolean isExplicitGlobal) {
if (polyfill == null) {
throw new NullPointerException("Null polyfill");
}
this.polyfill = polyfill;
if (node == null) {
throw new NullPointerException("Null node");
}
this.node = node;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
this.isExplicitGlobal = isExplicitGlobal;
}
@Override
PolyfillUsageFinder.Polyfill polyfill() {
return polyfill;
}
@Override
Node node() {
return node;
}
@Override
String name() {
return name;
}
@Override
boolean isExplicitGlobal() {
return isExplicitGlobal;
}
@Override
public String toString() {
return "PolyfillUsage{"
+ "polyfill=" + polyfill + ", "
+ "node=" + node + ", "
+ "name=" + name + ", "
+ "isExplicitGlobal=" + isExplicitGlobal
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PolyfillUsageFinder.PolyfillUsage) {
PolyfillUsageFinder.PolyfillUsage that = (PolyfillUsageFinder.PolyfillUsage) o;
return (this.polyfill.equals(that.polyfill()))
&& (this.node.equals(that.node()))
&& (this.name.equals(that.name()))
&& (this.isExplicitGlobal == that.isExplicitGlobal());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= polyfill.hashCode();
h$ *= 1000003;
h$ ^= node.hashCode();
h$ *= 1000003;
h$ ^= name.hashCode();
h$ *= 1000003;
h$ ^= isExplicitGlobal ? 1231 : 1237;
return h$;
}
}