From d1a1b9107bf54f6f8ae512513a2c458a778500c9 Mon Sep 17 00:00:00 2001 From: Eric Chang Date: Sat, 16 Nov 2024 14:37:25 -0800 Subject: [PATCH] Support requesting Jakarta Provider types. PiperOrigin-RevId: 697229233 --- .../internal/codegen/base/FrameworkTypes.java | 17 +- .../dagger/internal/codegen/base/MapType.java | 21 +- .../internal/codegen/base/RequestKinds.java | 9 +- .../binding/ComponentDeclarations.java | 13 +- .../internal/codegen/binding/KeyFactory.java | 11 +- .../internal/codegen/binding/SourceFiles.java | 8 + .../internal/codegen/javapoet/TypeNames.java | 1 - .../codegen/writing/FactoryGenerator.java | 84 +------ .../writing/MembersInjectorGenerator.java | 34 +-- .../writing/ProducerFactoryGenerator.java | 39 +-- javatests/dagger/functional/jakarta/BUILD | 13 - .../jakarta/JakartaProviderTest.java | 228 ------------------ .../codegen/ModuleFactoryGeneratorTest.java | 6 - ...edParamNames_DEFAULT_MODE_test.Foo_Factory | 7 +- ...ParamNames_FAST_INIT_MODE_test.Foo_Factory | 7 +- ...meCollision_test.InjectConstructor_Factory | 8 +- ..._boundedGenerics_test.GenericClass_Factory | 9 +- ...ndMethodGenerics_test.GenericClass_Factory | 8 +- ...embersInjection_test.AllInjections_Factory | 8 +- ...orOnGenericClass_test.GenericClass_Factory | 7 +- ...Constructor_test.InjectConstructor_Factory | 7 +- ...lifiersAndLazies_test.GenericClass_Factory | 20 +- ...meCollision_test.InjectConstructor_Factory | 8 +- ...meCollision_test.InjectConstructor_Factory | 9 +- ...lassQualifierMetadata_test.FooBase_Factory | 8 +- ...ifierMetadata_test.FooBase_MembersInjector | 8 +- ...aseClassQualifierMetadata_test.Foo_Factory | 9 +- ...QualifierMetadata_test.Foo_MembersInjector | 8 +- ...QualifierMetadata_test.SomeBinding_Factory | 9 +- ...rMetadata_test.SomeBinding_MembersInjector | 8 +- ...QualifierMetadata_test.SomeBinding_Factory | 8 +- ...rMetadata_test.SomeBinding_MembersInjector | 8 +- ..._twoGenericTypes_test.GenericClass_Factory | 8 +- ...dDependency_test.InjectConstructor_Factory | 7 +- ...LT_MODE_other.Inaccessible_MembersInjector | 8 +- ...IT_MODE_other.Inaccessible_MembersInjector | 8 +- ...AULT_MODE_test.OuterType_B_MembersInjector | 7 +- ...INIT_MODE_test.OuterType_B_MembersInjector | 7 +- ...ULT_MODE_test.GenericClass_MembersInjector | 8 +- ...NIT_MODE_test.GenericClass_MembersInjector | 8 +- ...er_DEFAULT_MODE_test.Child_MembersInjector | 8 +- ..._FAST_INIT_MODE_test.Child_MembersInjector | 8 +- ...ieldInjectionWithQualifier_MembersInjector | 8 +- ...ieldInjectionWithQualifier_MembersInjector | 8 +- ...T_MODE_test.FieldInjection_MembersInjector | 12 +- ...T_MODE_test.FieldInjection_MembersInjector | 12 +- ...LT_MODE_test.AllInjections_MembersInjector | 8 +- ...IT_MODE_test.AllInjections_MembersInjector | 8 +- ...ive_DEFAULT_MODE_test.InjectedType_Factory | 8 +- ...ULT_MODE_test.InjectedType_MembersInjector | 9 +- ...e_FAST_INIT_MODE_test.InjectedType_Factory | 8 +- ...NIT_MODE_test.InjectedType_MembersInjector | 9 +- ..._DEFAULT_MODE_test.MyClass_MembersInjector | 10 +- ...AST_INIT_MODE_test.MyClass_MembersInjector | 10 +- ..._MODE_test.MethodInjection_MembersInjector | 12 +- ..._MODE_test.MethodInjection_MembersInjector | 12 +- ...ection_DEFAULT_MODE_test.A_MembersInjector | 8 +- ...ection_DEFAULT_MODE_test.C_MembersInjector | 7 +- ...tion_FAST_INIT_MODE_test.A_MembersInjector | 8 +- ...tion_FAST_INIT_MODE_test.C_MembersInjector | 7 +- ..._test.MixedMemberInjection_MembersInjector | 9 +- ..._test.MixedMemberInjection_MembersInjector | 9 +- ...T_MODE_test.FieldInjection_MembersInjector | 9 +- ...T_MODE_test.FieldInjection_MembersInjector | 9 +- ...AULT_MODE_test.OuterType_B_MembersInjector | 7 +- ...INIT_MODE_test.OuterType_B_MembersInjector | 7 +- ...rs_DEFAULT_MODE_test.Child_MembersInjector | 9 +- ..._FAST_INIT_MODE_test.Child_MembersInjector | 9 +- ...ection_DEFAULT_MODE_test.B_MembersInjector | 7 +- ...tion_FAST_INIT_MODE_test.B_MembersInjector | 7 +- ...ection_DEFAULT_MODE_test.A_MembersInjector | 7 +- ...ection_DEFAULT_MODE_test.B_MembersInjector | 7 +- ...tion_FAST_INIT_MODE_test.A_MembersInjector | 7 +- ...tion_FAST_INIT_MODE_test.B_MembersInjector | 7 +- ...T_MODE_test.FieldInjection_MembersInjector | 9 +- ...T_MODE_test.FieldInjection_MembersInjector | 9 +- ...e_test.ParentModule_ProvideBElementFactory | 8 +- ...ule_test.ParentModule_ProvideBEntryFactory | 8 +- ...dule_test.ParentModule_ProvideListBFactory | 8 +- ...hods_test.TestModule_ProvideObjectsFactory | 9 +- ...odule_ProvideNonGenericTypeWithDepsFactory | 8 +- ...rovides_test.MyModule_ProvideStringFactory | 7 +- ...rName_test.TestModule_ProduceStringFactory | 9 +- ...uture_test.TestModule_ProduceStringFactory | 9 +- 84 files changed, 128 insertions(+), 955 deletions(-) delete mode 100644 javatests/dagger/functional/jakarta/JakartaProviderTest.java diff --git a/java/dagger/internal/codegen/base/FrameworkTypes.java b/java/dagger/internal/codegen/base/FrameworkTypes.java index e607f766461..2a56e1d8bba 100644 --- a/java/dagger/internal/codegen/base/FrameworkTypes.java +++ b/java/dagger/internal/codegen/base/FrameworkTypes.java @@ -16,6 +16,7 @@ package dagger.internal.codegen.base; +import static dagger.internal.codegen.extension.DaggerStreams.toImmutableSet; import static dagger.internal.codegen.xprocessing.XTypes.isTypeOf; import androidx.room.compiler.processing.XType; @@ -31,11 +32,7 @@ public final class FrameworkTypes { // TODO(erichang): Add the Jakarta Provider here private static final ImmutableSet PROVISION_TYPES = - ImmutableSet.of( - TypeNames.PROVIDER, - TypeNames.JAKARTA_PROVIDER, - TypeNames.LAZY, - TypeNames.MEMBERS_INJECTOR); + ImmutableSet.of(TypeNames.PROVIDER, TypeNames.LAZY, TypeNames.MEMBERS_INJECTOR); // NOTE(beder): ListenableFuture is not considered a producer framework type because it is not // defined by the framework, so we can't treat it specially in ordinary Dagger. @@ -45,15 +42,13 @@ public final class FrameworkTypes { private static final ImmutableSet ALL_FRAMEWORK_TYPES = ImmutableSet.builder().addAll(PROVISION_TYPES).addAll(PRODUCTION_TYPES).build(); - public static final ImmutableSet SET_VALUE_FRAMEWORK_TYPES = + private static final ImmutableSet SET_VALUE_FRAMEWORK_TYPES = ImmutableSet.of(TypeNames.PRODUCED); public static final ImmutableSet MAP_VALUE_FRAMEWORK_TYPES = - ImmutableSet.of( - TypeNames.PRODUCED, - TypeNames.PRODUCER, - TypeNames.PROVIDER, - TypeNames.JAKARTA_PROVIDER); + MapType.VALID_FRAMEWORK_REQUEST_KINDS.stream() + .map(RequestKinds::frameworkClassName) + .collect(toImmutableSet()); /** Returns true if the type represents a producer-related framework type. */ public static boolean isProducerType(XType type) { diff --git a/java/dagger/internal/codegen/base/MapType.java b/java/dagger/internal/codegen/base/MapType.java index ba4b1e79274..f9c6304084a 100644 --- a/java/dagger/internal/codegen/base/MapType.java +++ b/java/dagger/internal/codegen/base/MapType.java @@ -35,10 +35,8 @@ @AutoValue public abstract class MapType { // TODO(b/28555349): support PROVIDER_OF_LAZY here too - // TODO(b/376124787): We could consolidate this with a similar list in FrameworkTypes - // if we had a better way to go from RequestKind to framework ClassName or vice versa /** The valid framework request kinds allowed on a multibinding map value. */ - private static final ImmutableSet VALID_FRAMEWORK_REQUEST_KINDS = + public static final ImmutableSet VALID_FRAMEWORK_REQUEST_KINDS = ImmutableSet.of(RequestKind.PROVIDER, RequestKind.PRODUCER, RequestKind.PRODUCED); private XType type; @@ -109,19 +107,12 @@ public XType unwrappedFrameworkValueType() { */ public RequestKind valueRequestKind() { checkArgument(!isRawType()); - RequestKind requestKind = RequestKinds.getRequestKind(valueType()); - if (VALID_FRAMEWORK_REQUEST_KINDS.contains(requestKind)) { - return requestKind; - } else if (requestKind == RequestKind.PROVIDER_OF_LAZY) { - // This is kind of a weird case. We don't support Map>, so we also don't support - // Map>> directly. However, if the user bound that themselves, we don't - // want that to get confused as a normal instance request, so return PROVIDER here. - return RequestKind.PROVIDER; - } else { - // Not all RequestKinds are supported, so if there's a map value that matches an unsupported - // RequestKind, just treat it like it is a normal instance request. - return RequestKind.INSTANCE; + for (RequestKind frameworkRequestKind : VALID_FRAMEWORK_REQUEST_KINDS) { + if (valuesAreTypeOf(RequestKinds.frameworkClassName(frameworkRequestKind))) { + return frameworkRequestKind; + } } + return RequestKind.INSTANCE; } /** {@code true} if {@code type} is a {@link java.util.Map} type. */ diff --git a/java/dagger/internal/codegen/base/RequestKinds.java b/java/dagger/internal/codegen/base/RequestKinds.java index fdf1c2020ed..4fb39186b95 100644 --- a/java/dagger/internal/codegen/base/RequestKinds.java +++ b/java/dagger/internal/codegen/base/RequestKinds.java @@ -97,8 +97,6 @@ public static TypeName requestTypeName(RequestKind requestKind, TypeName keyType private static final ImmutableMap FRAMEWORK_CLASSES = ImmutableMap.of( - // Default to the javax Provider since that is what is used for the binding graph - // representation. PROVIDER, TypeNames.PROVIDER, LAZY, TypeNames.LAZY, PRODUCER, TypeNames.PRODUCER, @@ -113,15 +111,10 @@ public static RequestKind getRequestKind(XType type) { return RequestKind.INSTANCE; } - if ((isTypeOf(type, TypeNames.PROVIDER) || isTypeOf(type, TypeNames.JAKARTA_PROVIDER)) - && isTypeOf(unwrapType(type), TypeNames.LAZY)) { + if (isTypeOf(type, TypeNames.PROVIDER) && isTypeOf(unwrapType(type), TypeNames.LAZY)) { return RequestKind.PROVIDER_OF_LAZY; } - if (isTypeOf(type, TypeNames.JAKARTA_PROVIDER)) { - return RequestKind.PROVIDER; - } - return FRAMEWORK_CLASSES.keySet().stream() .filter(kind -> isTypeOf(type, FRAMEWORK_CLASSES.get(kind))) .collect(toOptional()) diff --git a/java/dagger/internal/codegen/binding/ComponentDeclarations.java b/java/dagger/internal/codegen/binding/ComponentDeclarations.java index ac2ebd4939f..401dcf3031f 100644 --- a/java/dagger/internal/codegen/binding/ComponentDeclarations.java +++ b/java/dagger/internal/codegen/binding/ComponentDeclarations.java @@ -25,12 +25,10 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.Multimaps; -import com.squareup.javapoet.ClassName; import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.WildcardTypeName; import dagger.internal.codegen.base.DaggerSuperficialValidation; -import dagger.internal.codegen.base.FrameworkTypes; import dagger.internal.codegen.javapoet.TypeNames; import dagger.internal.codegen.model.DaggerAnnotation; import dagger.internal.codegen.model.Key; @@ -40,6 +38,11 @@ /** Stores the bindings and declarations of a component by key. */ final class ComponentDeclarations { + private static final ImmutableSet MAP_FRAMEWORK_TYPENAMES = + ImmutableSet.of(TypeNames.PROVIDER, TypeNames.PRODUCER, TypeNames.PRODUCED); + private static final ImmutableSet SET_FRAMEWORK_TYPENAMES = + ImmutableSet.of(TypeNames.PRODUCED); + private final KeyFactory keyFactory; private final ImmutableSetMultimap bindings; private final ImmutableSetMultimap delegates; @@ -317,14 +320,14 @@ private static TypeName unwrapMultibindingTypeName(TypeName typeName) { return ParameterizedTypeName.get( mapTypeName.rawType, mapKeyTypeName, - unwrapFrameworkTypeName(mapValueTypeName, FrameworkTypes.MAP_VALUE_FRAMEWORK_TYPES)); + unwrapFrameworkTypeName(mapValueTypeName, MAP_FRAMEWORK_TYPENAMES)); } if (isValidSetMultibindingTypeName(typeName)) { ParameterizedTypeName setTypeName = (ParameterizedTypeName) typeName; TypeName setValueTypeName = getOnlyElement(setTypeName.typeArguments); return ParameterizedTypeName.get( setTypeName.rawType, - unwrapFrameworkTypeName(setValueTypeName, FrameworkTypes.SET_VALUE_FRAMEWORK_TYPES)); + unwrapFrameworkTypeName(setValueTypeName, SET_FRAMEWORK_TYPENAMES)); } return typeName; } @@ -351,7 +354,7 @@ private static boolean isValidSetMultibindingTypeName(TypeName typeName) { } private static TypeName unwrapFrameworkTypeName( - TypeName typeName, ImmutableSet frameworkTypeNames) { + TypeName typeName, ImmutableSet frameworkTypeNames) { if (typeName instanceof ParameterizedTypeName) { ParameterizedTypeName parameterizedTypeName = (ParameterizedTypeName) typeName; if (frameworkTypeNames.contains(parameterizedTypeName.rawType)) { diff --git a/java/dagger/internal/codegen/binding/KeyFactory.java b/java/dagger/internal/codegen/binding/KeyFactory.java index 693382e4908..e03814899bb 100644 --- a/java/dagger/internal/codegen/binding/KeyFactory.java +++ b/java/dagger/internal/codegen/binding/KeyFactory.java @@ -38,7 +38,6 @@ import dagger.Binds; import dagger.BindsOptionalOf; import dagger.internal.codegen.base.ContributionType; -import dagger.internal.codegen.base.FrameworkTypes; import dagger.internal.codegen.base.MapType; import dagger.internal.codegen.base.OptionalType; import dagger.internal.codegen.base.RequestKinds; @@ -98,7 +97,10 @@ private XType optionalOf(XType type) { /** Returns {@code Map>}. */ private XType mapOfFrameworkType(XType keyType, ClassName frameworkClassName, XType valueType) { - checkArgument(FrameworkTypes.MAP_VALUE_FRAMEWORK_TYPES.contains(frameworkClassName)); + checkArgument( + MapType.VALID_FRAMEWORK_REQUEST_KINDS.stream() + .map(RequestKinds::frameworkClassName) + .anyMatch(frameworkClassName::equals)); return mapOf( keyType, processingEnv.getDeclaredType( @@ -315,7 +317,10 @@ public Key unwrapMapValueType(Key key) { * type. */ private Key wrapMapValue(Key key, ClassName frameworkClassName) { - checkArgument(FrameworkTypes.MAP_VALUE_FRAMEWORK_TYPES.contains(frameworkClassName)); + checkArgument( + MapType.VALID_FRAMEWORK_REQUEST_KINDS.stream() + .map(RequestKinds::frameworkClassName) + .anyMatch(frameworkClassName::equals)); if (MapType.isMap(key)) { MapType mapType = MapType.from(key); if (!mapType.isRawType() && !mapType.valuesAreTypeOf(frameworkClassName)) { diff --git a/java/dagger/internal/codegen/binding/SourceFiles.java b/java/dagger/internal/codegen/binding/SourceFiles.java index ff17ab27881..350051522f4 100644 --- a/java/dagger/internal/codegen/binding/SourceFiles.java +++ b/java/dagger/internal/codegen/binding/SourceFiles.java @@ -95,6 +95,14 @@ public final class SourceFiles { dependency -> { ClassName frameworkClassName = frameworkTypeMapper.getFrameworkType(dependency.kind()).frameworkClassName(); + // Remap factory fields back to javax.inject.Provider to maintain backwards compatibility + // for now. In a future release, we should change this to Dagger Provider. This will still + // be a breaking change, but keeping compatibility for a while should reduce the + // likelihood of breakages as it would require components built at much older versions + // using factories built at newer versions to break. + if (frameworkClassName.equals(TypeNames.DAGGER_PROVIDER)) { + frameworkClassName = TypeNames.PROVIDER; + } return FrameworkField.create( ParameterizedTypeName.get( frameworkClassName, diff --git a/java/dagger/internal/codegen/javapoet/TypeNames.java b/java/dagger/internal/codegen/javapoet/TypeNames.java index 52e8928c6cf..930ec141828 100644 --- a/java/dagger/internal/codegen/javapoet/TypeNames.java +++ b/java/dagger/internal/codegen/javapoet/TypeNames.java @@ -88,7 +88,6 @@ public final class TypeNames { public static final ClassName MEMBERS_INJECTORS = ClassName.get("dagger.internal", "MembersInjectors"); public static final ClassName PROVIDER = ClassName.get("javax.inject", "Provider"); - public static final ClassName JAKARTA_PROVIDER = ClassName.get("jakarta.inject", "Provider"); public static final ClassName DAGGER_PROVIDER = ClassName.get("dagger.internal", "Provider"); public static final ClassName DAGGER_PROVIDERS = ClassName.get("dagger.internal", "Providers"); public static final ClassName PROVIDER_OF_LAZY = diff --git a/java/dagger/internal/codegen/writing/FactoryGenerator.java b/java/dagger/internal/codegen/writing/FactoryGenerator.java index c60cdf30594..7fee1b394b6 100644 --- a/java/dagger/internal/codegen/writing/FactoryGenerator.java +++ b/java/dagger/internal/codegen/writing/FactoryGenerator.java @@ -31,7 +31,6 @@ import static dagger.internal.codegen.javapoet.AnnotationSpecs.Suppression.RAWTYPES; import static dagger.internal.codegen.javapoet.AnnotationSpecs.Suppression.UNCHECKED; import static dagger.internal.codegen.javapoet.AnnotationSpecs.suppressWarnings; -import static dagger.internal.codegen.javapoet.CodeBlocks.makeParametersCodeBlock; import static dagger.internal.codegen.javapoet.CodeBlocks.parameterNames; import static dagger.internal.codegen.javapoet.TypeNames.factoryOf; import static dagger.internal.codegen.model.BindingKind.INJECTION; @@ -49,14 +48,12 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; import com.squareup.javapoet.AnnotationSpec; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.ParameterSpec; -import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeSpec; import dagger.internal.codegen.base.SourceFileGenerator; @@ -76,7 +73,6 @@ import dagger.internal.codegen.model.Scope; import dagger.internal.codegen.writing.InjectionMethods.InjectionSiteMethod; import dagger.internal.codegen.writing.InjectionMethods.ProvisionMethod; -import java.util.List; import java.util.Optional; import java.util.stream.Stream; import javax.inject.Inject; @@ -139,7 +135,7 @@ private TypeSpec.Builder factoryBuilder(ContributionBinding binding) { return factoryBuilder .addMethod(getMethod(binding, factoryFields)) - .addMethods(staticCreateMethod(binding, factoryFields)) + .addMethod(staticCreateMethod(binding, factoryFields)) .addMethod(staticProvisionMethod(binding)); } @@ -197,12 +193,10 @@ private MethodSpec constructorMethod(FactoryFields factoryFields) { // Provider bazProvider) { // return new FooModule_ProvidesFooFactory(module, barProvider, bazProvider); // } - private ImmutableList staticCreateMethod( - ContributionBinding binding, FactoryFields factoryFields) { + private MethodSpec staticCreateMethod(ContributionBinding binding, FactoryFields factoryFields) { // We use a static create method so that generated components can avoid having to refer to the // generic types of the factory. (Otherwise they may have visibility problems referring to the // types.) - ImmutableList.Builder methodsBuilder = ImmutableList.builder(); MethodSpec.Builder createMethodBuilder = methodBuilder("create") .addModifiers(PUBLIC, STATIC) @@ -225,32 +219,8 @@ private ImmutableList staticCreateMethod( "return new $T($L)", parameterizedGeneratedTypeNameForBinding(binding), parameterNames(parameters)); - // If any of the parameters take a Dagger Provider type, we also need to make a - // Javax Provider type for backwards compatibility with components generated at - // an older version. - // Eventually, we will need to remove this and break backwards compatibility - // in order to fully cut the Javax dependency. - if (hasDaggerProviderParams(parameters)) { - methodsBuilder.add(javaxCreateMethod(binding, parameters)); - } } - methodsBuilder.add(createMethodBuilder.build()); - return methodsBuilder.build(); - } - - private MethodSpec javaxCreateMethod( - ContributionBinding binding, ImmutableList parameters) { - ImmutableList remappedParams = remapParamsToJavaxProvider(parameters); - return methodBuilder("create") - .addModifiers(PUBLIC, STATIC) - .returns(parameterizedGeneratedTypeNameForBinding(binding)) - .addTypeVariables(bindingTypeElementTypeVariableNames(binding)) - .addParameters(remappedParams) - .addStatement( - "return new $T($L)", - parameterizedGeneratedTypeNameForBinding(binding), - wrappedParametersCodeBlock(remappedParams)) - .build(); + return createMethodBuilder.build(); } // Example 1: Provision binding. @@ -409,54 +379,6 @@ private static Optional factoryTypeName(ContributionBinding binding) { : Optional.of(factoryOf(providedTypeName(binding))); } - // Open for sharing with ProducerFactoryGenerator and MembersInjectorGenerator - static boolean hasDaggerProviderParams(List params) { - return params.stream().anyMatch(param -> isDaggerProviderType(param.type)); - } - - // Open for sharing with ProducerFactoryGenerator and MembersInjectorGenerator - // Returns a code block that represents a parameter list where any javax Provider - // types are wrapped in an asDaggerProvider call - static CodeBlock wrappedParametersCodeBlock(List params) { - return makeParametersCodeBlock( - Lists.transform( - params, - input -> - isProviderType(input.type) - ? CodeBlock.of( - "$T.asDaggerProvider($N)", TypeNames.DAGGER_PROVIDERS, input) - : CodeBlock.of("$N", input))); - } - - // Open for sharing with ProducerFactoryGenerator and MembersInjectorGenerator - static ImmutableList remapParamsToJavaxProvider(List params) { - return params.stream() - .map(param -> ParameterSpec.builder( - remapDaggerProviderToProvider(param.type), param.name).build()) - .collect(toImmutableList()); - } - - private static boolean isDaggerProviderType(TypeName type) { - return type instanceof ParameterizedTypeName - && ((ParameterizedTypeName) type).rawType.equals(TypeNames.DAGGER_PROVIDER); - } - - private static boolean isProviderType(TypeName type) { - return type instanceof ParameterizedTypeName - && ((ParameterizedTypeName) type).rawType.equals(TypeNames.PROVIDER); - } - - private static TypeName remapDaggerProviderToProvider(TypeName type) { - if (type instanceof ParameterizedTypeName) { - ParameterizedTypeName parameterizedTypeName = (ParameterizedTypeName) type; - if (parameterizedTypeName.rawType.equals(TypeNames.DAGGER_PROVIDER)) { - return ParameterizedTypeName.get( - TypeNames.PROVIDER, parameterizedTypeName.typeArguments.toArray(new TypeName[0])); - } - } - return type; - } - /** Represents the available fields in the generated factory class. */ private static final class FactoryFields { static FactoryFields create(ContributionBinding binding) { diff --git a/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java b/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java index b2d841a8f50..d019ba43f8d 100644 --- a/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java +++ b/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java @@ -33,9 +33,6 @@ import static dagger.internal.codegen.javapoet.TypeNames.membersInjectorOf; import static dagger.internal.codegen.javapoet.TypeNames.rawTypeName; import static dagger.internal.codegen.langmodel.Accessibility.isTypeAccessibleFrom; -import static dagger.internal.codegen.writing.FactoryGenerator.hasDaggerProviderParams; -import static dagger.internal.codegen.writing.FactoryGenerator.remapParamsToJavaxProvider; -import static dagger.internal.codegen.writing.FactoryGenerator.wrappedParametersCodeBlock; import static dagger.internal.codegen.writing.GwtCompatibility.gwtIncompatibleAnnotation; import static javax.lang.model.element.Modifier.FINAL; import static javax.lang.model.element.Modifier.PRIVATE; @@ -67,7 +64,6 @@ import dagger.internal.codegen.model.DependencyRequest; import dagger.internal.codegen.model.Key; import dagger.internal.codegen.writing.InjectionMethods.InjectionSiteMethod; -import java.util.List; import javax.inject.Inject; /** @@ -110,7 +106,7 @@ public ImmutableList topLevelTypes(MembersInjectionBinding bin .addSuperinterface(membersInjectorOf(binding.key().type().xprocessing().getTypeName())) .addFields(frameworkFields.values()) .addMethod(constructor(frameworkFields)) - .addMethods(createMethod(binding, frameworkFields)) + .addMethod(createMethod(binding, frameworkFields)) .addMethod(injectMembersMethod(binding, frameworkFields)) .addMethods( binding.injectionSites().stream() @@ -163,42 +159,22 @@ private MethodSpec constructor(ImmutableMap framew // @SuppressWarnings("RAW_TYPE") Provider dep3Provider) { // return new MyClass_MembersInjector(dep1Provider, dep2Provider, dep3Provider); // } - private ImmutableList createMethod( + private MethodSpec createMethod( MembersInjectionBinding binding, ImmutableMap frameworkFields) { - ImmutableList.Builder methodsBuilder = ImmutableList.builder(); - List params = constructor(frameworkFields).parameters; + MethodSpec constructor = constructor(frameworkFields); // We use a static create method so that generated components can avoid having // to refer to the generic types of the factory. // (Otherwise they may have visibility problems referring to the types.) - methodsBuilder.add(methodBuilder("create") - .addModifiers(PUBLIC, STATIC) - .addTypeVariables(bindingTypeElementTypeVariableNames(binding)) - .returns(membersInjectorOf(binding.key().type().xprocessing().getTypeName())) - .addParameters(params) - .addStatement( - "return new $T($L)", - parameterizedGeneratedTypeNameForBinding(binding), - parameterNames(params)) - .build()); - if (hasDaggerProviderParams(params)) { - methodsBuilder.add(javaxCreateMethod(binding, params)); - } - return methodsBuilder.build(); - } - - private MethodSpec javaxCreateMethod( - MembersInjectionBinding binding, List params) { - ImmutableList remappedParams = remapParamsToJavaxProvider(params); return methodBuilder("create") .addModifiers(PUBLIC, STATIC) .addTypeVariables(bindingTypeElementTypeVariableNames(binding)) .returns(membersInjectorOf(binding.key().type().xprocessing().getTypeName())) - .addParameters(remappedParams) + .addParameters(constructor.parameters) .addStatement( "return new $T($L)", parameterizedGeneratedTypeNameForBinding(binding), - wrappedParametersCodeBlock(remappedParams)) + parameterNames(constructor.parameters)) .build(); } diff --git a/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java b/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java index 85cc5b06baa..12a13676074 100644 --- a/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java +++ b/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java @@ -39,9 +39,6 @@ import static dagger.internal.codegen.javapoet.TypeNames.listOf; import static dagger.internal.codegen.javapoet.TypeNames.listenableFutureOf; import static dagger.internal.codegen.javapoet.TypeNames.producedOf; -import static dagger.internal.codegen.writing.FactoryGenerator.hasDaggerProviderParams; -import static dagger.internal.codegen.writing.FactoryGenerator.remapParamsToJavaxProvider; -import static dagger.internal.codegen.writing.FactoryGenerator.wrappedParametersCodeBlock; import static dagger.internal.codegen.writing.GwtCompatibility.gwtIncompatibleAnnotation; import static dagger.internal.codegen.xprocessing.XElements.asMethod; import static dagger.internal.codegen.xprocessing.XElements.getSimpleName; @@ -79,7 +76,6 @@ import dagger.internal.codegen.javapoet.TypeNames; import dagger.internal.codegen.model.DependencyRequest; import dagger.internal.codegen.model.RequestKind; -import java.util.List; import java.util.Optional; import javax.inject.Inject; @@ -129,7 +125,7 @@ public ImmutableList topLevelTypes(ProductionBinding binding) .filter(field -> !field.equals(factoryFields.monitorField)) .collect(toImmutableList())) .addMethod(constructorMethod(binding, factoryFields)) - .addMethods(staticCreateMethod(binding, factoryFields)) + .addMethod(staticCreateMethod(binding, factoryFields)) .addMethod(collectDependenciesMethod(binding, factoryFields)) .addMethod(callProducesMethod(binding, factoryFields)); @@ -189,42 +185,17 @@ private MethodSpec constructorMethod(ProductionBinding binding, FactoryFields fa // return new FooModule_ProducesFooFactory( // module, executorProvider, productionComponentMonitorProvider, fooProducer, barProducer); // } - private ImmutableList staticCreateMethod( - ProductionBinding binding, FactoryFields factoryFields) { - ImmutableList.Builder methodsBuilder = ImmutableList.builder(); - List params = constructorMethod(binding, factoryFields).parameters; - methodsBuilder.add(MethodSpec.methodBuilder("create") - .addModifiers(PUBLIC, STATIC) - .returns(parameterizedGeneratedTypeNameForBinding(binding)) - .addTypeVariables(bindingTypeElementTypeVariableNames(binding)) - .addParameters(params) - .addStatement( - "return new $T($L)", - parameterizedGeneratedTypeNameForBinding(binding), - parameterNames(params)) - .build()); - // If any of the parameters take a Dagger Provider type, we also need to make a - // Javax Provider type for backwards compatibility with components generated at - // an older version. - // Eventually, we will need to remove this and break backwards compatibility - // in order to fully cut the Javax dependency. - if (hasDaggerProviderParams(params)) { - methodsBuilder.add(javaxCreateMethod(binding, params)); - } - return methodsBuilder.build(); - } - - private MethodSpec javaxCreateMethod(ProductionBinding binding, List params) { - ImmutableList remappedParams = remapParamsToJavaxProvider(params); + private MethodSpec staticCreateMethod(ProductionBinding binding, FactoryFields factoryFields) { + MethodSpec constructor = constructorMethod(binding, factoryFields); return MethodSpec.methodBuilder("create") .addModifiers(PUBLIC, STATIC) .returns(parameterizedGeneratedTypeNameForBinding(binding)) .addTypeVariables(bindingTypeElementTypeVariableNames(binding)) - .addParameters(remappedParams) + .addParameters(constructor.parameters) .addStatement( "return new $T($L)", parameterizedGeneratedTypeNameForBinding(binding), - wrappedParametersCodeBlock(remappedParams)) + parameterNames(constructor.parameters)) .build(); } diff --git a/javatests/dagger/functional/jakarta/BUILD b/javatests/dagger/functional/jakarta/BUILD index 8d98d86d7d7..9feb5e20928 100644 --- a/javatests/dagger/functional/jakarta/BUILD +++ b/javatests/dagger/functional/jakarta/BUILD @@ -32,16 +32,3 @@ GenJavaTests( "@maven//:jakarta_inject_jakarta_inject_api", ], ) - -GenJavaTests( - name = "JakartaProviderTest", - srcs = ["JakartaProviderTest.java"], - javacopts = DOCLINT_HTML_AND_SYNTAX, - deps = [ - "//:dagger_with_compiler", - "//third_party/java/guava/base", - "//third_party/java/junit", - "//third_party/java/truth", - "@maven//:jakarta_inject_jakarta_inject_api", - ], -) diff --git a/javatests/dagger/functional/jakarta/JakartaProviderTest.java b/javatests/dagger/functional/jakarta/JakartaProviderTest.java deleted file mode 100644 index 0c228619fb3..00000000000 --- a/javatests/dagger/functional/jakarta/JakartaProviderTest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (C) 2024 The Dagger Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dagger.functional.jakarta; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.common.base.Optional; -import dagger.Binds; -import dagger.BindsOptionalOf; -import dagger.Component; -import dagger.Lazy; -import dagger.Module; -import dagger.Provides; -import dagger.multibindings.IntoMap; -import dagger.multibindings.StringKey; -import jakarta.inject.Inject; -import jakarta.inject.Provider; -import jakarta.inject.Qualifier; -import jakarta.inject.Scope; -import java.util.HashMap; -import java.util.Map; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -@RunWith(JUnit4.class) -public final class JakartaProviderTest { - - @Scope - public @interface TestScope {} - - @Qualifier - public @interface TestQualifier {} - - @TestScope - @Component(modules = TestModule.class) - interface TestComponent { - Provider getJakartaFoo(); - - javax.inject.Provider getJavaxFoo(); - - Provider getJakartaBar(); - - javax.inject.Provider getJavaxBar(); - - @TestQualifier - Provider getJakartaQualifiedFoo(); - - @TestQualifier - javax.inject.Provider getJavaxQualifiedFoo(); - - @TestQualifier - Provider getJakartaQualifiedBar(); - - @TestQualifier - javax.inject.Provider getJavaxQualifiedBar(); - - InjectUsages injectUsages(); - - Map> getJakartaProviderMap(); - - Map> getJavaxProviderMap(); - - Map>> getJakartaProviderLazyMap(); - - Map>> getJavaxProviderLazyMap(); - - Map> getManuallyProvidedJakartaMap(); - - Map> getManuallyProvidedJavaxMap(); - - Optional> getPresentOptionalJakartaProvider(); - - Optional> getPresentOptionalJavaxProvider(); - - Optional> getEmptyOptionalJakartaProvider(); - - Optional> getEmptyOptionalJavaxProvider(); - } - - public static final class Foo { - @Inject - Foo() {} - } - - @TestScope - public static final class Bar { - @Inject - Bar() {} - } - - public static final class InjectUsages { - Provider jakartaBar; - Provider jakartaQualifiedBar; - javax.inject.Provider javaxQualifiedBar; - - @Inject - InjectUsages(Provider jakartaBar) { - this.jakartaBar = jakartaBar; - } - - @Inject javax.inject.Provider javaxBar; - - @Inject - void injectBar( - Provider jakartaQualifiedBar, javax.inject.Provider javaxQualifiedBar) { - this.jakartaQualifiedBar = jakartaQualifiedBar; - this.javaxQualifiedBar = javaxQualifiedBar; - } - } - - @Module - abstract static class TestModule { - @Provides - @TestQualifier - static Foo provideFoo( - Provider fooProvider, javax.inject.Provider unusedOtherFooProvider) { - return fooProvider.get(); - } - - @Provides - @TestQualifier - @TestScope - static Bar provideBar( - Provider unusedBarProvider, javax.inject.Provider otherBarProvider) { - // Use the other one in this case just to vary it from Foo - return otherBarProvider.get(); - } - - @Binds - @IntoMap - @StringKey("bar") - abstract Bar bindBarIntoMap(Bar bar); - - // TODO(b/65118638): Use @Binds @IntoMap Lazy once that works properly. - @Provides - @IntoMap - @StringKey("bar") - static Lazy provideLazyIntoMap(Lazy bar) { - return bar; - } - - // Manually provide two Provider maps to make sure they don't conflict. - @Provides - static Map> manuallyProvidedJakartaMap() { - Map> map = new HashMap<>(); - map.put(9L, null); - return map; - } - - @Provides - static Map> manuallyProvidedJavaxMap() { - Map> map = new HashMap<>(); - map.put(0L, null); - return map; - } - - @BindsOptionalOf - abstract String bindOptionalString(); - - @Provides - static String provideString() { - return "present"; - } - - @BindsOptionalOf - abstract Long bindOptionalLong(); - } - - @Test - public void testJakartaProviders() { - TestComponent testComponent = DaggerJakartaProviderTest_TestComponent.create(); - - assertThat(testComponent.getJakartaFoo().get()).isNotNull(); - assertThat(testComponent.getJavaxFoo().get()).isNotNull(); - - assertThat(testComponent.getJakartaBar().get()) - .isSameInstanceAs(testComponent.getJavaxBar().get()); - - assertThat(testComponent.getJakartaQualifiedFoo().get()).isNotNull(); - assertThat(testComponent.getJavaxQualifiedFoo().get()).isNotNull(); - - assertThat(testComponent.getJakartaQualifiedBar().get()) - .isSameInstanceAs(testComponent.getJavaxQualifiedBar().get()); - assertThat(testComponent.getJakartaBar().get()) - .isSameInstanceAs(testComponent.getJakartaQualifiedBar().get()); - - InjectUsages injectUsages = testComponent.injectUsages(); - - assertThat(injectUsages.jakartaBar.get()).isSameInstanceAs(injectUsages.javaxBar.get()); - assertThat(injectUsages.jakartaQualifiedBar.get()) - .isSameInstanceAs(injectUsages.javaxQualifiedBar.get()); - assertThat(injectUsages.jakartaBar.get()) - .isSameInstanceAs(injectUsages.jakartaQualifiedBar.get()); - - assertThat(testComponent.getJakartaProviderMap().get("bar").get()).isSameInstanceAs( - testComponent.getJavaxProviderMap().get("bar").get()); - - assertThat(testComponent.getJakartaProviderLazyMap().get("bar").get().get()).isSameInstanceAs( - testComponent.getJavaxProviderLazyMap().get("bar").get().get()); - - Map> manualJakartaMap = testComponent.getManuallyProvidedJakartaMap(); - assertThat(manualJakartaMap.keySet()).containsExactly(9L); - - Map> manualJavaxMap = - testComponent.getManuallyProvidedJavaxMap(); - assertThat(manualJavaxMap.keySet()).containsExactly(0L); - - assertThat(testComponent.getPresentOptionalJakartaProvider().get().get()).isEqualTo("present"); - assertThat(testComponent.getPresentOptionalJavaxProvider().get().get()).isEqualTo("present"); - assertThat(testComponent.getEmptyOptionalJakartaProvider().isPresent()).isFalse(); - assertThat(testComponent.getEmptyOptionalJavaxProvider().isPresent()).isFalse(); - } -} diff --git a/javatests/dagger/internal/codegen/ModuleFactoryGeneratorTest.java b/javatests/dagger/internal/codegen/ModuleFactoryGeneratorTest.java index d315b77e0d3..0d7d2f02c15 100644 --- a/javatests/dagger/internal/codegen/ModuleFactoryGeneratorTest.java +++ b/javatests/dagger/internal/codegen/ModuleFactoryGeneratorTest.java @@ -71,12 +71,6 @@ public void providesMethodReturnsProvider() { .hasError("@Provides methods must not return framework types"); } - @Test - public void providesMethodReturnsJakartaProvider() { - assertThatModuleMethod("@Provides jakarta.inject.Provider provideProvider() {}") - .hasError("@Provides methods must not return framework types"); - } - @Test public void providesMethodReturnsLazy() { assertThatModuleMethod("@Provides Lazy provideLazy() {}") diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_DEFAULT_MODE_test.Foo_Factory b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_DEFAULT_MODE_test.Foo_Factory index 23c6cff4820..a6334be8c91 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_DEFAULT_MODE_test.Foo_Factory +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_DEFAULT_MODE_test.Foo_Factory @@ -1,11 +1,10 @@ package test; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -34,10 +33,6 @@ public final class Foo_Factory { return newInstance(argProvider.get(), argProvider2); } - public static Foo_Factory create(javax.inject.Provider argProvider) { - return new Foo_Factory(Providers.asDaggerProvider(argProvider)); - } - public static Foo_Factory create(Provider argProvider) { return new Foo_Factory(argProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_FAST_INIT_MODE_test.Foo_Factory b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_FAST_INIT_MODE_test.Foo_Factory index 23c6cff4820..a6334be8c91 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_FAST_INIT_MODE_test.Foo_Factory +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testFactoryGeneratorDuplicatedParamNames_FAST_INIT_MODE_test.Foo_Factory @@ -1,11 +1,10 @@ package test; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -34,10 +33,6 @@ public final class Foo_Factory { return newInstance(argProvider.get(), argProvider2); } - public static Foo_Factory create(javax.inject.Provider argProvider) { - return new Foo_Factory(Providers.asDaggerProvider(argProvider)); - } - public static Foo_Factory create(Provider argProvider) { return new Foo_Factory(argProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_basicNameCollision_test.InjectConstructor_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_basicNameCollision_test.InjectConstructor_Factory index fc46a0b04fc..d0df5cf9950 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_basicNameCollision_test.InjectConstructor_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_basicNameCollision_test.InjectConstructor_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -36,11 +35,6 @@ public final class InjectConstructor_Factory implements Factory factoryProvider) { - return new InjectConstructor_Factory(Providers.asDaggerProvider(factoryProvider)); - } - public static InjectConstructor_Factory create(Provider factoryProvider) { return new InjectConstructor_Factory(factoryProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_boundedGenerics_test.GenericClass_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_boundedGenerics_test.GenericClass_Factory index 85f3cee312a..4048e80d177 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_boundedGenerics_test.GenericClass_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_boundedGenerics_test.GenericClass_Factory @@ -2,12 +2,11 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import java.util.List; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -43,12 +42,6 @@ public final class GenericClass_Factory, B exte return newInstance(aProvider.get(), bProvider.get(), cProvider.get()); } - public static , B extends List, C extends List> GenericClass_Factory create( - javax.inject.Provider aProvider, javax.inject.Provider bProvider, - javax.inject.Provider cProvider) { - return new GenericClass_Factory(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider), Providers.asDaggerProvider(cProvider)); - } - public static , B extends List, C extends List> GenericClass_Factory create( Provider aProvider, Provider bProvider, Provider cProvider) { return new GenericClass_Factory(aProvider, bProvider, cProvider); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_fieldAndMethodGenerics_test.GenericClass_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_fieldAndMethodGenerics_test.GenericClass_Factory index 6e1e620e4a0..de01bb36d27 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_fieldAndMethodGenerics_test.GenericClass_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_fieldAndMethodGenerics_test.GenericClass_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -42,11 +41,6 @@ public final class GenericClass_Factory implements Factory GenericClass_Factory create(javax.inject.Provider aProvider, - javax.inject.Provider bProvider) { - return new GenericClass_Factory(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - public static GenericClass_Factory create(Provider aProvider, Provider bProvider) { return new GenericClass_Factory(aProvider, bProvider); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorAndMembersInjection_test.AllInjections_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorAndMembersInjection_test.AllInjections_Factory index 1558b853521..e1a43ccf943 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorAndMembersInjection_test.AllInjections_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorAndMembersInjection_test.AllInjections_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -46,11 +45,6 @@ public final class AllInjections_Factory implements Factory { return instance; } - public static AllInjections_Factory create(javax.inject.Provider sProvider, - javax.inject.Provider sProvider2, javax.inject.Provider sProvider3) { - return new AllInjections_Factory(Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(sProvider2), Providers.asDaggerProvider(sProvider3)); - } - public static AllInjections_Factory create(Provider sProvider, Provider sProvider2, Provider sProvider3) { return new AllInjections_Factory(sProvider, sProvider2, sProvider3); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorOnGenericClass_test.GenericClass_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorOnGenericClass_test.GenericClass_Factory index bc48f594da2..79c4577b3de 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorOnGenericClass_test.GenericClass_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructorOnGenericClass_test.GenericClass_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -36,10 +35,6 @@ public final class GenericClass_Factory implements Factory> { return newInstance(tProvider.get()); } - public static GenericClass_Factory create(javax.inject.Provider tProvider) { - return new GenericClass_Factory(Providers.asDaggerProvider(tProvider)); - } - public static GenericClass_Factory create(Provider tProvider) { return new GenericClass_Factory(tProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructor_test.InjectConstructor_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructor_test.InjectConstructor_Factory index 8368ed387ee..c098e0cfcd0 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructor_test.InjectConstructor_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_injectConstructor_test.InjectConstructor_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -36,10 +35,6 @@ public final class InjectConstructor_Factory implements Factory sProvider) { - return new InjectConstructor_Factory(Providers.asDaggerProvider(sProvider)); - } - public static InjectConstructor_Factory create(Provider sProvider) { return new InjectConstructor_Factory(sProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_multipleSameTypesWithGenericsAndQualifiersAndLazies_test.GenericClass_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_multipleSameTypesWithGenericsAndQualifiersAndLazies_test.GenericClass_Factory index 687848e9cdc..83065518720 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_multipleSameTypesWithGenericsAndQualifiersAndLazies_test.GenericClass_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_multipleSameTypesWithGenericsAndQualifiersAndLazies_test.GenericClass_Factory @@ -4,11 +4,10 @@ import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata("test.QualifierA") @@ -84,17 +83,6 @@ public final class GenericClass_Factory implements Factory GenericClass_Factory create(javax.inject.Provider aProvider, - javax.inject.Provider a2Provider, javax.inject.Provider paProvider, - javax.inject.Provider qaProvider, javax.inject.Provider laProvider, - javax.inject.Provider sProvider, javax.inject.Provider s2Provider, - javax.inject.Provider psProvider, javax.inject.Provider qsProvider, - javax.inject.Provider lsProvider, javax.inject.Provider bProvider, - javax.inject.Provider b2Provider, javax.inject.Provider pbProvider, - javax.inject.Provider qbProvider, javax.inject.Provider lbProvider) { - return new GenericClass_Factory(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(a2Provider), Providers.asDaggerProvider(paProvider), Providers.asDaggerProvider(qaProvider), Providers.asDaggerProvider(laProvider), Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(s2Provider), Providers.asDaggerProvider(psProvider), Providers.asDaggerProvider(qsProvider), Providers.asDaggerProvider(lsProvider), Providers.asDaggerProvider(bProvider), Providers.asDaggerProvider(b2Provider), Providers.asDaggerProvider(pbProvider), Providers.asDaggerProvider(qbProvider), Providers.asDaggerProvider(lbProvider)); - } - public static GenericClass_Factory create(Provider aProvider, Provider a2Provider, Provider paProvider, Provider qaProvider, Provider laProvider, Provider sProvider, Provider s2Provider, @@ -104,9 +92,9 @@ public final class GenericClass_Factory implements Factory(aProvider, a2Provider, paProvider, qaProvider, laProvider, sProvider, s2Provider, psProvider, qsProvider, lsProvider, bProvider, b2Provider, pbProvider, qbProvider, lbProvider); } - public static GenericClass newInstance(A a, A a2, javax.inject.Provider pa, A qa, - Lazy la, String s, String s2, javax.inject.Provider ps, String qs, Lazy ls, - B b, B b2, javax.inject.Provider pb, B qb, Lazy lb) { + public static GenericClass newInstance(A a, A a2, Provider pa, A qa, Lazy la, + String s, String s2, Provider ps, String qs, Lazy ls, B b, B b2, + Provider pb, B qb, Lazy lb) { return new GenericClass(a, a2, pa, qa, la, s, s2, ps, qs, ls, b, b2, pb, qb, lb); } } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_nestedNameCollision_test.InjectConstructor_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_nestedNameCollision_test.InjectConstructor_Factory index 0615073419f..96bfae2521c 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_nestedNameCollision_test.InjectConstructor_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_nestedNameCollision_test.InjectConstructor_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; import other.pkg.Outer; @ScopeMetadata @@ -37,11 +36,6 @@ public final class InjectConstructor_Factory implements Factory factoryProvider) { - return new InjectConstructor_Factory(Providers.asDaggerProvider(factoryProvider)); - } - public static InjectConstructor_Factory create(Provider factoryProvider) { return new InjectConstructor_Factory(factoryProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_samePackageNameCollision_test.InjectConstructor_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_samePackageNameCollision_test.InjectConstructor_Factory index 232767471d0..e53fd1d2cd2 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_samePackageNameCollision_test.InjectConstructor_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_samePackageNameCollision_test.InjectConstructor_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -40,12 +39,6 @@ public final class InjectConstructor_Factory implements Factory otherPackageProvider, - javax.inject.Provider samePackageProvider) { - return new InjectConstructor_Factory(Providers.asDaggerProvider(otherPackageProvider), Providers.asDaggerProvider(samePackageProvider)); - } - public static InjectConstructor_Factory create( Provider otherPackageProvider, Provider samePackageProvider) { diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_Factory index 7771f5fb372..ca033b93f30 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata("test.FooBaseConstructorQualifier") @@ -46,11 +45,6 @@ public final class FooBase_Factory implements Factory { return instance; } - public static FooBase_Factory create(javax.inject.Provider iProvider, - javax.inject.Provider injectFieldProvider, javax.inject.Provider fProvider) { - return new FooBase_Factory(Providers.asDaggerProvider(iProvider), Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - public static FooBase_Factory create(Provider iProvider, Provider injectFieldProvider, Provider fProvider) { return new FooBase_Factory(iProvider, injectFieldProvider, fProvider); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_MembersInjector b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_MembersInjector index be0404b162b..c1603696397 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.FooBase_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata({ "test.FooBaseFieldQualifier", @@ -41,11 +40,6 @@ public final class FooBase_MembersInjector implements MembersInjector { return new FooBase_MembersInjector(injectFieldProvider, fProvider); } - public static MembersInjector create(javax.inject.Provider injectFieldProvider, - javax.inject.Provider fProvider) { - return new FooBase_MembersInjector(Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - @Override public void injectMembers(FooBase instance) { injectInjectField(instance, injectFieldProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_Factory index 7b4c1d6cd75..2cadc8ebba5 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata("test.FooConstructorQualifier") @@ -50,12 +49,6 @@ public final class Foo_Factory implements Factory { return instance; } - public static Foo_Factory create(javax.inject.Provider iProvider, - javax.inject.Provider injectFieldProvider, - javax.inject.Provider injectFieldProvider2, javax.inject.Provider fProvider) { - return new Foo_Factory(Providers.asDaggerProvider(iProvider), Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(injectFieldProvider2), Providers.asDaggerProvider(fProvider)); - } - public static Foo_Factory create(Provider iProvider, Provider injectFieldProvider, Provider injectFieldProvider2, Provider fProvider) { diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_MembersInjector b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_MembersInjector index 535237023d0..bb14c238d2d 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testBaseClassQualifierMetadata_test.Foo_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata({ "test.FooFieldQualifier", @@ -45,11 +44,6 @@ public final class Foo_MembersInjector implements MembersInjector { return new Foo_MembersInjector(injectFieldProvider, injectFieldProvider2, fProvider); } - public static MembersInjector create(javax.inject.Provider injectFieldProvider, - javax.inject.Provider injectFieldProvider2, javax.inject.Provider fProvider) { - return new Foo_MembersInjector(Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(injectFieldProvider2), Providers.asDaggerProvider(fProvider)); - } - @Override public void injectMembers(Foo instance) { FooBase_MembersInjector.injectInjectField(instance, injectFieldProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_Factory index 4d0c7344182..d03eefbf27a 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata({ @@ -52,12 +51,6 @@ public final class SomeBinding_Factory implements Factory { return instance; } - public static SomeBinding_Factory create(javax.inject.Provider str1Provider, - javax.inject.Provider str2Provider, javax.inject.Provider injectFieldProvider, - javax.inject.Provider fProvider) { - return new SomeBinding_Factory(Providers.asDaggerProvider(str1Provider), Providers.asDaggerProvider(str2Provider), Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - public static SomeBinding_Factory create(Provider str1Provider, Provider str2Provider, Provider injectFieldProvider, Provider fProvider) { diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_MembersInjector b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_MembersInjector index 63ba30fbdf1..a828b6a54fc 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testComplexQualifierMetadata_test.SomeBinding_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata({ "test.QualifierWithValue", @@ -42,11 +41,6 @@ public final class SomeBinding_MembersInjector implements MembersInjector create( - javax.inject.Provider injectFieldProvider, javax.inject.Provider fProvider) { - return new SomeBinding_MembersInjector(Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - @Override public void injectMembers(SomeBinding instance) { injectInjectField(instance, injectFieldProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_Factory index 441131f24ff..d0fcf4668e8 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata("test.ConstructorParameterQualifier") @@ -46,11 +45,6 @@ public final class SomeBinding_Factory implements Factory { return instance; } - public static SomeBinding_Factory create(javax.inject.Provider dProvider, - javax.inject.Provider injectFieldProvider, javax.inject.Provider fProvider) { - return new SomeBinding_Factory(Providers.asDaggerProvider(dProvider), Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - public static SomeBinding_Factory create(Provider dProvider, Provider injectFieldProvider, Provider fProvider) { return new SomeBinding_Factory(dProvider, injectFieldProvider, fProvider); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_MembersInjector b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_MembersInjector index aa147195de0..9f13bcd3bb0 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_testQualifierMetadata_test.SomeBinding_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata({ "test.FieldQualifier", @@ -42,11 +41,6 @@ public final class SomeBinding_MembersInjector implements MembersInjector create( - javax.inject.Provider injectFieldProvider, javax.inject.Provider fProvider) { - return new SomeBinding_MembersInjector(Providers.asDaggerProvider(injectFieldProvider), Providers.asDaggerProvider(fProvider)); - } - @Override public void injectMembers(SomeBinding instance) { injectInjectField(instance, injectFieldProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_twoGenericTypes_test.GenericClass_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_twoGenericTypes_test.GenericClass_Factory index 9c722dc91b3..8de6b8f119b 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_twoGenericTypes_test.GenericClass_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_twoGenericTypes_test.GenericClass_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -39,11 +38,6 @@ public final class GenericClass_Factory implements Factory GenericClass_Factory create(javax.inject.Provider aProvider, - javax.inject.Provider bProvider) { - return new GenericClass_Factory(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - public static GenericClass_Factory create(Provider aProvider, Provider bProvider) { return new GenericClass_Factory(aProvider, bProvider); diff --git a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_wildcardDependency_test.InjectConstructor_Factory b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_wildcardDependency_test.InjectConstructor_Factory index bdafd5f34b0..8b28db6c4b7 100644 --- a/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_wildcardDependency_test.InjectConstructor_Factory +++ b/javatests/dagger/internal/codegen/goldens/InjectConstructorFactoryGeneratorTest_wildcardDependency_test.InjectConstructor_Factory @@ -2,12 +2,11 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import java.util.List; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -37,10 +36,6 @@ public final class InjectConstructor_Factory implements Factory> objectsProvider) { - return new InjectConstructor_Factory(Providers.asDaggerProvider(objectsProvider)); - } - public static InjectConstructor_Factory create(Provider> objectsProvider) { return new InjectConstructor_Factory(objectsProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_DEFAULT_MODE_other.Inaccessible_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_DEFAULT_MODE_other.Inaccessible_MembersInjector index f051e2a7edd..b2c7b237e57 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_DEFAULT_MODE_other.Inaccessible_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_DEFAULT_MODE_other.Inaccessible_MembersInjector @@ -3,10 +3,9 @@ package other; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class Inaccessible_MembersInjector implements MembersInjector create(javax.inject.Provider fooProvider, - javax.inject.Provider fooProvider2) { - return new Inaccessible_MembersInjector(Providers.asDaggerProvider(fooProvider), Providers.asDaggerProvider(fooProvider2)); - } - @Override public void injectMembers(Inaccessible instance) { injectFoo(instance, fooProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_FAST_INIT_MODE_other.Inaccessible_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_FAST_INIT_MODE_other.Inaccessible_MembersInjector index f051e2a7edd..b2c7b237e57 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_FAST_INIT_MODE_other.Inaccessible_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibility_FAST_INIT_MODE_other.Inaccessible_MembersInjector @@ -3,10 +3,9 @@ package other; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class Inaccessible_MembersInjector implements MembersInjector create(javax.inject.Provider fooProvider, - javax.inject.Provider fooProvider2) { - return new Inaccessible_MembersInjector(Providers.asDaggerProvider(fooProvider), Providers.asDaggerProvider(fooProvider2)); - } - @Override public void injectMembers(Inaccessible instance) { injectFoo(instance, fooProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_DEFAULT_MODE_test.OuterType_B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_DEFAULT_MODE_test.OuterType_B_MembersInjector index d2b3141ff5b..8b18ba9ebcd 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_DEFAULT_MODE_test.OuterType_B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_DEFAULT_MODE_test.OuterType_B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class OuterType_B_MembersInjector implements MembersInjector create(javax.inject.Provider aProvider) { - return new OuterType_B_MembersInjector(Providers.asDaggerProvider(aProvider)); - } - @Override public void injectMembers(OuterType.B instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_FAST_INIT_MODE_test.OuterType_B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_FAST_INIT_MODE_test.OuterType_B_MembersInjector index d2b3141ff5b..8b18ba9ebcd 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_FAST_INIT_MODE_test.OuterType_B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_componentWithNestingAndGeneratedType_FAST_INIT_MODE_test.OuterType_B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class OuterType_B_MembersInjector implements MembersInjector create(javax.inject.Provider aProvider) { - return new OuterType_B_MembersInjector(Providers.asDaggerProvider(aProvider)); - } - @Override public void injectMembers(OuterType.B instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_DEFAULT_MODE_test.GenericClass_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_DEFAULT_MODE_test.GenericClass_MembersInjector index 5c1efb9cacb..5d22e0dc60c 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_DEFAULT_MODE_test.GenericClass_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_DEFAULT_MODE_test.GenericClass_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class GenericClass_MembersInjector implements MembersInjector return new GenericClass_MembersInjector(aProvider, bProvider); } - public static MembersInjector> create( - javax.inject.Provider aProvider, javax.inject.Provider bProvider) { - return new GenericClass_MembersInjector(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - @Override public void injectMembers(GenericClass instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_FAST_INIT_MODE_test.GenericClass_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_FAST_INIT_MODE_test.GenericClass_MembersInjector index 5c1efb9cacb..5d22e0dc60c 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_FAST_INIT_MODE_test.GenericClass_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldAndMethodGenerics_FAST_INIT_MODE_test.GenericClass_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class GenericClass_MembersInjector implements MembersInjector return new GenericClass_MembersInjector(aProvider, bProvider); } - public static MembersInjector> create( - javax.inject.Provider aProvider, javax.inject.Provider bProvider) { - return new GenericClass_MembersInjector(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - @Override public void injectMembers(GenericClass instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_DEFAULT_MODE_test.Child_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_DEFAULT_MODE_test.Child_MembersInjector index abd124678f1..bd139a67da9 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_DEFAULT_MODE_test.Child_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_DEFAULT_MODE_test.Child_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class Child_MembersInjector implements MembersInjector { return new Child_MembersInjector(objectProvider, objectProvider2); } - public static MembersInjector create(javax.inject.Provider objectProvider, - javax.inject.Provider objectProvider2) { - return new Child_MembersInjector(Providers.asDaggerProvider(objectProvider), Providers.asDaggerProvider(objectProvider2)); - } - @Override public void injectMembers(Child instance) { Parent_MembersInjector.injectObject(instance, objectProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_FAST_INIT_MODE_test.Child_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_FAST_INIT_MODE_test.Child_MembersInjector index abd124678f1..bd139a67da9 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_FAST_INIT_MODE_test.Child_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionForShadowedMember_FAST_INIT_MODE_test.Child_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class Child_MembersInjector implements MembersInjector { return new Child_MembersInjector(objectProvider, objectProvider2); } - public static MembersInjector create(javax.inject.Provider objectProvider, - javax.inject.Provider objectProvider2) { - return new Child_MembersInjector(Providers.asDaggerProvider(objectProvider), Providers.asDaggerProvider(objectProvider2)); - } - @Override public void injectMembers(Child instance) { Parent_MembersInjector.injectObject(instance, objectProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_DEFAULT_MODE_test.FieldInjectionWithQualifier_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_DEFAULT_MODE_test.FieldInjectionWithQualifier_MembersInjector index e5f27451234..0762e06c10c 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_DEFAULT_MODE_test.FieldInjectionWithQualifier_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_DEFAULT_MODE_test.FieldInjectionWithQualifier_MembersInjector @@ -3,11 +3,10 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; import javax.inject.Named; +import javax.inject.Provider; @QualifierMetadata("javax.inject.Named") @DaggerGenerated @@ -40,11 +39,6 @@ public final class FieldInjectionWithQualifier_MembersInjector implements Member return new FieldInjectionWithQualifier_MembersInjector(aProvider, bProvider); } - public static MembersInjector create( - javax.inject.Provider aProvider, javax.inject.Provider bProvider) { - return new FieldInjectionWithQualifier_MembersInjector(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - @Override public void injectMembers(FieldInjectionWithQualifier instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_FAST_INIT_MODE_test.FieldInjectionWithQualifier_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_FAST_INIT_MODE_test.FieldInjectionWithQualifier_MembersInjector index e5f27451234..0762e06c10c 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_FAST_INIT_MODE_test.FieldInjectionWithQualifier_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjectionWithQualifier_FAST_INIT_MODE_test.FieldInjectionWithQualifier_MembersInjector @@ -3,11 +3,10 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; import javax.inject.Named; +import javax.inject.Provider; @QualifierMetadata("javax.inject.Named") @DaggerGenerated @@ -40,11 +39,6 @@ public final class FieldInjectionWithQualifier_MembersInjector implements Member return new FieldInjectionWithQualifier_MembersInjector(aProvider, bProvider); } - public static MembersInjector create( - javax.inject.Provider aProvider, javax.inject.Provider bProvider) { - return new FieldInjectionWithQualifier_MembersInjector(Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider)); - } - @Override public void injectMembers(FieldInjectionWithQualifier instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector index ebb9deb99c6..d8608e209cb 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector @@ -5,10 +5,9 @@ import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -44,12 +43,6 @@ public final class FieldInjection_MembersInjector implements MembersInjector create(javax.inject.Provider stringProvider, - javax.inject.Provider stringProvider2, - javax.inject.Provider stringProvider3) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(stringProvider2), Providers.asDaggerProvider(stringProvider3)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -68,8 +61,7 @@ public final class FieldInjection_MembersInjector implements MembersInjector stringProvider) { + public static void injectStringProvider(Object instance, Provider stringProvider) { ((FieldInjection) instance).stringProvider = stringProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_FAST_INIT_MODE_test.FieldInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_FAST_INIT_MODE_test.FieldInjection_MembersInjector index ebb9deb99c6..d8608e209cb 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_FAST_INIT_MODE_test.FieldInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_fieldInjection_FAST_INIT_MODE_test.FieldInjection_MembersInjector @@ -5,10 +5,9 @@ import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -44,12 +43,6 @@ public final class FieldInjection_MembersInjector implements MembersInjector create(javax.inject.Provider stringProvider, - javax.inject.Provider stringProvider2, - javax.inject.Provider stringProvider3) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(stringProvider2), Providers.asDaggerProvider(stringProvider3)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -68,8 +61,7 @@ public final class FieldInjection_MembersInjector implements MembersInjector stringProvider) { + public static void injectStringProvider(Object instance, Provider stringProvider) { ((FieldInjection) instance).stringProvider = stringProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_DEFAULT_MODE_test.AllInjections_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_DEFAULT_MODE_test.AllInjections_MembersInjector index 34fcdd49191..4988b540ef4 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_DEFAULT_MODE_test.AllInjections_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_DEFAULT_MODE_test.AllInjections_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class AllInjections_MembersInjector implements MembersInjector create(javax.inject.Provider sProvider, - javax.inject.Provider sProvider2) { - return new AllInjections_MembersInjector(Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(sProvider2)); - } - @Override public void injectMembers(AllInjections instance) { injectS(instance, sProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_FAST_INIT_MODE_test.AllInjections_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_FAST_INIT_MODE_test.AllInjections_MembersInjector index 34fcdd49191..4988b540ef4 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_FAST_INIT_MODE_test.AllInjections_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectConstructorAndMembersInjection_FAST_INIT_MODE_test.AllInjections_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class AllInjections_MembersInjector implements MembersInjector create(javax.inject.Provider sProvider, - javax.inject.Provider sProvider2) { - return new AllInjections_MembersInjector(Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(sProvider2)); - } - @Override public void injectMembers(AllInjections instance) { injectS(instance, sProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_Factory b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_Factory index 458ce48c79b..a9a98e70a7b 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_Factory +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -43,11 +42,6 @@ public final class InjectedType_Factory implements Factory { return instance; } - public static InjectedType_Factory create(javax.inject.Provider primitiveIntProvider, - javax.inject.Provider boxedIntProvider) { - return new InjectedType_Factory(Providers.asDaggerProvider(primitiveIntProvider), Providers.asDaggerProvider(boxedIntProvider)); - } - public static InjectedType_Factory create(Provider primitiveIntProvider, Provider boxedIntProvider) { return new InjectedType_Factory(primitiveIntProvider, boxedIntProvider); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_MembersInjector index cc58fd53c3c..03a049cf968 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_DEFAULT_MODE_test.InjectedType_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -39,12 +38,6 @@ public final class InjectedType_MembersInjector implements MembersInjector create( - javax.inject.Provider primitiveIntProvider, - javax.inject.Provider boxedIntProvider) { - return new InjectedType_MembersInjector(Providers.asDaggerProvider(primitiveIntProvider), Providers.asDaggerProvider(boxedIntProvider)); - } - @Override public void injectMembers(InjectedType instance) { injectPrimitiveInt(instance, primitiveIntProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_Factory b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_Factory index 458ce48c79b..a9a98e70a7b 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_Factory +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_Factory @@ -2,11 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -43,11 +42,6 @@ public final class InjectedType_Factory implements Factory { return instance; } - public static InjectedType_Factory create(javax.inject.Provider primitiveIntProvider, - javax.inject.Provider boxedIntProvider) { - return new InjectedType_Factory(Providers.asDaggerProvider(primitiveIntProvider), Providers.asDaggerProvider(boxedIntProvider)); - } - public static InjectedType_Factory create(Provider primitiveIntProvider, Provider boxedIntProvider) { return new InjectedType_Factory(primitiveIntProvider, boxedIntProvider); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_MembersInjector index cc58fd53c3c..03a049cf968 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_injectsPrimitive_FAST_INIT_MODE_test.InjectedType_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -39,12 +38,6 @@ public final class InjectedType_MembersInjector implements MembersInjector create( - javax.inject.Provider primitiveIntProvider, - javax.inject.Provider boxedIntProvider) { - return new InjectedType_MembersInjector(Providers.asDaggerProvider(primitiveIntProvider), Providers.asDaggerProvider(boxedIntProvider)); - } - @Override public void injectMembers(InjectedType instance) { injectPrimitiveInt(instance, primitiveIntProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_DEFAULT_MODE_test.MyClass_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_DEFAULT_MODE_test.MyClass_MembersInjector index 17f220ae0a9..5bfa6b7bdfb 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_DEFAULT_MODE_test.MyClass_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_DEFAULT_MODE_test.MyClass_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; import org.jetbrains.annotations.Nullable; @QualifierMetadata @@ -40,12 +39,6 @@ public final class MyClass_MembersInjector implements MembersInjector { return new MyClass_MembersInjector(nullableStringProvider, nullableObjectProvider); } - public static MembersInjector create( - javax.inject.Provider nullableStringProvider, - javax.inject.Provider nullableObjectProvider) { - return new MyClass_MembersInjector(Providers.asDaggerProvider(nullableStringProvider), Providers.asDaggerProvider(nullableObjectProvider)); - } - @Override public void injectMembers(MyClass instance) { injectNullableString(instance, nullableStringProvider.get()); @@ -62,4 +55,3 @@ public final class MyClass_MembersInjector implements MembersInjector { instance.nullableObject = nullableObject; } } - diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_FAST_INIT_MODE_test.MyClass_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_FAST_INIT_MODE_test.MyClass_MembersInjector index 17f220ae0a9..5bfa6b7bdfb 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_FAST_INIT_MODE_test.MyClass_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_kotlinNullableFieldInjection_FAST_INIT_MODE_test.MyClass_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; import org.jetbrains.annotations.Nullable; @QualifierMetadata @@ -40,12 +39,6 @@ public final class MyClass_MembersInjector implements MembersInjector { return new MyClass_MembersInjector(nullableStringProvider, nullableObjectProvider); } - public static MembersInjector create( - javax.inject.Provider nullableStringProvider, - javax.inject.Provider nullableObjectProvider) { - return new MyClass_MembersInjector(Providers.asDaggerProvider(nullableStringProvider), Providers.asDaggerProvider(nullableObjectProvider)); - } - @Override public void injectMembers(MyClass instance) { injectNullableString(instance, nullableStringProvider.get()); @@ -62,4 +55,3 @@ public final class MyClass_MembersInjector implements MembersInjector { instance.nullableObject = nullableObject; } } - diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_DEFAULT_MODE_test.MethodInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_DEFAULT_MODE_test.MethodInjection_MembersInjector index 1b1e71f0fdb..0bbbe46c768 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_DEFAULT_MODE_test.MethodInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_DEFAULT_MODE_test.MethodInjection_MembersInjector @@ -4,10 +4,9 @@ import dagger.Lazy; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -48,13 +47,6 @@ public final class MethodInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider, javax.inject.Provider stringProvider2, - javax.inject.Provider stringProvider3, - javax.inject.Provider stringProvider4) { - return new MethodInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(stringProvider2), Providers.asDaggerProvider(stringProvider3), Providers.asDaggerProvider(stringProvider4)); - } - @Override public void injectMembers(MethodInjection instance) { injectNoArgs(instance); @@ -71,7 +63,7 @@ public final class MethodInjection_MembersInjector implements MembersInjector lazyString, - javax.inject.Provider stringProvider) { + Provider stringProvider) { ((MethodInjection) instance).manyArgs(string, lazyString, stringProvider); } } diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_FAST_INIT_MODE_test.MethodInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_FAST_INIT_MODE_test.MethodInjection_MembersInjector index 1b1e71f0fdb..0bbbe46c768 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_FAST_INIT_MODE_test.MethodInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_methodInjection_FAST_INIT_MODE_test.MethodInjection_MembersInjector @@ -4,10 +4,9 @@ import dagger.Lazy; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -48,13 +47,6 @@ public final class MethodInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider, javax.inject.Provider stringProvider2, - javax.inject.Provider stringProvider3, - javax.inject.Provider stringProvider4) { - return new MethodInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(stringProvider2), Providers.asDaggerProvider(stringProvider3), Providers.asDaggerProvider(stringProvider4)); - } - @Override public void injectMembers(MethodInjection instance) { injectNoArgs(instance); @@ -71,7 +63,7 @@ public final class MethodInjection_MembersInjector implements MembersInjector lazyString, - javax.inject.Provider stringProvider) { + Provider stringProvider) { ((MethodInjection) instance).manyArgs(string, lazyString, stringProvider); } } diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.A_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.A_MembersInjector index 5158593cab1..6327fc5bdb8 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.A_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.A_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class A_MembersInjector implements MembersInjector { return new A_MembersInjector(valueCProvider, valueAProvider); } - public static MembersInjector create(javax.inject.Provider valueCProvider, - javax.inject.Provider valueAProvider) { - return new A_MembersInjector(Providers.asDaggerProvider(valueCProvider), Providers.asDaggerProvider(valueAProvider)); - } - @Override public void injectMembers(A instance) { C_MembersInjector.injectValueC(instance, valueCProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.C_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.C_MembersInjector index 8fc09d03976..c24e8d84fc7 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.C_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_DEFAULT_MODE_test.C_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class C_MembersInjector implements MembersInjector { return new C_MembersInjector(valueCProvider); } - public static MembersInjector create(javax.inject.Provider valueCProvider) { - return new C_MembersInjector(Providers.asDaggerProvider(valueCProvider)); - } - @Override public void injectMembers(C instance) { injectValueC(instance, valueCProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.A_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.A_MembersInjector index 5158593cab1..6327fc5bdb8 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.A_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.A_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -38,11 +37,6 @@ public final class A_MembersInjector implements MembersInjector { return new A_MembersInjector(valueCProvider, valueAProvider); } - public static MembersInjector create(javax.inject.Provider valueCProvider, - javax.inject.Provider valueAProvider) { - return new A_MembersInjector(Providers.asDaggerProvider(valueCProvider), Providers.asDaggerProvider(valueAProvider)); - } - @Override public void injectMembers(A instance) { C_MembersInjector.injectValueC(instance, valueCProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.C_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.C_MembersInjector index 8fc09d03976..c24e8d84fc7 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.C_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_middleClassNoFieldInjection_FAST_INIT_MODE_test.C_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class C_MembersInjector implements MembersInjector { return new C_MembersInjector(valueCProvider); } - public static MembersInjector create(javax.inject.Provider valueCProvider) { - return new C_MembersInjector(Providers.asDaggerProvider(valueCProvider)); - } - @Override public void injectMembers(C instance) { injectValueC(instance, valueCProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_DEFAULT_MODE_test.MixedMemberInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_DEFAULT_MODE_test.MixedMemberInjection_MembersInjector index c968dd653f3..d4b10aec074 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_DEFAULT_MODE_test.MixedMemberInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_DEFAULT_MODE_test.MixedMemberInjection_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -45,12 +44,6 @@ public final class MixedMemberInjection_MembersInjector implements MembersInject return new MixedMemberInjection_MembersInjector(stringProvider, objectProvider, sProvider, oProvider); } - public static MembersInjector create( - javax.inject.Provider stringProvider, javax.inject.Provider objectProvider, - javax.inject.Provider sProvider, javax.inject.Provider oProvider) { - return new MixedMemberInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(objectProvider), Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(oProvider)); - } - @Override public void injectMembers(MixedMemberInjection instance) { injectString(instance, stringProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_FAST_INIT_MODE_test.MixedMemberInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_FAST_INIT_MODE_test.MixedMemberInjection_MembersInjector index c968dd653f3..d4b10aec074 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_FAST_INIT_MODE_test.MixedMemberInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_mixedMemberInjection_FAST_INIT_MODE_test.MixedMemberInjection_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -45,12 +44,6 @@ public final class MixedMemberInjection_MembersInjector implements MembersInject return new MixedMemberInjection_MembersInjector(stringProvider, objectProvider, sProvider, oProvider); } - public static MembersInjector create( - javax.inject.Provider stringProvider, javax.inject.Provider objectProvider, - javax.inject.Provider sProvider, javax.inject.Provider oProvider) { - return new MixedMemberInjection_MembersInjector(Providers.asDaggerProvider(stringProvider), Providers.asDaggerProvider(objectProvider), Providers.asDaggerProvider(sProvider), Providers.asDaggerProvider(oProvider)); - } - @Override public void injectMembers(MixedMemberInjection instance) { injectString(instance, stringProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_nonTypeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_nonTypeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector index 23ab444cde2..586243bdf1c 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_nonTypeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_nonTypeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,11 +33,6 @@ public final class FieldInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -49,4 +43,3 @@ public final class FieldInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -49,4 +43,3 @@ public final class FieldInjection_MembersInjector implements MembersInjector create(javax.inject.Provider aProvider) { - return new OuterType_B_MembersInjector(Providers.asDaggerProvider(aProvider)); - } - @Override public void injectMembers(OuterType.B instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_simpleComponentWithNesting_FAST_INIT_MODE_test.OuterType_B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_simpleComponentWithNesting_FAST_INIT_MODE_test.OuterType_B_MembersInjector index d2b3141ff5b..8b18ba9ebcd 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_simpleComponentWithNesting_FAST_INIT_MODE_test.OuterType_B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_simpleComponentWithNesting_FAST_INIT_MODE_test.OuterType_B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class OuterType_B_MembersInjector implements MembersInjector create(javax.inject.Provider aProvider) { - return new OuterType_B_MembersInjector(Providers.asDaggerProvider(aProvider)); - } - @Override public void injectMembers(OuterType.B instance) { injectA(instance, aProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_DEFAULT_MODE_test.Child_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_DEFAULT_MODE_test.Child_MembersInjector index e744215b9b2..4920c709d44 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_DEFAULT_MODE_test.Child_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_DEFAULT_MODE_test.Child_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -48,12 +47,6 @@ public final class Child_MembersInjector implements MembersInjector> return new Child_MembersInjector(xProvider, yProvider, a2Provider, aProvider, tProvider); } - public static MembersInjector> create(javax.inject.Provider xProvider, - javax.inject.Provider yProvider, javax.inject.Provider a2Provider, - javax.inject.Provider aProvider, javax.inject.Provider tProvider) { - return new Child_MembersInjector(Providers.asDaggerProvider(xProvider), Providers.asDaggerProvider(yProvider), Providers.asDaggerProvider(a2Provider), Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(tProvider)); - } - @Override public void injectMembers(Child instance) { Parent_MembersInjector.injectX(instance, xProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_FAST_INIT_MODE_test.Child_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_FAST_INIT_MODE_test.Child_MembersInjector index e744215b9b2..4920c709d44 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_FAST_INIT_MODE_test.Child_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_subclassedGenericMembersInjectors_FAST_INIT_MODE_test.Child_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -48,12 +47,6 @@ public final class Child_MembersInjector implements MembersInjector> return new Child_MembersInjector(xProvider, yProvider, a2Provider, aProvider, tProvider); } - public static MembersInjector> create(javax.inject.Provider xProvider, - javax.inject.Provider yProvider, javax.inject.Provider a2Provider, - javax.inject.Provider aProvider, javax.inject.Provider tProvider) { - return new Child_MembersInjector(Providers.asDaggerProvider(xProvider), Providers.asDaggerProvider(yProvider), Providers.asDaggerProvider(a2Provider), Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(tProvider)); - } - @Override public void injectMembers(Child instance) { Parent_MembersInjector.injectX(instance, xProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_DEFAULT_MODE_test.B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_DEFAULT_MODE_test.B_MembersInjector index 175f9d6c00d..dfb865dbf23 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_DEFAULT_MODE_test.B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_DEFAULT_MODE_test.B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class B_MembersInjector implements MembersInjector { return new B_MembersInjector(sProvider); } - public static MembersInjector create(javax.inject.Provider sProvider) { - return new B_MembersInjector(Providers.asDaggerProvider(sProvider)); - } - @Override public void injectMembers(B instance) { injectS(instance, sProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_FAST_INIT_MODE_test.B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_FAST_INIT_MODE_test.B_MembersInjector index 175f9d6c00d..dfb865dbf23 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_FAST_INIT_MODE_test.B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_supertypeMembersInjection_FAST_INIT_MODE_test.B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class B_MembersInjector implements MembersInjector { return new B_MembersInjector(sProvider); } - public static MembersInjector create(javax.inject.Provider sProvider) { - return new B_MembersInjector(Providers.asDaggerProvider(sProvider)); - } - @Override public void injectMembers(B instance) { injectS(instance, sProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.A_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.A_MembersInjector index dafed929d09..e052d486fec 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.A_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.A_MembersInjector @@ -2,10 +2,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -33,10 +32,6 @@ public final class A_MembersInjector implements MembersInjector { return new A_MembersInjector(valueBProvider); } - public static MembersInjector create(javax.inject.Provider valueBProvider) { - return new A_MembersInjector(Providers.asDaggerProvider(valueBProvider)); - } - @Override public void injectMembers(A instance) { B_MembersInjector.injectValueB(instance, valueBProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.B_MembersInjector index e9b28880e09..b6b3c83d0ab 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_DEFAULT_MODE_test.B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class B_MembersInjector implements MembersInjector { return new B_MembersInjector(valueBProvider); } - public static MembersInjector create(javax.inject.Provider valueBProvider) { - return new B_MembersInjector(Providers.asDaggerProvider(valueBProvider)); - } - @Override public void injectMembers(B instance) { injectValueB(instance, valueBProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.A_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.A_MembersInjector index dafed929d09..e052d486fec 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.A_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.A_MembersInjector @@ -2,10 +2,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -33,10 +32,6 @@ public final class A_MembersInjector implements MembersInjector { return new A_MembersInjector(valueBProvider); } - public static MembersInjector create(javax.inject.Provider valueBProvider) { - return new A_MembersInjector(Providers.asDaggerProvider(valueBProvider)); - } - @Override public void injectMembers(A instance) { B_MembersInjector.injectValueB(instance, valueBProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.B_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.B_MembersInjector index e9b28880e09..b6b3c83d0ab 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.B_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_testConstructorInjectedFieldInjection_FAST_INIT_MODE_test.B_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,10 +33,6 @@ public final class B_MembersInjector implements MembersInjector { return new B_MembersInjector(valueBProvider); } - public static MembersInjector create(javax.inject.Provider valueBProvider) { - return new B_MembersInjector(Providers.asDaggerProvider(valueBProvider)); - } - @Override public void injectMembers(B instance) { injectValueB(instance, valueBProvider.get()); diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_typeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_typeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector index ff27f6f9824..0932204a77a 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_typeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_typeUseNullableFieldInjection_DEFAULT_MODE_test.FieldInjection_MembersInjector @@ -3,10 +3,9 @@ package test; import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InjectedFieldSignature; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @QualifierMetadata @DaggerGenerated @@ -34,11 +33,6 @@ public final class FieldInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -49,4 +43,3 @@ public final class FieldInjection_MembersInjector implements MembersInjector create( - javax.inject.Provider stringProvider) { - return new FieldInjection_MembersInjector(Providers.asDaggerProvider(stringProvider)); - } - @Override public void injectMembers(FieldInjection instance) { injectString(instance, stringProvider.get()); @@ -49,4 +43,3 @@ public final class FieldInjection_MembersInjector implements MembersInjector> ParentModule_ProvideBElementFactory create( - ParentModule module, javax.inject.Provider bProvider) { - return new ParentModule_ProvideBElementFactory(module, Providers.asDaggerProvider(bProvider)); - } - public static > ParentModule_ProvideBElementFactory create( ParentModule module, Provider bProvider) { return new ParentModule_ProvideBElementFactory(module, bProvider); diff --git a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideBEntryFactory b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideBEntryFactory index 2834c396414..2cb17f0398c 100644 --- a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideBEntryFactory +++ b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideBEntryFactory @@ -3,11 +3,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; import dagger.internal.Preconditions; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -40,11 +39,6 @@ public final class ParentModule_ProvideBEntryFactory> ParentModule_ProvideBEntryFactory create( - ParentModule module, javax.inject.Provider bProvider) { - return new ParentModule_ProvideBEntryFactory(module, Providers.asDaggerProvider(bProvider)); - } - public static > ParentModule_ProvideBEntryFactory create( ParentModule module, Provider bProvider) { return new ParentModule_ProvideBEntryFactory(module, bProvider); diff --git a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideListBFactory b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideListBFactory index 72f948856e4..b81ccadfdc6 100644 --- a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideListBFactory +++ b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_genericSubclassedModule_test.ParentModule_ProvideListBFactory @@ -3,12 +3,11 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; import dagger.internal.Preconditions; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import java.util.List; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -41,11 +40,6 @@ public final class ParentModule_ProvideListBFactory> ParentModule_ProvideListBFactory create( - ParentModule module, javax.inject.Provider bProvider) { - return new ParentModule_ProvideListBFactory(module, Providers.asDaggerProvider(bProvider)); - } - public static > ParentModule_ProvideListBFactory create( ParentModule module, Provider bProvider) { return new ParentModule_ProvideListBFactory(module, bProvider); diff --git a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_multipleProvidesMethods_test.TestModule_ProvideObjectsFactory b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_multipleProvidesMethods_test.TestModule_ProvideObjectsFactory index a5f7daa8b50..8404200c18a 100644 --- a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_multipleProvidesMethods_test.TestModule_ProvideObjectsFactory +++ b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_multipleProvidesMethods_test.TestModule_ProvideObjectsFactory @@ -4,12 +4,11 @@ import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; import dagger.internal.Preconditions; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import java.util.List; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata({ @@ -52,12 +51,6 @@ public final class TestModule_ProvideObjectsFactory implements Factory aProvider, javax.inject.Provider bProvider, - javax.inject.Provider> xInjectorProvider) { - return new TestModule_ProvideObjectsFactory(module, Providers.asDaggerProvider(aProvider), Providers.asDaggerProvider(bProvider), Providers.asDaggerProvider(xInjectorProvider)); - } - public static TestModule_ProvideObjectsFactory create(TestModule module, Provider aProvider, Provider bProvider, Provider> xInjectorProvider) { diff --git a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_parameterizedModuleWithStaticProvidesMethodOfGenericType_test.ParameterizedModule_ProvideNonGenericTypeWithDepsFactory b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_parameterizedModuleWithStaticProvidesMethodOfGenericType_test.ParameterizedModule_ProvideNonGenericTypeWithDepsFactory index f0b08735cd1..d6d19ed6bbe 100644 --- a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_parameterizedModuleWithStaticProvidesMethodOfGenericType_test.ParameterizedModule_ProvideNonGenericTypeWithDepsFactory +++ b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_parameterizedModuleWithStaticProvidesMethodOfGenericType_test.ParameterizedModule_ProvideNonGenericTypeWithDepsFactory @@ -3,11 +3,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; import dagger.internal.Preconditions; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata @@ -37,11 +36,6 @@ public final class ParameterizedModule_ProvideNonGenericTypeWithDepsFactory impl return provideNonGenericTypeWithDeps(oProvider.get()); } - public static ParameterizedModule_ProvideNonGenericTypeWithDepsFactory create( - javax.inject.Provider oProvider) { - return new ParameterizedModule_ProvideNonGenericTypeWithDepsFactory(Providers.asDaggerProvider(oProvider)); - } - public static ParameterizedModule_ProvideNonGenericTypeWithDepsFactory create( Provider oProvider) { return new ParameterizedModule_ProvideNonGenericTypeWithDepsFactory(oProvider); diff --git a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_testQualifierMetadataOnProvides_test.MyModule_ProvideStringFactory b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_testQualifierMetadataOnProvides_test.MyModule_ProvideStringFactory index a7602962afd..df1f86f9604 100644 --- a/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_testQualifierMetadataOnProvides_test.MyModule_ProvideStringFactory +++ b/javatests/dagger/internal/codegen/goldens/ModuleFactoryGeneratorTest_testQualifierMetadataOnProvides_test.MyModule_ProvideStringFactory @@ -3,11 +3,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Factory; import dagger.internal.Preconditions; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.internal.QualifierMetadata; import dagger.internal.ScopeMetadata; import javax.annotation.processing.Generated; +import javax.inject.Provider; @ScopeMetadata @QualifierMetadata({ @@ -40,10 +39,6 @@ public final class MyModule_ProvideStringFactory implements Factory { return provideString(iProvider.get()); } - public static MyModule_ProvideStringFactory create(javax.inject.Provider iProvider) { - return new MyModule_ProvideStringFactory(Providers.asDaggerProvider(iProvider)); - } - public static MyModule_ProvideStringFactory create(Provider iProvider) { return new MyModule_ProvideStringFactory(iProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFutureWithProducerName_test.TestModule_ProduceStringFactory b/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFutureWithProducerName_test.TestModule_ProduceStringFactory index 7b625c9bc3b..f7037e96270 100644 --- a/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFutureWithProducerName_test.TestModule_ProduceStringFactory +++ b/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFutureWithProducerName_test.TestModule_ProduceStringFactory @@ -3,13 +3,12 @@ package test; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.producers.internal.AbstractProducesMethodProducer; import dagger.producers.monitoring.ProducerToken; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.Executor; import javax.annotation.processing.Generated; +import javax.inject.Provider; @DaggerGenerated @Generated( @@ -41,12 +40,6 @@ public final class TestModule_ProduceStringFactory extends AbstractProducesMetho return new TestModule_ProduceStringFactory(module, executorProvider, productionComponentMonitorProvider); } - public static TestModule_ProduceStringFactory create(TestModule module, - javax.inject.Provider executorProvider, - javax.inject.Provider productionComponentMonitorProvider) { - return new TestModule_ProduceStringFactory(module, Providers.asDaggerProvider(executorProvider), Providers.asDaggerProvider(productionComponentMonitorProvider)); - } - @Override protected ListenableFuture collectDependencies() { return Futures.immediateFuture(null); diff --git a/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFuture_test.TestModule_ProduceStringFactory b/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFuture_test.TestModule_ProduceStringFactory index 3125538c14d..283fd5363a9 100644 --- a/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFuture_test.TestModule_ProduceStringFactory +++ b/javatests/dagger/internal/codegen/goldens/ProducerModuleFactoryGeneratorTest_singleProducesMethodNoArgsFuture_test.TestModule_ProduceStringFactory @@ -3,13 +3,12 @@ package test; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import dagger.internal.DaggerGenerated; -import dagger.internal.Provider; -import dagger.internal.Providers; import dagger.producers.internal.AbstractProducesMethodProducer; import dagger.producers.monitoring.ProducerToken; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.Executor; import javax.annotation.processing.Generated; +import javax.inject.Provider; @DaggerGenerated @Generated( @@ -41,12 +40,6 @@ public final class TestModule_ProduceStringFactory extends AbstractProducesMetho return new TestModule_ProduceStringFactory(module, executorProvider, productionComponentMonitorProvider); } - public static TestModule_ProduceStringFactory create(TestModule module, - javax.inject.Provider executorProvider, - javax.inject.Provider productionComponentMonitorProvider) { - return new TestModule_ProduceStringFactory(module, Providers.asDaggerProvider(executorProvider), Providers.asDaggerProvider(productionComponentMonitorProvider)); - } - @Override protected ListenableFuture collectDependencies() { return Futures.immediateFuture(null);