dagger.internal.codegen.binding.AutoValue_ComponentDescriptor_ComponentMethodDescriptor 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.
package dagger.internal.codegen.binding;
import androidx.room.compiler.processing.XMethodElement;
import dagger.internal.codegen.model.DependencyRequest;
import java.util.Optional;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ComponentDescriptor_ComponentMethodDescriptor extends ComponentDescriptor.ComponentMethodDescriptor {
private final XMethodElement methodElement;
private final Optional dependencyRequest;
private final Optional subcomponent;
private AutoValue_ComponentDescriptor_ComponentMethodDescriptor(
XMethodElement methodElement,
Optional dependencyRequest,
Optional subcomponent) {
this.methodElement = methodElement;
this.dependencyRequest = dependencyRequest;
this.subcomponent = subcomponent;
}
@Override
public XMethodElement methodElement() {
return methodElement;
}
@Override
public Optional dependencyRequest() {
return dependencyRequest;
}
@Override
public Optional subcomponent() {
return subcomponent;
}
@Override
public String toString() {
return "ComponentMethodDescriptor{"
+ "methodElement=" + methodElement + ", "
+ "dependencyRequest=" + dependencyRequest + ", "
+ "subcomponent=" + subcomponent
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ComponentDescriptor.ComponentMethodDescriptor) {
ComponentDescriptor.ComponentMethodDescriptor that = (ComponentDescriptor.ComponentMethodDescriptor) o;
return this.methodElement.equals(that.methodElement())
&& this.dependencyRequest.equals(that.dependencyRequest())
&& this.subcomponent.equals(that.subcomponent());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= methodElement.hashCode();
h$ *= 1000003;
h$ ^= dependencyRequest.hashCode();
h$ *= 1000003;
h$ ^= subcomponent.hashCode();
return h$;
}
static final class Builder implements ComponentDescriptor.ComponentMethodDescriptor.Builder {
private XMethodElement methodElement;
private Optional dependencyRequest = Optional.empty();
private Optional subcomponent = Optional.empty();
Builder() {
}
@Override
public ComponentDescriptor.ComponentMethodDescriptor.Builder methodElement(XMethodElement methodElement) {
if (methodElement == null) {
throw new NullPointerException("Null methodElement");
}
this.methodElement = methodElement;
return this;
}
@Override
public ComponentDescriptor.ComponentMethodDescriptor.Builder dependencyRequest(DependencyRequest dependencyRequest) {
this.dependencyRequest = Optional.of(dependencyRequest);
return this;
}
@Override
public ComponentDescriptor.ComponentMethodDescriptor.Builder subcomponent(ComponentDescriptor subcomponent) {
this.subcomponent = Optional.of(subcomponent);
return this;
}
@Override
public ComponentDescriptor.ComponentMethodDescriptor build() {
if (this.methodElement == null) {
String missing = " methodElement";
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ComponentDescriptor_ComponentMethodDescriptor(
this.methodElement,
this.dependencyRequest,
this.subcomponent);
}
}
}