dagger.android.processor.AutoValue_AndroidInjectorDescriptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dagger-android-processor Show documentation
Show all versions of dagger-android-processor Show documentation
A fast dependency injector for Android and Java.
package dagger.android.processor;
import androidx.room.compiler.processing.XExecutableElement;
import com.google.common.collect.ImmutableSet;
import com.squareup.javapoet.AnnotationSpec;
import com.squareup.javapoet.ClassName;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_AndroidInjectorDescriptor extends AndroidInjectorDescriptor {
private final ClassName injectedType;
private final ImmutableSet scopes;
private final ImmutableSet modules;
private final ClassName enclosingModule;
private final XExecutableElement method;
private AutoValue_AndroidInjectorDescriptor(
ClassName injectedType,
ImmutableSet scopes,
ImmutableSet modules,
ClassName enclosingModule,
XExecutableElement method) {
this.injectedType = injectedType;
this.scopes = scopes;
this.modules = modules;
this.enclosingModule = enclosingModule;
this.method = method;
}
@Override
ClassName injectedType() {
return injectedType;
}
@Override
ImmutableSet scopes() {
return scopes;
}
@Override
ImmutableSet modules() {
return modules;
}
@Override
ClassName enclosingModule() {
return enclosingModule;
}
@Override
XExecutableElement method() {
return method;
}
@Override
public String toString() {
return "AndroidInjectorDescriptor{"
+ "injectedType=" + injectedType + ", "
+ "scopes=" + scopes + ", "
+ "modules=" + modules + ", "
+ "enclosingModule=" + enclosingModule + ", "
+ "method=" + method
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AndroidInjectorDescriptor) {
AndroidInjectorDescriptor that = (AndroidInjectorDescriptor) o;
return this.injectedType.equals(that.injectedType())
&& this.scopes.equals(that.scopes())
&& this.modules.equals(that.modules())
&& this.enclosingModule.equals(that.enclosingModule())
&& this.method.equals(that.method());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= injectedType.hashCode();
h$ *= 1000003;
h$ ^= scopes.hashCode();
h$ *= 1000003;
h$ ^= modules.hashCode();
h$ *= 1000003;
h$ ^= enclosingModule.hashCode();
h$ *= 1000003;
h$ ^= method.hashCode();
return h$;
}
static final class Builder extends AndroidInjectorDescriptor.Builder {
private ClassName injectedType;
private ImmutableSet.Builder scopesBuilder$;
private ImmutableSet scopes;
private ImmutableSet.Builder modulesBuilder$;
private ImmutableSet modules;
private ClassName enclosingModule;
private XExecutableElement method;
Builder() {
}
@Override
AndroidInjectorDescriptor.Builder injectedType(ClassName injectedType) {
if (injectedType == null) {
throw new NullPointerException("Null injectedType");
}
this.injectedType = injectedType;
return this;
}
@Override
ImmutableSet.Builder scopesBuilder() {
if (scopesBuilder$ == null) {
scopesBuilder$ = ImmutableSet.builder();
}
return scopesBuilder$;
}
@Override
ImmutableSet.Builder modulesBuilder() {
if (modulesBuilder$ == null) {
modulesBuilder$ = ImmutableSet.builder();
}
return modulesBuilder$;
}
@Override
AndroidInjectorDescriptor.Builder enclosingModule(ClassName enclosingModule) {
if (enclosingModule == null) {
throw new NullPointerException("Null enclosingModule");
}
this.enclosingModule = enclosingModule;
return this;
}
@Override
AndroidInjectorDescriptor.Builder method(XExecutableElement method) {
if (method == null) {
throw new NullPointerException("Null method");
}
this.method = method;
return this;
}
@Override
AndroidInjectorDescriptor build() {
if (scopesBuilder$ != null) {
this.scopes = scopesBuilder$.build();
} else if (this.scopes == null) {
this.scopes = ImmutableSet.of();
}
if (modulesBuilder$ != null) {
this.modules = modulesBuilder$.build();
} else if (this.modules == null) {
this.modules = ImmutableSet.of();
}
if (this.injectedType == null
|| this.enclosingModule == null
|| this.method == null) {
StringBuilder missing = new StringBuilder();
if (this.injectedType == null) {
missing.append(" injectedType");
}
if (this.enclosingModule == null) {
missing.append(" enclosingModule");
}
if (this.method == null) {
missing.append(" method");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_AndroidInjectorDescriptor(
this.injectedType,
this.scopes,
this.modules,
this.enclosingModule,
this.method);
}
}
}