dagger.internal.codegen.binding.AutoValue_MethodSignature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dagger-compiler Show documentation
Show all versions of dagger-compiler Show documentation
A fast dependency injector for Android and Java.
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$;
}
}