com.google.errorprone.bugpatterns.nullness.AutoValue_NullnessUtils_NullCheck Maven / Gradle / Ivy
package com.google.errorprone.bugpatterns.nullness;
import com.sun.tools.javac.code.Symbol;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import javax.lang.model.element.Name;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NullnessUtils_NullCheck extends NullnessUtils.NullCheck {
private final Name bareIdentifier;
private final Symbol.VarSymbol varSymbolButUsuallyPreferBareIdentifier;
private final NullnessUtils.NullCheck.Polarity polarity;
AutoValue_NullnessUtils_NullCheck(
@Nullable Name bareIdentifier,
@Nullable Symbol.VarSymbol varSymbolButUsuallyPreferBareIdentifier,
NullnessUtils.NullCheck.Polarity polarity) {
this.bareIdentifier = bareIdentifier;
this.varSymbolButUsuallyPreferBareIdentifier = varSymbolButUsuallyPreferBareIdentifier;
if (polarity == null) {
throw new NullPointerException("Null polarity");
}
this.polarity = polarity;
}
@Nullable
@Override
Name bareIdentifier() {
return bareIdentifier;
}
@Nullable
@Override
Symbol.VarSymbol varSymbolButUsuallyPreferBareIdentifier() {
return varSymbolButUsuallyPreferBareIdentifier;
}
@Override
NullnessUtils.NullCheck.Polarity polarity() {
return polarity;
}
@Override
public String toString() {
return "NullCheck{"
+ "bareIdentifier=" + bareIdentifier + ", "
+ "varSymbolButUsuallyPreferBareIdentifier=" + varSymbolButUsuallyPreferBareIdentifier + ", "
+ "polarity=" + polarity
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NullnessUtils.NullCheck) {
NullnessUtils.NullCheck that = (NullnessUtils.NullCheck) o;
return (this.bareIdentifier == null ? that.bareIdentifier() == null : this.bareIdentifier.equals(that.bareIdentifier()))
&& (this.varSymbolButUsuallyPreferBareIdentifier == null ? that.varSymbolButUsuallyPreferBareIdentifier() == null : this.varSymbolButUsuallyPreferBareIdentifier.equals(that.varSymbolButUsuallyPreferBareIdentifier()))
&& this.polarity.equals(that.polarity());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (bareIdentifier == null) ? 0 : bareIdentifier.hashCode();
h$ *= 1000003;
h$ ^= (varSymbolButUsuallyPreferBareIdentifier == null) ? 0 : varSymbolButUsuallyPreferBareIdentifier.hashCode();
h$ *= 1000003;
h$ ^= polarity.hashCode();
return h$;
}
}