All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.errorprone.bugpatterns.threadsafety.AutoValue_GuardedBySymbolResolver_MethodInfo Maven / Gradle / Ivy

There is a newer version: 2.27.1
Show newest version
package com.google.errorprone.bugpatterns.threadsafety;

import com.google.common.collect.ImmutableList;
import com.sun.source.tree.ExpressionTree;
import com.sun.tools.javac.code.Symbol;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_GuardedBySymbolResolver_MethodInfo extends GuardedBySymbolResolver.MethodInfo {

  private final Symbol.MethodSymbol sym;

  private final ImmutableList arguments;

  AutoValue_GuardedBySymbolResolver_MethodInfo(
      Symbol.MethodSymbol sym,
      @Nullable ImmutableList arguments) {
    if (sym == null) {
      throw new NullPointerException("Null sym");
    }
    this.sym = sym;
    this.arguments = arguments;
  }

  @Override
  Symbol.MethodSymbol sym() {
    return sym;
  }

  @Nullable
  @Override
  ImmutableList arguments() {
    return arguments;
  }

  @Override
  public String toString() {
    return "MethodInfo{"
        + "sym=" + sym + ", "
        + "arguments=" + arguments
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof GuardedBySymbolResolver.MethodInfo) {
      GuardedBySymbolResolver.MethodInfo that = (GuardedBySymbolResolver.MethodInfo) o;
      return this.sym.equals(that.sym())
          && (this.arguments == null ? that.arguments() == null : this.arguments.equals(that.arguments()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= sym.hashCode();
    h$ *= 1000003;
    h$ ^= (arguments == null) ? 0 : arguments.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy