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

dagger.internal.codegen.binding.AutoValue_MethodSignature Maven / Gradle / Ivy

The newest version!
package dagger.internal.codegen.binding;

import com.google.common.collect.ImmutableList;
import com.squareup.javapoet.TypeName;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_MethodSignature extends MethodSignature {

  private final String name;

  private final ImmutableList parameterTypes;

  private final ImmutableList thrownTypes;

  AutoValue_MethodSignature(
      String name,
      ImmutableList parameterTypes,
      ImmutableList thrownTypes) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (parameterTypes == null) {
      throw new NullPointerException("Null parameterTypes");
    }
    this.parameterTypes = parameterTypes;
    if (thrownTypes == null) {
      throw new NullPointerException("Null thrownTypes");
    }
    this.thrownTypes = thrownTypes;
  }

  @Override
  String name() {
    return name;
  }

  @Override
  ImmutableList parameterTypes() {
    return parameterTypes;
  }

  @Override
  ImmutableList thrownTypes() {
    return thrownTypes;
  }

  @Override
  public String toString() {
    return "MethodSignature{"
        + "name=" + name + ", "
        + "parameterTypes=" + parameterTypes + ", "
        + "thrownTypes=" + thrownTypes
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MethodSignature) {
      MethodSignature that = (MethodSignature) o;
      return this.name.equals(that.name())
          && this.parameterTypes.equals(that.parameterTypes())
          && this.thrownTypes.equals(that.thrownTypes());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= name.hashCode();
    h$ *= 1000003;
    h$ ^= parameterTypes.hashCode();
    h$ *= 1000003;
    h$ ^= thrownTypes.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy