diff --git a/java/dagger/internal/AbstractMapFactory.java b/java/dagger/internal/AbstractMapFactory.java index 1cf83fa1d04..22512e9d319 100644 --- a/java/dagger/internal/AbstractMapFactory.java +++ b/java/dagger/internal/AbstractMapFactory.java @@ -22,7 +22,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import javax.inject.Provider; /** * An {@code abstract} {@link Factory} implementation used to implement {@link Map} bindings. diff --git a/java/dagger/internal/DelegateFactory.java b/java/dagger/internal/DelegateFactory.java index 3b4a30f23c8..bc5cd9a2925 100644 --- a/java/dagger/internal/DelegateFactory.java +++ b/java/dagger/internal/DelegateFactory.java @@ -17,12 +17,11 @@ package dagger.internal; import static dagger.internal.Preconditions.checkNotNull; - -import javax.inject.Provider; +import static dagger.internal.Providers.asDaggerProvider; /** * A DelegateFactory that is used to stitch Provider/Lazy indirection based dependency cycles. - * + * * @since 2.0.1 */ public final class DelegateFactory implements Factory { @@ -43,6 +42,15 @@ public void setDelegatedProvider(Provider delegate) { setDelegate(this, delegate); } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public void setDelegatedProvider(javax.inject.Provider delegate) { + setDelegatedProvider(asDaggerProvider(delegate)); + } + /** * Sets {@code delegateFactory}'s delegate provider to {@code delegate}. * @@ -50,12 +58,28 @@ public void setDelegatedProvider(Provider delegate) { * method will throw a {@link ClassCastException}. */ public static void setDelegate(Provider delegateFactory, Provider delegate) { - checkNotNull(delegate); DelegateFactory asDelegateFactory = (DelegateFactory) delegateFactory; - if (asDelegateFactory.delegate != null) { + setDelegateInternal(asDelegateFactory, delegate); + } + + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public static void setDelegate( + javax.inject.Provider delegateFactory, javax.inject.Provider delegate) { + DelegateFactory asDelegateFactory = (DelegateFactory) delegateFactory; + setDelegateInternal(asDelegateFactory, asDaggerProvider(delegate)); + } + + private static void setDelegateInternal( + DelegateFactory delegateFactory, Provider delegate) { + checkNotNull(delegate); + if (delegateFactory.delegate != null) { throw new IllegalStateException(); } - asDelegateFactory.delegate = delegate; + delegateFactory.delegate = delegate; } /** @@ -67,4 +91,3 @@ Provider getDelegate() { return checkNotNull(delegate); } } - diff --git a/java/dagger/internal/DoubleCheck.java b/java/dagger/internal/DoubleCheck.java index af7d7f69a14..2c2e3ab9c7d 100644 --- a/java/dagger/internal/DoubleCheck.java +++ b/java/dagger/internal/DoubleCheck.java @@ -17,9 +17,9 @@ package dagger.internal; import static dagger.internal.Preconditions.checkNotNull; +import static dagger.internal.Providers.asDaggerProvider; import dagger.Lazy; -import javax.inject.Provider; /** * A {@link Lazy} and {@link Provider} implementation that memoizes the value returned from a @@ -73,7 +73,8 @@ private static Object reentrantCheck(Object currentInstance, Object newInstance) /** Returns a {@link Provider} that caches the value from the given delegate provider. */ // This method is declared this way instead of " Provider provider(Provider delegate)" // to work around an Eclipse type inference bug: https://github.com/google/dagger/issues/949. - public static

, T> Provider provider(P delegate) { + public static

, T> dagger.internal.Provider provider( + P delegate) { checkNotNull(delegate); if (delegate instanceof DoubleCheck) { /* This should be a rare case, but if we have a scoped @Binds that delegates to a scoped @@ -83,6 +84,16 @@ public static

, T> Provider provider(P delegate) { return new DoubleCheck(delegate); } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public static

, T> javax.inject.Provider provider( + P delegate) { + return provider(asDaggerProvider(delegate)); + } + /** Returns a {@link Lazy} that caches the value from the given provider. */ // This method is declared this way instead of " Lazy lazy(Provider delegate)" // to work around an Eclipse type inference bug: https://github.com/google/dagger/issues/949. @@ -99,4 +110,13 @@ public static

, T> Lazy lazy(P provider) { } return new DoubleCheck(checkNotNull(provider)); } + + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public static

, T> Lazy lazy(P provider) { + return lazy(asDaggerProvider(provider)); + } } diff --git a/java/dagger/internal/Factory.java b/java/dagger/internal/Factory.java index 9c03f81aa40..73bcfbc1367 100644 --- a/java/dagger/internal/Factory.java +++ b/java/dagger/internal/Factory.java @@ -18,7 +18,6 @@ import dagger.Provides; import javax.inject.Inject; -import javax.inject.Provider; import javax.inject.Scope; /** diff --git a/java/dagger/internal/MapFactory.java b/java/dagger/internal/MapFactory.java index 39748c9ade1..376cfdc1c09 100644 --- a/java/dagger/internal/MapFactory.java +++ b/java/dagger/internal/MapFactory.java @@ -17,12 +17,12 @@ package dagger.internal; import static dagger.internal.DaggerCollections.newLinkedHashMapWithExpectedSize; +import static dagger.internal.Providers.asDaggerProvider; import static java.util.Collections.unmodifiableMap; import java.util.Collections; import java.util.Map; import java.util.Map.Entry; -import javax.inject.Provider; /** * A {@link Factory} implementation used to implement {@link Map} bindings. This factory returns a @@ -72,12 +72,30 @@ public Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + @Override public Builder putAll(Provider> mapFactory) { super.putAll(mapFactory); return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder putAll(javax.inject.Provider> mapFactory) { + return putAll(asDaggerProvider(mapFactory)); + } + /** Returns a new {@link MapProviderFactory}. */ public MapFactory build() { return new MapFactory<>(map); diff --git a/java/dagger/internal/MapProviderFactory.java b/java/dagger/internal/MapProviderFactory.java index 1fe478856cf..8491ffc85e4 100644 --- a/java/dagger/internal/MapProviderFactory.java +++ b/java/dagger/internal/MapProviderFactory.java @@ -16,9 +16,12 @@ package dagger.internal; +import static dagger.internal.DaggerCollections.newLinkedHashMapWithExpectedSize; +import static dagger.internal.Providers.asDaggerProvider; + import dagger.Lazy; +import java.util.Collections; import java.util.Map; -import javax.inject.Provider; /** * A {@link Factory} implementation used to implement {@link Map} bindings. This factory returns a @@ -57,12 +60,43 @@ public Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + @Override public Builder putAll(Provider>> mapProviderFactory) { super.putAll(mapProviderFactory); return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder putAll( + final javax.inject.Provider>> mapProviderFactory) { + return putAll(new Provider>>() { + @Override public Map> get() { + Map> javaxMap = mapProviderFactory.get(); + if (javaxMap.isEmpty()) { + return Collections.emptyMap(); + } + Map> daggerMap = newLinkedHashMapWithExpectedSize(javaxMap.size()); + for (Map.Entry> e : javaxMap.entrySet()) { + daggerMap.put(e.getKey(), asDaggerProvider(e.getValue())); + } + return Collections.unmodifiableMap(daggerMap); + } + }); + } + /** Returns a new {@link MapProviderFactory}. */ public MapProviderFactory build() { return new MapProviderFactory<>(map); diff --git a/java/dagger/internal/Provider.java b/java/dagger/internal/Provider.java new file mode 100644 index 00000000000..e3886018779 --- /dev/null +++ b/java/dagger/internal/Provider.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2023 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.internal; + +/** + * Internal Provider interface to make support for {@code javax.inject.Provider} and + * {@code jakarta.inject.Provider} easier. Do not use outside of Dagger implementation code. + */ +// TODO(erichang): Make this also extend the Jakarta Provider +public interface Provider extends javax.inject.Provider { +} diff --git a/java/dagger/internal/ProviderOfLazy.java b/java/dagger/internal/ProviderOfLazy.java index 23b6afd7514..0430cbd6e04 100644 --- a/java/dagger/internal/ProviderOfLazy.java +++ b/java/dagger/internal/ProviderOfLazy.java @@ -17,9 +17,9 @@ package dagger.internal; import static dagger.internal.Preconditions.checkNotNull; +import static dagger.internal.Providers.asDaggerProvider; import dagger.Lazy; -import javax.inject.Provider; /** * A {@link Provider} of {@link Lazy} instances that each delegate to a given {@link Provider}. @@ -51,4 +51,13 @@ public Lazy get() { public static Provider> create(Provider provider) { return new ProviderOfLazy(checkNotNull(provider)); } + + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public static Provider> create(javax.inject.Provider provider) { + return create(asDaggerProvider(provider)); + } } diff --git a/java/dagger/internal/Providers.java b/java/dagger/internal/Providers.java new file mode 100644 index 00000000000..60ec83fa485 --- /dev/null +++ b/java/dagger/internal/Providers.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 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.internal; + +import static dagger.internal.Preconditions.checkNotNull; + +/** Helper class for utility functions dealing with Providers. */ +public final class Providers { + + /** Converts a javax provider to a Dagger internal provider. */ + public static Provider asDaggerProvider(final javax.inject.Provider provider) { + checkNotNull(provider); + return new Provider() { + @Override public T get() { + return provider.get(); + } + }; + } + + private Providers() {} +} diff --git a/java/dagger/internal/SetFactory.java b/java/dagger/internal/SetFactory.java index 349399b3e1f..f160767084a 100644 --- a/java/dagger/internal/SetFactory.java +++ b/java/dagger/internal/SetFactory.java @@ -20,6 +20,7 @@ import static dagger.internal.DaggerCollections.newHashSetWithExpectedSize; import static dagger.internal.DaggerCollections.presizedList; import static dagger.internal.Preconditions.checkNotNull; +import static dagger.internal.Providers.asDaggerProvider; import static java.util.Collections.emptySet; import static java.util.Collections.unmodifiableSet; @@ -27,7 +28,6 @@ import java.util.Collection; import java.util.List; import java.util.Set; -import javax.inject.Provider; /** * A {@link Factory} implementation used to implement {@link Set} bindings. This factory always @@ -73,6 +73,15 @@ public Builder addProvider(Provider individualProvider) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder addProvider(javax.inject.Provider individualProvider) { + return addProvider(asDaggerProvider(individualProvider)); + } + @SuppressWarnings("unchecked") public Builder addCollectionProvider( Provider> collectionProvider) { @@ -81,6 +90,16 @@ public Builder addCollectionProvider( return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder addCollectionProvider( + javax.inject.Provider> collectionProvider) { + return addCollectionProvider(asDaggerProvider(collectionProvider)); + } + public SetFactory build() { assert !hasDuplicates(individualProviders) : "Codegen error? Duplicates in the provider list"; diff --git a/java/dagger/internal/SingleCheck.java b/java/dagger/internal/SingleCheck.java index 41280699d3b..32ba83a6f1a 100644 --- a/java/dagger/internal/SingleCheck.java +++ b/java/dagger/internal/SingleCheck.java @@ -17,8 +17,7 @@ package dagger.internal; import static dagger.internal.Preconditions.checkNotNull; - -import javax.inject.Provider; +import static dagger.internal.Providers.asDaggerProvider; /** * A {@link Provider} implementation that memoizes the result of another {@link Provider} using @@ -58,7 +57,7 @@ public T get() { } /** Returns a {@link Provider} that caches the value from the given delegate provider. */ - // This method is declared this way instead of " Provider provider(Provider provider)" + // This method is declared this way instead of " Provider provider(Provider provider)" // to work around an Eclipse type inference bug: https://github.com/google/dagger/issues/949. public static

, T> Provider provider(P provider) { // If a scoped @Binds delegates to a scoped binding, don't cache the value again. @@ -67,4 +66,13 @@ public static

, T> Provider provider(P provider) { } return new SingleCheck(checkNotNull(provider)); } + + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + public static

, T> javax.inject.Provider provider( + P delegate) { + return provider(asDaggerProvider(delegate)); + } } diff --git a/java/dagger/internal/codegen/base/FrameworkTypes.java b/java/dagger/internal/codegen/base/FrameworkTypes.java index 59588caf5cb..e39aeabeadc 100644 --- a/java/dagger/internal/codegen/base/FrameworkTypes.java +++ b/java/dagger/internal/codegen/base/FrameworkTypes.java @@ -29,6 +29,7 @@ * type that the framework itself defines. */ public final class FrameworkTypes { + // TODO(erichang): Add the Jakarta Provider here private static final ImmutableSet PROVISION_TYPES = ImmutableSet.of(TypeNames.PROVIDER, TypeNames.LAZY, TypeNames.MEMBERS_INJECTOR); diff --git a/java/dagger/internal/codegen/base/MapType.java b/java/dagger/internal/codegen/base/MapType.java index 00401ed7234..c4ba838e878 100644 --- a/java/dagger/internal/codegen/base/MapType.java +++ b/java/dagger/internal/codegen/base/MapType.java @@ -115,6 +115,13 @@ public static boolean isMap(Key key) { return isMap(key.type().xprocessing()); } + public static boolean isMapOfProvider(XType keyType) { + if (MapType.isMap(keyType)) { + return MapType.from(keyType).valuesAreTypeOf(TypeNames.PROVIDER); + } + return false; + } + /** * Returns a {@link MapType} for {@code type}. * diff --git a/java/dagger/internal/codegen/base/OptionalType.java b/java/dagger/internal/codegen/base/OptionalType.java index 79b638d4a03..5544eaebabf 100644 --- a/java/dagger/internal/codegen/base/OptionalType.java +++ b/java/dagger/internal/codegen/base/OptionalType.java @@ -20,6 +20,7 @@ import static dagger.internal.codegen.extension.DaggerStreams.toImmutableMap; import static dagger.internal.codegen.extension.DaggerStreams.valuesOf; import static dagger.internal.codegen.xprocessing.XTypes.isDeclared; +import static dagger.internal.codegen.xprocessing.XTypes.isTypeOf; import androidx.room.compiler.processing.XType; import androidx.room.compiler.processing.XTypeElement; @@ -155,4 +156,14 @@ public static OptionalType from(XType type) { public static OptionalType from(Key key) { return from(key.type().xprocessing()); } + + public static boolean isOptionalProviderType(XType type) { + if (OptionalType.isOptional(type)) { + OptionalType optionalType = OptionalType.from(type); + if (isTypeOf(optionalType.valueType(), TypeNames.PROVIDER)) { + return true; + } + } + return false; + } } diff --git a/java/dagger/internal/codegen/binding/FrameworkField.java b/java/dagger/internal/codegen/binding/FrameworkField.java index b1d1cf91baf..a9f3bbfbd53 100644 --- a/java/dagger/internal/codegen/binding/FrameworkField.java +++ b/java/dagger/internal/codegen/binding/FrameworkField.java @@ -24,12 +24,14 @@ import static dagger.internal.codegen.xprocessing.XElements.getSimpleName; import androidx.room.compiler.processing.XElement; -import androidx.room.compiler.processing.XType; import com.google.auto.value.AutoValue; import com.google.common.base.CaseFormat; +import com.google.common.base.Preconditions; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeName; +import dagger.internal.codegen.base.MapType; +import dagger.internal.codegen.javapoet.TypeNames; import java.util.Optional; /** @@ -49,16 +51,17 @@ public abstract class FrameworkField { /** * Creates a framework field. * - * @param frameworkClassName the name of the framework class (e.g., {@link javax.inject.Provider}) - * @param valueTypeName the name of the type parameter of the framework class (e.g., {@code Foo} - * for {@code Provider} - * @param fieldName the name of the field + * @param fieldType the type of the framework field (e.g., {@code Provider}). + * @param fieldName the base name of the field. The name of the raw type of the field will be + * added as a suffix */ - public static FrameworkField create( - ClassName frameworkClassName, TypeName valueTypeName, String fieldName) { - String suffix = frameworkClassName.simpleName(); + public static FrameworkField create(TypeName fieldType, String fieldName) { + Preconditions.checkState( + fieldType instanceof ClassName || fieldType instanceof ParameterizedTypeName, + "Can only create a field with a class name or parameterized type name"); + String suffix = ((ClassName) TypeNames.rawTypeName(fieldType)).simpleName(); return new AutoValue_FrameworkField( - ParameterizedTypeName.get(frameworkClassName, valueTypeName), + fieldType, fieldName.endsWith(suffix) ? fieldName : fieldName + suffix); } @@ -71,15 +74,26 @@ public static FrameworkField create( public static FrameworkField forBinding( ContributionBinding binding, Optional frameworkClassName) { return create( - frameworkClassName.orElse(binding.frameworkType().frameworkClassName()), - fieldValueType(binding).getTypeName(), + fieldType(binding, frameworkClassName.orElse(binding.frameworkType().frameworkClassName())), frameworkFieldName(binding)); } - private static XType fieldValueType(ContributionBinding binding) { - return binding.contributionType().isMultibinding() - ? binding.contributedType() - : binding.key().type().xprocessing(); + private static TypeName fieldType(ContributionBinding binding, ClassName frameworkClassName) { + if (binding.contributionType().isMultibinding()) { + return ParameterizedTypeName.get(frameworkClassName, binding.contributedType().getTypeName()); + } + + // If the binding key type is a Map>, we need to change field type to a raw + // type. This is because it actually needs to be changed to Map>, + // but that gets into assignment issues when the field is passed to methods that expect + // Map>. We could add casts everywhere, but it is easier to just + // make the field itself a raw type. + if (MapType.isMapOfProvider(binding.contributedType())) { + return frameworkClassName; + } + + return ParameterizedTypeName.get( + frameworkClassName, binding.key().type().xprocessing().getTypeName()); } private static String frameworkFieldName(ContributionBinding binding) { @@ -104,7 +118,7 @@ private static String bindingElementName(XElement bindingElement) { } } - public abstract ParameterizedTypeName type(); + public abstract TypeName type(); public abstract String name(); } diff --git a/java/dagger/internal/codegen/binding/FrameworkType.java b/java/dagger/internal/codegen/binding/FrameworkType.java index ce3b149bc72..c99594892ad 100644 --- a/java/dagger/internal/codegen/binding/FrameworkType.java +++ b/java/dagger/internal/codegen/binding/FrameworkType.java @@ -96,7 +96,8 @@ public Expression to( case PROVIDER_OF_LAZY: return Expression.create( - from.type().rewrapType(TypeNames.LAZY).wrapType(TypeNames.PROVIDER), codeBlock); + from.type().rewrapType(TypeNames.LAZY).wrapType(TypeNames.DAGGER_PROVIDER), + codeBlock); case FUTURE: return Expression.create(from.type().rewrapType(TypeNames.LISTENABLE_FUTURE), codeBlock); @@ -178,7 +179,7 @@ public static Optional forRequestKind(RequestKind requestKind) { public ClassName frameworkClassName() { switch (this) { case PROVIDER: - return TypeNames.PROVIDER; + return TypeNames.DAGGER_PROVIDER; case PRODUCER_NODE: // TODO(cgdecker): Replace this with new class for representing internal producer nodes. // Currently the new class is CancellableProducer, but it may be changed to ProducerNode and diff --git a/java/dagger/internal/codegen/binding/SourceFiles.java b/java/dagger/internal/codegen/binding/SourceFiles.java index 19d316f3d40..e8a10753dea 100644 --- a/java/dagger/internal/codegen/binding/SourceFiles.java +++ b/java/dagger/internal/codegen/binding/SourceFiles.java @@ -95,11 +95,23 @@ public final class SourceFiles { return Maps.toMap( binding.dependencies(), - dependency -> - FrameworkField.create( - frameworkTypeMapper.getFrameworkType(dependency.kind()).frameworkClassName(), - dependency.key().type().xprocessing().getTypeName(), - DependencyVariableNamer.name(dependency))); + 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, + dependency.key().type().xprocessing().getTypeName()), + DependencyVariableNamer.name(dependency)); + }); } public CodeBlock frameworkTypeUsageStatement( diff --git a/java/dagger/internal/codegen/bootstrap/bootstrap_compiler_deploy.jar b/java/dagger/internal/codegen/bootstrap/bootstrap_compiler_deploy.jar index 69e859d4c02..6e4b0a96fb3 100644 Binary files a/java/dagger/internal/codegen/bootstrap/bootstrap_compiler_deploy.jar and b/java/dagger/internal/codegen/bootstrap/bootstrap_compiler_deploy.jar differ diff --git a/java/dagger/internal/codegen/javapoet/CodeBlocks.java b/java/dagger/internal/codegen/javapoet/CodeBlocks.java index 912dc71b813..29457e26774 100644 --- a/java/dagger/internal/codegen/javapoet/CodeBlocks.java +++ b/java/dagger/internal/codegen/javapoet/CodeBlocks.java @@ -18,7 +18,7 @@ import static com.squareup.javapoet.MethodSpec.methodBuilder; import static com.squareup.javapoet.TypeSpec.anonymousClassBuilder; -import static dagger.internal.codegen.javapoet.TypeNames.providerOf; +import static dagger.internal.codegen.javapoet.TypeNames.daggerProviderOf; import static java.util.stream.StreamSupport.stream; import static javax.lang.model.element.Modifier.PUBLIC; @@ -87,7 +87,7 @@ public static CodeBlock anonymousProvider(TypeName providedType, CodeBlock body) return CodeBlock.of( "$L", anonymousClassBuilder("") - .superclass(providerOf(providedType)) + .superclass(daggerProviderOf(providedType)) .addMethod( methodBuilder("get") .addAnnotation(Override.class) diff --git a/java/dagger/internal/codegen/javapoet/TypeNames.java b/java/dagger/internal/codegen/javapoet/TypeNames.java index 814022254e7..251ddbe3f63 100644 --- a/java/dagger/internal/codegen/javapoet/TypeNames.java +++ b/java/dagger/internal/codegen/javapoet/TypeNames.java @@ -69,6 +69,8 @@ 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 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 = ClassName.get("dagger.internal", "ProviderOfLazy"); public static final ClassName SCOPE_METADATA = ClassName.get("dagger.internal", "ScopeMetadata"); @@ -217,6 +219,10 @@ public static ParameterizedTypeName providerOf(TypeName typeName) { return ParameterizedTypeName.get(PROVIDER, typeName); } + public static ParameterizedTypeName daggerProviderOf(TypeName typeName) { + return ParameterizedTypeName.get(DAGGER_PROVIDER, typeName); + } + public static ParameterizedTypeName setOf(TypeName elementType) { return ParameterizedTypeName.get(SET, elementType); } diff --git a/java/dagger/internal/codegen/processingstep/AssistedFactoryProcessingStep.java b/java/dagger/internal/codegen/processingstep/AssistedFactoryProcessingStep.java index 3f714b0474e..ebd5d106dc1 100644 --- a/java/dagger/internal/codegen/processingstep/AssistedFactoryProcessingStep.java +++ b/java/dagger/internal/codegen/processingstep/AssistedFactoryProcessingStep.java @@ -23,6 +23,7 @@ import static dagger.internal.codegen.extension.DaggerStreams.toImmutableList; import static dagger.internal.codegen.javapoet.CodeBlocks.toParametersCodeBlock; import static dagger.internal.codegen.javapoet.TypeNames.INSTANCE_FACTORY; +import static dagger.internal.codegen.javapoet.TypeNames.daggerProviderOf; import static dagger.internal.codegen.javapoet.TypeNames.providerOf; import static dagger.internal.codegen.langmodel.Accessibility.accessibleTypeName; import static dagger.internal.codegen.xprocessing.MethodSpecs.overriding; @@ -314,12 +315,37 @@ public ImmutableList topLevelTypes(ProvisionBinding binding) { .map(param -> CodeBlock.of("$L", param.getJvmName())) .collect(toParametersCodeBlock())) .build()) + // In a future release, we should delete this javax method. 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. .addMethod( MethodSpec.methodBuilder("create") .addModifiers(PUBLIC, STATIC) .addParameter(delegateFactoryParam) .addTypeVariables(typeVariableNames(metadata.assistedInjectElement())) .returns(providerOf(factory.getType().getTypeName())) + .addStatement( + "return $T.$Lcreate(new $T($N))", + INSTANCE_FACTORY, + // Java 7 type inference requires the method call provide the exact type here. + isPreJava8SourceVersion(processingEnv) + ? CodeBlock.of( + "<$T>", + accessibleTypeName(metadata.factoryType(), name, processingEnv)) + : CodeBlock.of(""), + name, + delegateFactoryParam) + .build()) + // Normally we would have called this just "create", but because of backwards + // compatibility we can't have two methods with the same name/arguments returning + // different Provider types. + .addMethod( + MethodSpec.methodBuilder("createFactoryProvider") + .addModifiers(PUBLIC, STATIC) + .addParameter(delegateFactoryParam) + .addTypeVariables(typeVariableNames(metadata.assistedInjectElement())) + .returns(daggerProviderOf(factory.getType().getTypeName())) .addStatement( "return $T.$Lcreate(new $T($N))", INSTANCE_FACTORY, diff --git a/java/dagger/internal/codegen/writing/ComponentRequestRepresentations.java b/java/dagger/internal/codegen/writing/ComponentRequestRepresentations.java index 922fcb489ab..dd343168acc 100644 --- a/java/dagger/internal/codegen/writing/ComponentRequestRepresentations.java +++ b/java/dagger/internal/codegen/writing/ComponentRequestRepresentations.java @@ -27,13 +27,17 @@ import static dagger.internal.codegen.langmodel.Accessibility.isTypeAccessibleFrom; import static dagger.internal.codegen.xprocessing.MethodSpecs.overriding; import static dagger.internal.codegen.xprocessing.XElements.getSimpleName; +import static dagger.internal.codegen.xprocessing.XProcessingEnvs.isPreJava8SourceVersion; import androidx.room.compiler.processing.XMethodElement; +import androidx.room.compiler.processing.XProcessingEnv; import androidx.room.compiler.processing.XType; import com.google.common.collect.ImmutableList; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.MethodSpec; +import dagger.internal.codegen.base.MapType; +import dagger.internal.codegen.base.OptionalType; import dagger.internal.codegen.binding.Binding; import dagger.internal.codegen.binding.BindingGraph; import dagger.internal.codegen.binding.BindingRequest; @@ -69,6 +73,7 @@ public final class ComponentRequestRepresentations { private final ProvisionBindingRepresentation.Factory provisionBindingRepresentationFactory; private final ProductionBindingRepresentation.Factory productionBindingRepresentationFactory; private final Map representations = new HashMap<>(); + private final XProcessingEnv processingEnv; @Inject ComponentRequestRepresentations( @@ -78,7 +83,8 @@ public final class ComponentRequestRepresentations { ComponentRequirementExpressions componentRequirementExpressions, MembersInjectionBindingRepresentation.Factory membersInjectionBindingRepresentationFactory, ProvisionBindingRepresentation.Factory provisionBindingRepresentationFactory, - ProductionBindingRepresentation.Factory productionBindingRepresentationFactory) { + ProductionBindingRepresentation.Factory productionBindingRepresentationFactory, + XProcessingEnv processingEnv) { this.parent = parent; this.graph = graph; this.componentImplementation = componentImplementation; @@ -87,6 +93,7 @@ public final class ComponentRequestRepresentations { this.provisionBindingRepresentationFactory = provisionBindingRepresentationFactory; this.productionBindingRepresentationFactory = productionBindingRepresentationFactory; this.componentRequirementExpressions = checkNotNull(componentRequirementExpressions); + this.processingEnv = processingEnv; } /** @@ -232,6 +239,15 @@ private Expression getComponentMethodExpression( componentMethod.methodElement() .asMemberOf(componentImplementation.graph().componentTypeElement().getType()) .getReturnType(); + + // When compiling with -source 7, javac's type inference isn't strong enough to match things + // like Optional> to Optional>. + if (isPreJava8SourceVersion(processingEnv) + && (MapType.isMapOfProvider(returnType) + || OptionalType.isOptionalProviderType(returnType))) { + return expression.castTo(returnType.getRawType()); + } + return !isVoid(returnType) && !expression.type().isAssignableTo(returnType) ? expression.castTo(returnType) : expression; diff --git a/java/dagger/internal/codegen/writing/DelegateRequestRepresentation.java b/java/dagger/internal/codegen/writing/DelegateRequestRepresentation.java index 673a659fdc1..82c01cfe2e2 100644 --- a/java/dagger/internal/codegen/writing/DelegateRequestRepresentation.java +++ b/java/dagger/internal/codegen/writing/DelegateRequestRepresentation.java @@ -36,7 +36,9 @@ import dagger.internal.codegen.binding.BindsTypeChecker; import dagger.internal.codegen.binding.ContributionBinding; import dagger.internal.codegen.javapoet.Expression; +import dagger.internal.codegen.javapoet.TypeNames; import dagger.internal.codegen.model.RequestKind; +import dagger.internal.codegen.xprocessing.XTypes; /** A {@link dagger.internal.codegen.writing.RequestRepresentation} for {@code @Binds} methods. */ final class DelegateRequestRepresentation extends RequestRepresentation { @@ -88,8 +90,14 @@ Expression getDependencyExpression(ClassName requestingClass) { ? delegateExpression.castTo(contributedType) : delegateExpression; default: - return castToRawTypeIfNecessary( - delegateExpression, requestType(requestKind, contributedType, processingEnv)); + XType requestedType = requestType(requestKind, contributedType, processingEnv); + if (XTypes.isTypeOf(requestedType, TypeNames.PROVIDER)) { + // Even though the user may have requested a javax Provider, our generated code and + // factories only work in the Dagger Provider type, so swap to that one before doing + // a cast. + requestedType = XTypes.rewrapType(requestedType, TypeNames.DAGGER_PROVIDER); + } + return castToRawTypeIfNecessary(delegateExpression, requestedType); } } diff --git a/java/dagger/internal/codegen/writing/DependencyMethodProviderCreationExpression.java b/java/dagger/internal/codegen/writing/DependencyMethodProviderCreationExpression.java index 71bf1a79a64..c54b03cc40e 100644 --- a/java/dagger/internal/codegen/writing/DependencyMethodProviderCreationExpression.java +++ b/java/dagger/internal/codegen/writing/DependencyMethodProviderCreationExpression.java @@ -24,7 +24,7 @@ import static com.squareup.javapoet.MethodSpec.constructorBuilder; import static com.squareup.javapoet.MethodSpec.methodBuilder; import static com.squareup.javapoet.TypeSpec.classBuilder; -import static dagger.internal.codegen.javapoet.TypeNames.providerOf; +import static dagger.internal.codegen.javapoet.TypeNames.daggerProviderOf; import static dagger.internal.codegen.writing.ComponentImplementation.TypeSpecKind.COMPONENT_PROVISION_FACTORY; import static dagger.internal.codegen.xprocessing.XElements.asMethod; import static dagger.internal.codegen.xprocessing.XElements.getSimpleName; @@ -121,7 +121,7 @@ public CodeBlock creationExpression() { componentShard.addType( COMPONENT_PROVISION_FACTORY, classBuilder(factoryClassName) - .addSuperinterface(providerOf(keyType)) + .addSuperinterface(daggerProviderOf(keyType)) .addModifiers(PRIVATE, STATIC, FINAL) .addField(dependencyClassName, dependency().variableName(), PRIVATE, FINAL) .addMethod( diff --git a/java/dagger/internal/codegen/writing/DerivedFromFrameworkInstanceRequestRepresentation.java b/java/dagger/internal/codegen/writing/DerivedFromFrameworkInstanceRequestRepresentation.java index 4095a600d91..f054e6a7e92 100644 --- a/java/dagger/internal/codegen/writing/DerivedFromFrameworkInstanceRequestRepresentation.java +++ b/java/dagger/internal/codegen/writing/DerivedFromFrameworkInstanceRequestRepresentation.java @@ -24,11 +24,13 @@ import dagger.assisted.Assisted; import dagger.assisted.AssistedFactory; import dagger.assisted.AssistedInject; +import dagger.internal.codegen.base.MapType; import dagger.internal.codegen.binding.BindsTypeChecker; import dagger.internal.codegen.binding.ComponentDescriptor.ComponentMethodDescriptor; import dagger.internal.codegen.binding.ContributionBinding; import dagger.internal.codegen.binding.FrameworkType; import dagger.internal.codegen.javapoet.Expression; +import dagger.internal.codegen.javapoet.TypeNames; import dagger.internal.codegen.model.BindingKind; import dagger.internal.codegen.model.RequestKind; @@ -59,30 +61,61 @@ final class DerivedFromFrameworkInstanceRequestRepresentation extends RequestRep @Override Expression getDependencyExpression(ClassName requestingClass) { - Expression expression = - frameworkType.to( - requestKind, - frameworkRequestRepresentation.getDependencyExpression(requestingClass), - processingEnv); - return requiresTypeCast(expression, requestingClass) - ? expression.castTo(binding.contributedType()) - : expression; + return getDependencyExpressionFromFrameworkExpression( + frameworkRequestRepresentation.getDependencyExpression(requestingClass), + requestingClass); } @Override Expression getDependencyExpressionForComponentMethod( ComponentMethodDescriptor componentMethod, ComponentImplementation component) { + return getDependencyExpressionFromFrameworkExpression( + frameworkRequestRepresentation + .getDependencyExpressionForComponentMethod(componentMethod, component), + component.name()); + } + + private Expression getDependencyExpressionFromFrameworkExpression( + Expression frameworkExpression, ClassName requestingClass) { Expression expression = frameworkType.to( requestKind, - frameworkRequestRepresentation.getDependencyExpressionForComponentMethod( - componentMethod, component), + frameworkExpression, processingEnv); - return requiresTypeCast(expression, component.name()) + + // If it is a map type we need to do a raw type cast. This is because a user requested field + // type like dagger.internal.Provider>> isn't always assignable + // from something like dagger.internal.Provider>> just due + // to variance issues. + if (MapType.isMapOfProvider(binding.contributedType())) { + return castMapOfProvider(expression, binding); + } + + return requiresTypeCast(expression, requestingClass) ? expression.castTo(binding.contributedType()) : expression; } + private Expression castMapOfProvider(Expression expression, ContributionBinding binding) { + switch (requestKind) { + case INSTANCE: + return expression.castTo(binding.contributedType()); + case PROVIDER: + case PROVIDER_OF_LAZY: + return expression.castTo(processingEnv.requireType(TypeNames.DAGGER_PROVIDER).getRawType()); + case LAZY: + return expression.castTo(processingEnv.requireType(TypeNames.LAZY).getRawType()); + case PRODUCER: + case FUTURE: + return expression.castTo(processingEnv.requireType(TypeNames.PRODUCER).getRawType()); + case PRODUCED: + return expression.castTo(processingEnv.requireType(TypeNames.PRODUCED).getRawType()); + + case MEMBERS_INJECTION: // fall through + } + throw new IllegalStateException("Unexpected request kind: " + requestKind); + } + private boolean requiresTypeCast(Expression expression, ClassName requestingClass) { return binding.kind().equals(BindingKind.DELEGATE) && requestKind.equals(RequestKind.INSTANCE) diff --git a/java/dagger/internal/codegen/writing/FrameworkFieldInitializer.java b/java/dagger/internal/codegen/writing/FrameworkFieldInitializer.java index 5a981773e21..32f0dde0422 100644 --- a/java/dagger/internal/codegen/writing/FrameworkFieldInitializer.java +++ b/java/dagger/internal/codegen/writing/FrameworkFieldInitializer.java @@ -142,8 +142,9 @@ private FieldSpec getOrCreateField() { FrameworkField.forBinding( binding, frameworkInstanceCreationExpression.alternativeFrameworkClass()); - TypeName fieldType = - useRawType ? contributionBindingField.type().rawType : contributionBindingField.type(); + TypeName fieldType = useRawType + ? TypeNames.rawTypeName(contributionBindingField.type()) + : contributionBindingField.type(); if (binding.kind() == BindingKind.ASSISTED_INJECTION) { // An assisted injection factory doesn't extend Provider, so we reference the generated diff --git a/java/dagger/internal/codegen/writing/InjectionOrProvisionProviderCreationExpression.java b/java/dagger/internal/codegen/writing/InjectionOrProvisionProviderCreationExpression.java index d32531bef64..27e017dba2b 100644 --- a/java/dagger/internal/codegen/writing/InjectionOrProvisionProviderCreationExpression.java +++ b/java/dagger/internal/codegen/writing/InjectionOrProvisionProviderCreationExpression.java @@ -18,8 +18,15 @@ import static com.google.common.base.Preconditions.checkNotNull; import static dagger.internal.codegen.binding.SourceFiles.generatedClassNameForBinding; +import static dagger.internal.codegen.extension.DaggerCollectors.toOptional; +import static dagger.internal.codegen.model.BindingKind.ASSISTED_FACTORY; import static dagger.internal.codegen.model.BindingKind.INJECTION; +import static dagger.internal.codegen.xprocessing.XElements.getSimpleName; +import androidx.room.compiler.processing.XMethodElement; +import androidx.room.compiler.processing.XProcessingEnv; +import androidx.room.compiler.processing.XTypeElement; +import com.squareup.javapoet.ClassName; import com.squareup.javapoet.CodeBlock; import dagger.assisted.Assisted; import dagger.assisted.AssistedFactory; @@ -29,6 +36,7 @@ import dagger.internal.codegen.javapoet.TypeNames; import dagger.internal.codegen.writing.ComponentImplementation.ShardImplementation; import dagger.internal.codegen.writing.FrameworkFieldInitializer.FrameworkInstanceCreationExpression; +import java.util.Optional; import javax.inject.Provider; /** @@ -42,32 +50,64 @@ final class InjectionOrProvisionProviderCreationExpression private final ContributionBinding binding; private final ShardImplementation shardImplementation; private final ComponentRequestRepresentations componentRequestRepresentations; + private final XProcessingEnv processingEnv; @AssistedInject InjectionOrProvisionProviderCreationExpression( @Assisted ContributionBinding binding, ComponentImplementation componentImplementation, - ComponentRequestRepresentations componentRequestRepresentations) { + ComponentRequestRepresentations componentRequestRepresentations, + XProcessingEnv processingEnv) { this.binding = checkNotNull(binding); this.shardImplementation = componentImplementation.shardImplementation(binding); this.componentRequestRepresentations = componentRequestRepresentations; + this.processingEnv = processingEnv; } @Override public CodeBlock creationExpression() { + ClassName factoryImpl = generatedClassNameForBinding(binding); CodeBlock createFactory = CodeBlock.of( - "$T.create($L)", - generatedClassNameForBinding(binding), + "$T.$L($L)", + factoryImpl, + // A different name is used for assisted factories due to backwards compatibility + // issues when migrating from the javax Provider. + binding.kind().equals(ASSISTED_FACTORY) ? "createFactoryProvider" : "create", componentRequestRepresentations.getCreateMethodArgumentsCodeBlock( binding, shardImplementation.name())); + // If this is for an AssistedFactory, then we may need to change the call in case we're building + // against a library built at an older version of Dagger before the changes to make factories + // return a Dagger Provider instead of a javax.inject.Provider. + if (binding.kind().equals(ASSISTED_FACTORY)) { + XTypeElement factoryType = processingEnv.findTypeElement(factoryImpl); + // If we can't find the factory, then assume it is being generated this run, which means + // it should be the newer version and not need wrapping. If it is missing for some other + // reason, then that likely means there will just be some other compilation failure. + if (factoryType != null) { + Optional createMethod = factoryType.getDeclaredMethods().stream() + .filter(method -> method.isStatic() + && getSimpleName(method).equals("createFactoryProvider")) + .collect(toOptional()); + // Only convert it if the newer method doesn't exist. + if (createMethod.isEmpty()) { + createFactory = CodeBlock.of( + "$T.asDaggerProvider($T.create($L))", + TypeNames.DAGGER_PROVIDERS, + factoryImpl, + componentRequestRepresentations.getCreateMethodArgumentsCodeBlock( + binding, shardImplementation.name())); + } + } + } + // When scoping a parameterized factory for an @Inject class, Java 7 cannot always infer the // type properly, so cast to a raw framework type before scoping. if (binding.kind().equals(INJECTION) && binding.unresolved().isPresent() && binding.scope().isPresent()) { - return CodeBlocks.cast(createFactory, TypeNames.PROVIDER); + return CodeBlocks.cast(createFactory, TypeNames.DAGGER_PROVIDER); } else { return createFactory; } diff --git a/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java b/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java index ea2233c44b5..36a99159113 100644 --- a/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java +++ b/java/dagger/internal/codegen/writing/MembersInjectorGenerator.java @@ -147,7 +147,9 @@ public ImmutableList topLevelTypes(MembersInjectionBinding bin dependency.key().type().xprocessing(), generatedTypeName.packageName()); String fieldName = fieldNames.getUniqueName(bindingField.name()); - TypeName fieldType = useRawFrameworkType ? bindingField.type().rawType : bindingField.type(); + TypeName fieldType = useRawFrameworkType + ? TypeNames.rawTypeName(bindingField.type()) + : bindingField.type(); FieldSpec.Builder fieldBuilder = FieldSpec.builder(fieldType, fieldName, PRIVATE, FINAL); ParameterSpec.Builder parameterBuilder = ParameterSpec.builder(fieldType, fieldName); diff --git a/java/dagger/internal/codegen/writing/OptionalFactories.java b/java/dagger/internal/codegen/writing/OptionalFactories.java index 446f231e025..3c327e8bc53 100644 --- a/java/dagger/internal/codegen/writing/OptionalFactories.java +++ b/java/dagger/internal/codegen/writing/OptionalFactories.java @@ -28,8 +28,8 @@ import static dagger.internal.codegen.javapoet.AnnotationSpecs.Suppression.RAWTYPES; import static dagger.internal.codegen.javapoet.AnnotationSpecs.Suppression.UNCHECKED; import static dagger.internal.codegen.javapoet.TypeNames.abstractProducerOf; +import static dagger.internal.codegen.javapoet.TypeNames.daggerProviderOf; import static dagger.internal.codegen.javapoet.TypeNames.listenableFutureOf; -import static dagger.internal.codegen.javapoet.TypeNames.providerOf; import static dagger.internal.codegen.writing.ComponentImplementation.FieldSpecKind.ABSENT_OPTIONAL_FIELD; import static dagger.internal.codegen.writing.ComponentImplementation.MethodSpecKind.ABSENT_OPTIONAL_METHOD; import static dagger.internal.codegen.writing.ComponentImplementation.TypeSpecKind.PRESENT_FACTORY; @@ -147,15 +147,15 @@ private MethodSpec absentOptionalProviderMethod(OptionalKind optionalKind) { "absent%sProvider", UPPER_UNDERSCORE.to(UPPER_CAMEL, optionalKind.name()))) .addModifiers(PRIVATE, STATIC) .addTypeVariable(typeVariable) - .returns(providerOf(optionalKind.of(typeVariable))) + .returns(daggerProviderOf(optionalKind.of(typeVariable))) .addJavadoc( "Returns a {@link $T} that returns {@code $L}.", - TypeNames.PROVIDER, + TypeNames.DAGGER_PROVIDER, optionalKind.absentValueExpression()) .addCode("$L // safe covariant cast\n", AnnotationSpecs.suppressWarnings(UNCHECKED)) .addStatement( "$1T provider = ($1T) $2N", - providerOf(optionalKind.of(typeVariable)), + daggerProviderOf(optionalKind.of(typeVariable)), perGeneratedFileCache.absentOptionalProviderFields.computeIfAbsent( optionalKind, kind -> { @@ -173,7 +173,7 @@ private MethodSpec absentOptionalProviderMethod(OptionalKind optionalKind) { */ private FieldSpec absentOptionalProviderField(OptionalKind optionalKind) { return FieldSpec.builder( - TypeNames.PROVIDER, + TypeNames.DAGGER_PROVIDER, String.format("ABSENT_%s_PROVIDER", optionalKind.name()), PRIVATE, STATIC, @@ -182,7 +182,7 @@ private FieldSpec absentOptionalProviderField(OptionalKind optionalKind) { .initializer("$T.create($L)", InstanceFactory.class, optionalKind.absentValueExpression()) .addJavadoc( "A {@link $T} that returns {@code $L}.", - TypeNames.PROVIDER, + TypeNames.DAGGER_PROVIDER, optionalKind.absentValueExpression()) .build(); } diff --git a/java/dagger/internal/codegen/writing/OptionalRequestRepresentation.java b/java/dagger/internal/codegen/writing/OptionalRequestRepresentation.java index ab6bb41fc2e..8c92191971d 100644 --- a/java/dagger/internal/codegen/writing/OptionalRequestRepresentation.java +++ b/java/dagger/internal/codegen/writing/OptionalRequestRepresentation.java @@ -33,6 +33,7 @@ import dagger.internal.codegen.binding.ProvisionBinding; import dagger.internal.codegen.javapoet.Expression; import dagger.internal.codegen.model.DependencyRequest; +import dagger.internal.codegen.model.RequestKind; /** A binding expression for optional bindings. */ final class OptionalRequestRepresentation extends RequestRepresentation { @@ -79,8 +80,11 @@ Expression getDependencyExpression(ClassName requestingClass) { .getDependencyExpression(bindingRequest(dependency), requestingClass) .codeBlock(); - return isTypeAccessibleFrom( - dependency.key().type().xprocessing(), requestingClass.packageName()) + boolean needsObjectExpression = !isTypeAccessibleFrom( + dependency.key().type().xprocessing(), requestingClass.packageName()) + || (isPreJava8SourceVersion(processingEnv) && dependency.kind() == RequestKind.PROVIDER); + + return !needsObjectExpression ? Expression.create( binding.key().type().xprocessing(), optionalKind.presentExpression(dependencyExpression)) diff --git a/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java b/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java index b68c1be51b4..1d8ab02f748 100644 --- a/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java +++ b/java/dagger/internal/codegen/writing/ProducerFactoryGenerator.java @@ -160,7 +160,7 @@ public ImmutableList topLevelTypes(ProductionBinding binding) addFieldAndConstructorParameter( factoryBuilder, constructorBuilder, fieldName, bindingField.type()); fieldsBuilder.put(dependency, field); - frameworkFieldAssignments.add(fieldAssignment(field, bindingField.type())); + frameworkFieldAssignments.add(fieldAssignment(field, bindingField)); } } ImmutableMap fields = fieldsBuilder.build(); @@ -257,9 +257,10 @@ private static FieldSpec addFieldAndConstructorParameter( return field; } - private static CodeBlock fieldAssignment(FieldSpec field, ParameterizedTypeName type) { + private static CodeBlock fieldAssignment(FieldSpec field, FrameworkField frameworkField) { CodeBlock.Builder statement = CodeBlock.builder(); - if (type != null && type.rawType.equals(TypeNames.PRODUCER)) { + if (frameworkField.type() != null + && TypeNames.rawTypeName(frameworkField.type()).equals(TypeNames.PRODUCER)) { statement.addStatement( "this.$1N = $2T.nonCancellationPropagatingViewOf($1N)", field, TypeNames.PRODUCERS); } else { diff --git a/java/dagger/internal/codegen/writing/StaticMemberSelects.java b/java/dagger/internal/codegen/writing/StaticMemberSelects.java index 3fea6173f5d..a1ea63c031d 100644 --- a/java/dagger/internal/codegen/writing/StaticMemberSelects.java +++ b/java/dagger/internal/codegen/writing/StaticMemberSelects.java @@ -22,11 +22,11 @@ import static dagger.internal.codegen.binding.SourceFiles.generatedClassNameForBinding; import static dagger.internal.codegen.binding.SourceFiles.setFactoryClassName; import static dagger.internal.codegen.javapoet.CodeBlocks.toParametersCodeBlock; +import static dagger.internal.codegen.javapoet.TypeNames.DAGGER_PROVIDER; import static dagger.internal.codegen.javapoet.TypeNames.FACTORY; import static dagger.internal.codegen.javapoet.TypeNames.MAP_FACTORY; import static dagger.internal.codegen.javapoet.TypeNames.PRODUCER; import static dagger.internal.codegen.javapoet.TypeNames.PRODUCERS; -import static dagger.internal.codegen.javapoet.TypeNames.PROVIDER; import static dagger.internal.codegen.langmodel.Accessibility.isTypeAccessibleFrom; import static dagger.internal.codegen.xprocessing.XTypes.isDeclared; @@ -52,7 +52,7 @@ static MemberSelect emptyMapFactory(Binding binding) { ? new ParameterizedStaticMethod( PRODUCERS, typeParameters, CodeBlock.of("emptyMapProducer()"), PRODUCER) : new ParameterizedStaticMethod( - MAP_FACTORY, typeParameters, CodeBlock.of("emptyMapProvider()"), PROVIDER); + MAP_FACTORY, typeParameters, CodeBlock.of("emptyMapProvider()"), DAGGER_PROVIDER); } /** diff --git a/java/dagger/internal/codegen/writing/SwitchingProviders.java b/java/dagger/internal/codegen/writing/SwitchingProviders.java index e6c3bbf524b..736f51529e7 100644 --- a/java/dagger/internal/codegen/writing/SwitchingProviders.java +++ b/java/dagger/internal/codegen/writing/SwitchingProviders.java @@ -24,7 +24,7 @@ import static dagger.internal.codegen.extension.DaggerStreams.toImmutableList; import static dagger.internal.codegen.javapoet.AnnotationSpecs.Suppression.UNCHECKED; import static dagger.internal.codegen.javapoet.AnnotationSpecs.suppressWarnings; -import static dagger.internal.codegen.javapoet.TypeNames.providerOf; +import static dagger.internal.codegen.javapoet.TypeNames.daggerProviderOf; import static javax.lang.model.element.Modifier.FINAL; import static javax.lang.model.element.Modifier.PRIVATE; import static javax.lang.model.element.Modifier.PUBLIC; @@ -172,7 +172,7 @@ private TypeSpec build() { classBuilder(switchingProviderType) .addModifiers(PRIVATE, FINAL, STATIC) .addTypeVariable(T) - .addSuperinterface(providerOf(T)) + .addSuperinterface(daggerProviderOf(T)) .addMethods(getMethods()); // The SwitchingProvider constructor lists all component parameters first and switch id last. diff --git a/java/dagger/producers/internal/AbstractMapProducer.java b/java/dagger/producers/internal/AbstractMapProducer.java index c60f0cb07fb..360f1eb8e10 100644 --- a/java/dagger/producers/internal/AbstractMapProducer.java +++ b/java/dagger/producers/internal/AbstractMapProducer.java @@ -17,12 +17,13 @@ package dagger.producers.internal; import static com.google.common.base.Preconditions.checkNotNull; +import static dagger.internal.Providers.asDaggerProvider; import static dagger.producers.internal.Producers.producerFromProvider; import com.google.common.collect.ImmutableMap; +import dagger.internal.Provider; import dagger.producers.Producer; import java.util.Map; -import javax.inject.Provider; /** * An {@code abstract} {@link Producer} implementation used to implement {@link Map} bindings. @@ -76,6 +77,15 @@ Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + /** Adds contributions from a super-implementation of a component into this builder. */ Builder putAll(Producer> mapOfProducers) { if (mapOfProducers instanceof DelegateProducer) { diff --git a/java/dagger/producers/internal/AbstractProducesMethodProducer.java b/java/dagger/producers/internal/AbstractProducesMethodProducer.java index 0cf36ca5315..95b8f8340da 100644 --- a/java/dagger/producers/internal/AbstractProducesMethodProducer.java +++ b/java/dagger/producers/internal/AbstractProducesMethodProducer.java @@ -17,15 +17,16 @@ package dagger.producers.internal; import static dagger.internal.Preconditions.checkNotNull; +import static dagger.internal.Providers.asDaggerProvider; import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import dagger.internal.Provider; import dagger.producers.monitoring.ProducerMonitor; import dagger.producers.monitoring.ProducerToken; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.Executor; -import javax.inject.Provider; import org.checkerframework.checker.nullness.compatqual.NullableDecl; /** @@ -54,6 +55,18 @@ protected AbstractProducesMethodProducer( this.executorProvider = checkNotNull(executorProvider); } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + protected AbstractProducesMethodProducer( + javax.inject.Provider monitorProvider, + @NullableDecl ProducerToken token, + javax.inject.Provider executorProvider) { + this(asDaggerProvider(monitorProvider), token, asDaggerProvider(executorProvider)); + } + @Override protected final ListenableFuture compute() { monitor = monitorProvider.get().producerMonitorFor(token); diff --git a/java/dagger/producers/internal/DelegateProducer.java b/java/dagger/producers/internal/DelegateProducer.java index 6cc7547c35c..de29234acc0 100644 --- a/java/dagger/producers/internal/DelegateProducer.java +++ b/java/dagger/producers/internal/DelegateProducer.java @@ -20,8 +20,8 @@ import com.google.common.util.concurrent.ListenableFuture; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.producers.Producer; -import javax.inject.Provider; /** * A DelegateProducer that is used to stitch Producer indirection during initialization across diff --git a/java/dagger/producers/internal/MapOfProducedProducer.java b/java/dagger/producers/internal/MapOfProducedProducer.java index bd9f1bfcc80..3db7740949a 100644 --- a/java/dagger/producers/internal/MapOfProducedProducer.java +++ b/java/dagger/producers/internal/MapOfProducedProducer.java @@ -18,6 +18,7 @@ import static com.google.common.util.concurrent.Futures.transform; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; +import static dagger.internal.Providers.asDaggerProvider; import com.google.common.base.Function; import com.google.common.collect.ImmutableMap; @@ -25,11 +26,11 @@ import com.google.common.collect.Maps; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import dagger.internal.Provider; import dagger.producers.Produced; import dagger.producers.Producer; import java.util.List; import java.util.Map; -import javax.inject.Provider; /** * A {@link Producer} implementation used to implement {@link Map} bindings. This producer returns a @@ -108,6 +109,15 @@ public Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + @Override public Builder putAll(Producer>> mapOfProducedProducer) { super.putAll(mapOfProducedProducer); diff --git a/java/dagger/producers/internal/MapOfProducerProducer.java b/java/dagger/producers/internal/MapOfProducerProducer.java index 064cf74996e..145ea6db60b 100644 --- a/java/dagger/producers/internal/MapOfProducerProducer.java +++ b/java/dagger/producers/internal/MapOfProducerProducer.java @@ -16,6 +16,7 @@ package dagger.producers.internal; +import static dagger.internal.Providers.asDaggerProvider; import static dagger.producers.internal.Producers.entryPointViewOf; import static dagger.producers.internal.Producers.nonCancellationPropagatingViewOf; @@ -24,9 +25,9 @@ import com.google.common.collect.Maps; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import dagger.internal.Provider; import dagger.producers.Producer; import java.util.Map; -import javax.inject.Provider; /** * A {@link Producer} implementation used to implement {@link Map} bindings. This factory returns an @@ -65,6 +66,15 @@ public Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + @Override public Builder putAll(Producer>> mapOfProducerProducer) { super.putAll(mapOfProducerProducer); diff --git a/java/dagger/producers/internal/MapProducer.java b/java/dagger/producers/internal/MapProducer.java index 8caeb45cb5b..c832ef402a9 100644 --- a/java/dagger/producers/internal/MapProducer.java +++ b/java/dagger/producers/internal/MapProducer.java @@ -17,18 +17,19 @@ package dagger.producers.internal; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; +import static dagger.internal.Providers.asDaggerProvider; import com.google.common.base.Function; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import dagger.internal.Provider; import dagger.producers.Producer; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import javax.inject.Provider; /** * A {@link Producer} implementation used to implement {@link Map} bindings. This producer returns a @@ -62,6 +63,15 @@ public Builder put(K key, Provider providerOfValue) { return this; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public Builder put(K key, javax.inject.Provider providerOfValue) { + return put(key, asDaggerProvider(providerOfValue)); + } + @Override public Builder putAll(Producer> mapProducer) { super.putAll(mapProducer); diff --git a/java/dagger/producers/internal/Producers.java b/java/dagger/producers/internal/Producers.java index 54e4d5ee33b..9385ee3267e 100644 --- a/java/dagger/producers/internal/Producers.java +++ b/java/dagger/producers/internal/Producers.java @@ -20,6 +20,7 @@ import static com.google.common.util.concurrent.Futures.catchingAsync; import static com.google.common.util.concurrent.Futures.transform; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; +import static dagger.internal.Providers.asDaggerProvider; import com.google.common.base.Function; import com.google.common.collect.ImmutableMap; @@ -27,12 +28,12 @@ import com.google.common.util.concurrent.AsyncFunction; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; +import dagger.internal.Provider; import dagger.producers.Produced; import dagger.producers.Producer; import java.util.List; import java.util.Map; import java.util.Set; -import javax.inject.Provider; /** * Utility methods for use in generated producer code. @@ -134,6 +135,15 @@ public ListenableFuture get() { }; } + /** + * Legacy javax version of the method to support libraries compiled with an older version of + * Dagger. Do not use directly. + */ + @Deprecated + public static Producer producerFromProvider(final javax.inject.Provider provider) { + return producerFromProvider(asDaggerProvider(provider)); + } + /** * Returns a producer that succeeds with the given value. * diff --git a/javatests/dagger/functional/kotlinsrc/membersinject/MembersInjectTest.kt b/javatests/dagger/functional/kotlinsrc/membersinject/MembersInjectTest.kt index 2fc44258fdb..e7a751f2761 100644 --- a/javatests/dagger/functional/kotlinsrc/membersinject/MembersInjectTest.kt +++ b/javatests/dagger/functional/kotlinsrc/membersinject/MembersInjectTest.kt @@ -23,8 +23,8 @@ import dagger.MembersInjector import dagger.functional.kotlinsrc.membersinject.subpackage.a.AGrandchild import dagger.functional.kotlinsrc.membersinject.subpackage.a.AParent import dagger.functional.kotlinsrc.membersinject.subpackage.b.BChild +import dagger.internal.Provider import javax.inject.Inject -import javax.inject.Provider import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @@ -85,7 +85,9 @@ class MembersInjectTest { } class A : B() // No injected members + open class B : C() // No injected members + open class C { @Inject lateinit var value: String } diff --git a/javatests/dagger/functional/membersinject/MembersInjectTest.java b/javatests/dagger/functional/membersinject/MembersInjectTest.java index 06e17f9e67e..c6a13dd0d79 100644 --- a/javatests/dagger/functional/membersinject/MembersInjectTest.java +++ b/javatests/dagger/functional/membersinject/MembersInjectTest.java @@ -24,8 +24,8 @@ import dagger.functional.membersinject.subpackage.a.AGrandchild; import dagger.functional.membersinject.subpackage.a.AParent; import dagger.functional.membersinject.subpackage.b.BChild; +import dagger.internal.Provider; import javax.inject.Inject; -import javax.inject.Provider; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/javatests/dagger/functional/producers/ProducerFactoryTest.java b/javatests/dagger/functional/producers/ProducerFactoryTest.java index 6df526e2539..f821ab9c103 100644 --- a/javatests/dagger/functional/producers/ProducerFactoryTest.java +++ b/javatests/dagger/functional/producers/ProducerFactoryTest.java @@ -25,6 +25,7 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; +import dagger.internal.Provider; import dagger.producers.Producer; import dagger.producers.internal.AbstractProducer; import dagger.producers.internal.CancellableProducer; @@ -33,7 +34,6 @@ import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; -import javax.inject.Provider; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -55,7 +55,6 @@ public void setUpMocks() { MockitoAnnotations.initMocks(this); monitor = Mockito.mock(ProducerMonitor.class, Mockito.CALLS_REAL_METHODS); when(componentMonitor.producerMonitorFor(any(ProducerToken.class))).thenReturn(monitor); - // TODO(beder): Use Providers.of when available. executorProvider = new Provider() { @Override diff --git a/javatests/dagger/internal/DoubleCheckTest.java b/javatests/dagger/internal/DoubleCheckTest.java index e36c1bceee7..6bf220d3694 100644 --- a/javatests/dagger/internal/DoubleCheckTest.java +++ b/javatests/dagger/internal/DoubleCheckTest.java @@ -32,7 +32,6 @@ import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; -import javax.inject.Provider; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/javatests/dagger/internal/MapProviderFactoryTest.java b/javatests/dagger/internal/MapProviderFactoryTest.java index c55bee3abf4..e64df8dadf9 100644 --- a/javatests/dagger/internal/MapProviderFactoryTest.java +++ b/javatests/dagger/internal/MapProviderFactoryTest.java @@ -21,7 +21,6 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import javax.inject.Provider; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; diff --git a/javatests/dagger/internal/SetFactoryTest.java b/javatests/dagger/internal/SetFactoryTest.java index 0032578c62a..5e109ddb6de 100644 --- a/javatests/dagger/internal/SetFactoryTest.java +++ b/javatests/dagger/internal/SetFactoryTest.java @@ -23,7 +23,6 @@ import java.util.LinkedHashSet; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import javax.inject.Provider; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; diff --git a/javatests/dagger/internal/codegen/FrameworkFieldTest.java b/javatests/dagger/internal/codegen/FrameworkFieldTest.java index be495d79b60..ba5b88f8c5c 100644 --- a/javatests/dagger/internal/codegen/FrameworkFieldTest.java +++ b/javatests/dagger/internal/codegen/FrameworkFieldTest.java @@ -24,6 +24,7 @@ import com.google.testing.compile.CompilationRule; import com.squareup.javapoet.ClassName; +import com.squareup.javapoet.ParameterizedTypeName; import dagger.internal.codegen.binding.FrameworkField; import javax.inject.Inject; import org.junit.Before; @@ -47,16 +48,20 @@ public class FrameworkFieldTest { } @Test public void frameworkType() { - assertThat(FrameworkField.create(PROVIDER, xTypeName, "test").type()) + assertThat(FrameworkField.create(ParameterizedTypeName.get(PROVIDER, xTypeName), "test").type()) .isEqualTo(providerOf(xTypeName)); - assertThat(FrameworkField.create(MEMBERS_INJECTOR, xTypeName, "test").type()) + assertThat( + FrameworkField.create(ParameterizedTypeName.get(MEMBERS_INJECTOR, xTypeName), "test") + .type()) .isEqualTo(membersInjectorOf(xTypeName)); } @Test public void nameSuffix() { - assertThat(FrameworkField.create(PROVIDER, xTypeName, "foo").name()) + assertThat(FrameworkField.create(ParameterizedTypeName.get(PROVIDER, xTypeName), "foo").name()) .isEqualTo("fooProvider"); - assertThat(FrameworkField.create(PROVIDER, xTypeName, "fooProvider").name()) + assertThat( + FrameworkField.create(ParameterizedTypeName.get(PROVIDER, xTypeName), "fooProvider") + .name()) .isEqualTo("fooProvider"); } diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_DEFAULT_MODE_test.DaggerTestComponent index 20f38ddd0cf..1dc3731decf 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_DEFAULT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -52,7 +52,7 @@ final class DaggerTestComponent { @SuppressWarnings("unchecked") private void initialize() { this.fooProvider = Foo_Factory.create(Bar_Factory.create()); - this.fooFactoryProvider = FooFactory_Impl.create(fooProvider); + this.fooFactoryProvider = FooFactory_Impl.createFactoryProvider(fooProvider); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_FAST_INIT_MODE_test.DaggerTestComponent index c76a5fbdd6b..2b7fd7dd9b9 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_assistedParamConflictsWithComponentFieldName_successfulyDeduped_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,9 +1,9 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_DEFAULT_MODE_test.DaggerTestComponent index 7b22b0018e6..5e232098ea4 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -57,7 +57,7 @@ final class DaggerTestComponent { this.fooFactoryProvider = new DelegateFactory<>(); this.barProvider = Bar_Factory.create(fooFactoryProvider); this.fooProvider = Foo_Factory.create(barProvider); - DelegateFactory.setDelegate(fooFactoryProvider, FooFactory_Impl.create(fooProvider)); + DelegateFactory.setDelegate(fooFactoryProvider, FooFactory_Impl.createFactoryProvider(fooProvider)); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_FAST_INIT_MODE_test.DaggerTestComponent index 48f517401b9..9d274ee88cc 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactoryCycle_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_DEFAULT_MODE_test.DaggerTestComponent index 20f38ddd0cf..1dc3731decf 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_DEFAULT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -52,7 +52,7 @@ final class DaggerTestComponent { @SuppressWarnings("unchecked") private void initialize() { this.fooProvider = Foo_Factory.create(Bar_Factory.create()); - this.fooFactoryProvider = FooFactory_Impl.create(fooProvider); + this.fooFactoryProvider = FooFactory_Impl.createFactoryProvider(fooProvider); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_FAST_INIT_MODE_test.DaggerTestComponent index 72f16729c63..dad9b81cc40 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testAssistedFactory_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,9 +1,9 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_DEFAULT_MODE_test.DaggerMyComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_DEFAULT_MODE_test.DaggerMyComponent index 4e5de7ad7d1..8c3febe0306 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_DEFAULT_MODE_test.DaggerMyComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_DEFAULT_MODE_test.DaggerMyComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -55,7 +55,7 @@ final class DaggerMyComponent { @SuppressWarnings("unchecked") private void initialize() { this.myAssistedClassProvider = MyAssistedClass_Factory.create(Baz_Factory.create()); - this.mySubcomponentAssistedFactoryProvider = MySubcomponentAssistedFactory_Impl.create(myAssistedClassProvider); + this.mySubcomponentAssistedFactoryProvider = MySubcomponentAssistedFactory_Impl.createFactoryProvider(myAssistedClassProvider); } @Override @@ -80,7 +80,7 @@ final class DaggerMyComponent { @SuppressWarnings("unchecked") private void initialize() { this.myAssistedClassProvider = MyAssistedClass_Factory.create(Baz_Factory.create()); - this.myComponentAssistedFactoryProvider = MyComponentAssistedFactory_Impl.create(myAssistedClassProvider); + this.myComponentAssistedFactoryProvider = MyComponentAssistedFactory_Impl.createFactoryProvider(myAssistedClassProvider); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_FAST_INIT_MODE_test.DaggerMyComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_FAST_INIT_MODE_test.DaggerMyComponent index 315ebc43cc8..c3ff0496082 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_FAST_INIT_MODE_test.DaggerMyComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testMultipleAssistedFactoryInDifferentComponents_FAST_INIT_MODE_test.DaggerMyComponent @@ -1,9 +1,9 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_DEFAULT_MODE_test.DaggerTestComponent index da1f53e7560..49ca94f50a8 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_DEFAULT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -52,7 +52,7 @@ final class DaggerTestComponent { @SuppressWarnings("unchecked") private void initialize() { this.fooProvider = Foo_Factory.create(); - this.fooFactoryProvider = FooFactory_Impl.create(fooProvider); + this.fooFactoryProvider = FooFactory_Impl.createFactoryProvider(fooProvider); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_FAST_INIT_MODE_test.DaggerTestComponent index a56b3e08442..1c1014d0110 100644 --- a/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/AssistedFactoryTest_testParameterizedAssistParam_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,9 +1,9 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_DEFAULT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_DEFAULT_MODE_test.DaggerBComponent index a3127fbf0eb..907c44dc0cc 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_DEFAULT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_DEFAULT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_FAST_INIT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_FAST_INIT_MODE_test.DaggerBComponent index bb09e8b6e49..a6dcfd18bce 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_FAST_INIT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_arrayComponentDependency_FAST_INIT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_DEFAULT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_DEFAULT_MODE_test.DaggerBComponent index eb9476a7b65..9d190e56850 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_DEFAULT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_DEFAULT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_FAST_INIT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_FAST_INIT_MODE_test.DaggerBComponent index 7a97ba51594..a287b3a0e16 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_FAST_INIT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentDependency_FAST_INIT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_DEFAULT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_DEFAULT_MODE_test.DaggerSimpleComponent index e32f689d643..93991fa3661 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_DEFAULT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_DEFAULT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -59,7 +59,7 @@ final class DaggerSimpleComponent { } @Override - public Provider selfProvider() { + public javax.inject.Provider selfProvider() { return simpleComponentProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_FAST_INIT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_FAST_INIT_MODE_test.DaggerSimpleComponent index 4f9289e4561..8e3e2692fbb 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_FAST_INIT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentInjection_FAST_INIT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -59,7 +59,7 @@ final class DaggerSimpleComponent { } @Override - public Provider selfProvider() { + public javax.inject.Provider selfProvider() { return simpleComponentProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_DEFAULT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_DEFAULT_MODE_test.DaggerParent index 1d5bc09cb63..0f527b83b9e 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_DEFAULT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_DEFAULT_MODE_test.DaggerParent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_FAST_INIT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_FAST_INIT_MODE_test.DaggerParent index af0cdb92e24..b645714606c 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_FAST_INIT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentMethodInChildCallsComponentMethodInParent_FAST_INIT_MODE_test.DaggerParent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_DEFAULT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_DEFAULT_MODE_test.DaggerSimpleComponent index 76f41386984..22786130189 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_DEFAULT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_DEFAULT_MODE_test.DaggerSimpleComponent @@ -3,8 +3,8 @@ package test; import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -65,7 +65,7 @@ final class DaggerSimpleComponent { } @Override - public Provider someInjectableTypeProvider() { + public javax.inject.Provider someInjectableTypeProvider() { return someInjectableTypeProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_FAST_INIT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_FAST_INIT_MODE_test.DaggerSimpleComponent index 20d695da5c5..c639d30f558 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_FAST_INIT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_componentWithScope_FAST_INIT_MODE_test.DaggerSimpleComponent @@ -3,8 +3,8 @@ package test; import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -65,7 +65,7 @@ final class DaggerSimpleComponent { } @Override - public Provider someInjectableTypeProvider() { + public javax.inject.Provider someInjectableTypeProvider() { return someInjectableTypeProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_DEFAULT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_DEFAULT_MODE_test.DaggerBComponent index b8284979d05..5c703f1e16d 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_DEFAULT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_DEFAULT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import pkg1.A; import pkg1.AComponent; diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_FAST_INIT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_FAST_INIT_MODE_test.DaggerBComponent index 99a7e427176..0cb77ec60ff 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_FAST_INIT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_dependencyNameCollision_FAST_INIT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import pkg1.A; import pkg1.AComponent; diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_DEFAULT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_DEFAULT_MODE_test.DaggerBComponent index 755b402f9db..6e03f68eca7 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_DEFAULT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_DEFAULT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_FAST_INIT_MODE_test.DaggerBComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_FAST_INIT_MODE_test.DaggerBComponent index 6ce1e2451b7..b4d65253add 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_FAST_INIT_MODE_test.DaggerBComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_primitiveComponentDependency_FAST_INIT_MODE_test.DaggerBComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_DEFAULT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_DEFAULT_MODE_test.DaggerParent index f26d8a5bb94..43e67a22125 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_DEFAULT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_DEFAULT_MODE_test.DaggerParent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_FAST_INIT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_FAST_INIT_MODE_test.DaggerParent index 5edc873ff31..a6336361685 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_FAST_INIT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_privateMethodUsedOnlyInChildDoesNotUseQualifiedThis_FAST_INIT_MODE_test.DaggerParent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_DEFAULT_MODE_test.DaggerTestComponent index 19c4c90bf4f..3f46d70e687 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_DEFAULT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_FAST_INIT_MODE_test.DaggerTestComponent index 0af15855525..f7fb49313fa 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_providerComponentType_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerSimpleComponent index d92a70e85a9..76ff2823efc 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerSimpleComponent @@ -3,8 +3,8 @@ package test; import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -65,7 +65,7 @@ final class DaggerSimpleComponent { } @Override - public Provider someInjectableTypeProvider() { + public javax.inject.Provider someInjectableTypeProvider() { return someInjectableTypeProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_DEFAULT_MODE_test.DaggerTestComponent index 98c9ea7835b..a67f5e29bb4 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import test.sub.TestComponentBase_Dep_Factory; import test.sub.TestComponentBase_ProtectedType_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_FAST_INIT_MODE_test.DaggerTestComponent index 441b713d4ec..7efcca34d81 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentProtectedTypeTest_componentAccessesProtectedType_succeeds_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import test.sub.TestComponentBase_Dep_Factory; import test.sub.TestComponentBase_ProtectedType_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_DEFAULT_MODE_test.DaggerTestComponent index 78ff25e66f6..5745e81c907 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_DEFAULT_MODE_test.DaggerTestComponent @@ -2,10 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import dagger.internal.SetFactory; import java.util.Set; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -72,7 +72,7 @@ final class DaggerTestComponent { } @Override - public Provider dependsOnMultibinding() { + public javax.inject.Provider dependsOnMultibinding() { return reliesOnMultibindingProvider; } } @@ -99,7 +99,7 @@ final class DaggerTestComponent { } @Override - public Provider dependsOnMultibinding() { + public javax.inject.Provider dependsOnMultibinding() { return reliesOnMultibindingProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_FAST_INIT_MODE_test.DaggerTestComponent index 5eb16adf859..11e09d1566b 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentRequirementFieldTest_componentRequirementNeededInFactoryCreationOfSubcomponent_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableSet; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Set; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -73,7 +73,7 @@ final class DaggerTestComponent { } @Override - public Provider dependsOnMultibinding() { + public javax.inject.Provider dependsOnMultibinding() { return reliesOnMultibindingProvider; } @@ -127,7 +127,7 @@ final class DaggerTestComponent { } @Override - public Provider dependsOnMultibinding() { + public javax.inject.Provider dependsOnMultibinding() { return reliesOnMultibindingProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent index d5a2af09667..3aa359ea8f4 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -3,8 +3,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -81,17 +81,17 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testComponentImpl.testComponentImplShard.binding3Provider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent index e09bb44beb3..42805ad73a9 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreatedWithDependencies_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -3,8 +3,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.Preconditions; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -81,17 +81,17 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testComponentImpl.testComponentImplShard.binding3Provider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent index de033d5dc45..d722665234a 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -3,8 +3,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -98,37 +98,37 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return testComponentImpl.testComponentImplShard2.binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return testComponentImpl.testComponentImplShard.binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testComponentImpl.testComponentImplShard.binding3Provider; } @Override - public Provider providerBinding4() { + public javax.inject.Provider providerBinding4() { return testComponentImpl.testComponentImplShard.binding4Provider; } @Override - public Provider providerBinding5() { + public javax.inject.Provider providerBinding5() { return testComponentImpl.testComponentImplShard.binding5Provider; } @Override - public Provider providerBinding6() { + public javax.inject.Provider providerBinding6() { return binding6Provider; } @Override - public Provider providerBinding7() { + public javax.inject.Provider providerBinding7() { return binding7Provider; } } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent index 81056e24f93..588a26111bb 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -3,8 +3,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -98,37 +98,37 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return testComponentImpl.testComponentImplShard2.binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return testComponentImpl.testComponentImplShard.binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testComponentImpl.testComponentImplShard.binding3Provider; } @Override - public Provider providerBinding4() { + public javax.inject.Provider providerBinding4() { return testComponentImpl.testComponentImplShard.binding4Provider; } @Override - public Provider providerBinding5() { + public javax.inject.Provider providerBinding5() { return testComponentImpl.testComponentImplShard.binding5Provider; } @Override - public Provider providerBinding6() { + public javax.inject.Provider providerBinding6() { return binding6Provider; } @Override - public Provider providerBinding7() { + public javax.inject.Provider providerBinding7() { return binding7Provider; } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent index 86b5db46d93..35ede527c51 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_DEFAULT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -2,8 +2,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -77,17 +77,17 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testSubcomponentImpl.testSubcomponentImplShard.binding3Provider; } } diff --git a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent index 5a675bae84a..1049977a6ee 100644 --- a/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/ComponentShardTest_testNewShardSubcomponentCreated_FAST_INIT_MODE_dagger.internal.codegen.DaggerTestComponent @@ -2,8 +2,8 @@ package dagger.internal.codegen; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -77,17 +77,17 @@ final class DaggerTestComponent { } @Override - public Provider providerBinding1() { + public javax.inject.Provider providerBinding1() { return binding1Provider; } @Override - public Provider providerBinding2() { + public javax.inject.Provider providerBinding2() { return binding2Provider; } @Override - public Provider providerBinding3() { + public javax.inject.Provider providerBinding3() { return testSubcomponentImpl.testSubcomponentImplShard.binding3Provider; } diff --git a/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testCmdLineOptionEnabledPrecedesAnnotationDisabled_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testCmdLineOptionEnabledPrecedesAnnotationDisabled_test.DaggerSimpleComponent index d92a70e85a9..76ff2823efc 100644 --- a/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testCmdLineOptionEnabledPrecedesAnnotationDisabled_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testCmdLineOptionEnabledPrecedesAnnotationDisabled_test.DaggerSimpleComponent @@ -3,8 +3,8 @@ package test; import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -65,7 +65,7 @@ final class DaggerSimpleComponent { } @Override - public Provider someInjectableTypeProvider() { + public javax.inject.Provider someInjectableTypeProvider() { return someInjectableTypeProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testFastInitEnabledFromAnnotationSucceeded_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testFastInitEnabledFromAnnotationSucceeded_test.DaggerSimpleComponent index d92a70e85a9..76ff2823efc 100644 --- a/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testFastInitEnabledFromAnnotationSucceeded_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/DaggerProcessingOptionsTest_testFastInitEnabledFromAnnotationSucceeded_test.DaggerSimpleComponent @@ -3,8 +3,8 @@ package test; import dagger.Lazy; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -65,7 +65,7 @@ final class DaggerSimpleComponent { } @Override - public Provider someInjectableTypeProvider() { + public javax.inject.Provider someInjectableTypeProvider() { return someInjectableTypeProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_DEFAULT_MODE_test.DaggerTestComponent index 87f55ab41b3..5cac6ce4dc4 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.Subtype_Factory; import other.Supertype; diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_FAST_INIT_MODE_test.DaggerTestComponent index 06e4298ffa8..ee87e035111 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castNeeded_rawTypes_Provider_get_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.Subtype_Factory; import other.Supertype; diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_DEFAULT_MODE_test.DaggerTestComponent index 6bdd833da26..dda65b8749a 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_DEFAULT_MODE_test.DaggerTestComponent @@ -46,7 +46,7 @@ final class DaggerTestComponent { @Override public Provider charSequence() { - return ((Provider) TestModule_ProvideStringFactory.create()); + return ((dagger.internal.Provider) TestModule_ProvideStringFactory.create()); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_FAST_INIT_MODE_test.DaggerTestComponent index f186b844cfa..b5494f34497 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_castedToRawType_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -53,7 +53,7 @@ final class DaggerTestComponent { } @Override - public Provider charSequence() { + public javax.inject.Provider charSequence() { return ((Provider) provideStringProvider); } @@ -63,7 +63,7 @@ final class DaggerTestComponent { } @Override - public Provider namedString() { + public javax.inject.Provider namedString() { return provideStringProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_DEFAULT_MODE_test.DaggerTestComponent index 578eaf46fbf..e98925e23cb 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_DEFAULT_MODE_test.DaggerTestComponent @@ -46,12 +46,12 @@ final class DaggerTestComponent { @Override public Provider charSequence() { - return ((Provider) TestModule_ProvideStringFactory.create()); + return ((dagger.internal.Provider) TestModule_ProvideStringFactory.create()); } @Override public Provider object() { - return ((Provider) TestModule_ProvideStringFactory.create()); + return ((dagger.internal.Provider) TestModule_ProvideStringFactory.create()); } } } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_FAST_INIT_MODE_test.DaggerTestComponent index 310f8a1d889..00012762bda 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_doubleBinds_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -53,12 +53,12 @@ final class DaggerTestComponent { } @Override - public Provider charSequence() { + public javax.inject.Provider charSequence() { return ((Provider) provideStringProvider); } @Override - public Provider object() { + public javax.inject.Provider object() { return ((Provider) provideStringProvider); } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_DEFAULT_MODE_test.DaggerRequestsSubtypeAsProvider b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_DEFAULT_MODE_test.DaggerRequestsSubtypeAsProvider index 193724a4150..f2043f6619f 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_DEFAULT_MODE_test.DaggerRequestsSubtypeAsProvider +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_DEFAULT_MODE_test.DaggerRequestsSubtypeAsProvider @@ -48,7 +48,7 @@ final class DaggerRequestsSubtypeAsProvider { @Override public Provider supertypeProvider() { - return ((Provider) Subtype_Factory.create()); + return ((dagger.internal.Provider) Subtype_Factory.create()); } } } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_FAST_INIT_MODE_test.DaggerRequestsSubtypeAsProvider b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_FAST_INIT_MODE_test.DaggerRequestsSubtypeAsProvider index 0d3233a98bf..137a98d3aca 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_FAST_INIT_MODE_test.DaggerRequestsSubtypeAsProvider +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_inlineFactoryOfInacessibleType_FAST_INIT_MODE_test.DaggerRequestsSubtypeAsProvider @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.Subtype_Factory; import other.Supertype; @@ -56,7 +56,7 @@ final class DaggerRequestsSubtypeAsProvider { } @Override - public Provider supertypeProvider() { + public javax.inject.Provider supertypeProvider() { return subtypeProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent index b1c1c2c87ba..3743b5c9635 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.Subtype_Factory; import other.UsesSupertype; import other.UsesSupertype_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent index e076a1dc604..460550ae5dd 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_noCast_rawTypes_Provider_get_toInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.Subtype_Factory; import other.UsesSupertype; import other.UsesSupertype_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_DEFAULT_MODE_test.DaggerTestComponent index 149a5fe6868..492cfcb2f2d 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_DEFAULT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -58,7 +58,7 @@ final class DaggerTestComponent { } @Override - public Provider object() { + public javax.inject.Provider object() { return bindStringProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_FAST_INIT_MODE_test.DaggerTestComponent index 09600ed69b3..832a8308027 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_providerWhenBindsScopeGreaterThanDependencyScope_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -58,7 +58,7 @@ final class DaggerTestComponent { } @Override - public Provider object() { + public javax.inject.Provider object() { return bindStringProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_DEFAULT_MODE_test.DaggerTestComponent index 61f28ddf714..772f290bbd7 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_DEFAULT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_FAST_INIT_MODE_test.DaggerTestComponent index 323f241f284..095596880d5 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toDoubleCheck_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_DEFAULT_MODE_test.DaggerTestComponent index ccbf8fc06f5..112948e8769 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_DEFAULT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_FAST_INIT_MODE_test.DaggerTestComponent index 1b7c505520f..c1775b63a71 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toSingleCheck_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_DEFAULT_MODE_test.DaggerTestComponent index 227bed0a8d4..097f1aceaa1 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_DEFAULT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_FAST_INIT_MODE_test.DaggerTestComponent index dea546e94f4..500b4579f12 100644 --- a/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/DelegateRequestRepresentationTest_toUnscoped_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.internal.SingleCheck; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_DEFAULT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_DEFAULT_MODE_test.DaggerSimpleComponent index cb7a35d2c52..194275af3cc 100644 --- a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_DEFAULT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_DEFAULT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_FAST_INIT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_FAST_INIT_MODE_test.DaggerSimpleComponent index 94c174c7127..92822a55cfa 100644 --- a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_FAST_INIT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_scopedBinding_onlyUsedInSubcomponent_FAST_INIT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_DEFAULT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_DEFAULT_MODE_test.DaggerSimpleComponent index 32382c8cf97..b3662e51c6e 100644 --- a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_DEFAULT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_DEFAULT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_FAST_INIT_MODE_test.DaggerSimpleComponent b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_FAST_INIT_MODE_test.DaggerSimpleComponent index 381eeebf9a4..152ecdd2f74 100644 --- a/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_FAST_INIT_MODE_test.DaggerSimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ElidedFactoriesTest_simpleComponent_injectsProviderOf_dependsOnScoped_FAST_INIT_MODE_test.DaggerSimpleComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_JAVA7_MODE_test.DaggerTestComponent index 9e10117e4ba..def1244dcfa 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_JAVA7_MODE_test.DaggerTestComponent @@ -3,8 +3,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; @@ -71,4 +71,4 @@ final class DaggerTestComponent { return OtherEntryPoint_Factory.newInstance(fooImpl()); } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_MODE_test.DaggerTestComponent index 9c250668149..df4e53b6aa8 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_DEFAULT_MODE_test.DaggerTestComponent @@ -3,8 +3,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent index 9642f338144..836ddbdc64f 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent @@ -3,8 +3,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; @@ -93,4 +93,4 @@ final class DaggerTestComponent { } } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_MODE_test.DaggerTestComponent index a18b8a4c4fa..cfe84a52e0c 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoopScoped_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,8 +3,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_JAVA7_MODE_test.DaggerTestComponent index e377365d422..b92d68e2c67 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_JAVA7_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; @@ -67,4 +67,4 @@ final class DaggerTestComponent { return OtherEntryPoint_Factory.newInstance(fooImpl()); } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_MODE_test.DaggerTestComponent index c1345ad1cf6..4e663c8ac70 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent index c6db8da9b34..45aac8a6acb 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; @@ -89,4 +89,4 @@ final class DaggerTestComponent { } } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_MODE_test.DaggerTestComponent index 8e2e9598180..5e4e1811bc0 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_inaccessibleTypeBoundInALoop_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DelegateFactory; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; import other.OtherEntryPoint; import other.OtherEntryPoint_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_JAVA7_MODE_test.DaggerTestComponent index d39656c9ba2..d964156bb9d 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_JAVA7_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; @DaggerGenerated @@ -59,4 +59,4 @@ final class DaggerTestComponent { return bindProvider.get(); } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_MODE_test.DaggerTestComponent index 73dda53a992..40fa327283e 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; @DaggerGenerated diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent index 7c0c68df2ff..0697fe79e64 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; @DaggerGenerated @@ -85,4 +85,4 @@ final class DaggerTestComponent { } } } -} \ No newline at end of file +} diff --git a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_MODE_test.DaggerTestComponent index 84ae12fede9..a2a46234bb9 100644 --- a/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/InaccessibleTypeBindsTest_scopedInaccessibleTypeBound_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.FooImpl_Factory; @DaggerGenerated diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_DEFAULT_MODE_test.DaggerTestComponent index 88153bcb5d6..f3a76f55e90 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.MapProviderFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -66,7 +66,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfPathEnumAndProviderOfHandlerProvider; + private Provider mapOfPathEnumAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { @@ -83,7 +83,7 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher() { return mapOfPathEnumAndProviderOfHandlerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_FAST_INIT_MODE_test.DaggerTestComponent index ac0e74e199d..4321b6cade4 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithEnumKey_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -70,7 +70,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfPathEnumAndProviderOfHandlerProvider; + private Provider mapOfPathEnumAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { this.mapModuleOne = mapModuleOneParam; @@ -88,7 +88,7 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher() { return mapOfPathEnumAndProviderOfHandlerProvider; } @@ -107,7 +107,7 @@ final class DaggerTestComponent { public T get() { switch (id) { case 0: // java.util.Map> - return (T) ImmutableMap.>of(PathEnum.ADMIN, testComponentImpl.provideAdminHandlerProvider, PathEnum.LOGIN, testComponentImpl.provideLoginHandlerProvider); + return (T) ImmutableMap.>of(PathEnum.ADMIN, testComponentImpl.provideAdminHandlerProvider, PathEnum.LOGIN, testComponentImpl.provideLoginHandlerProvider); case 1: // java.util.Map> test.MapModuleOne#provideAdminHandler return (T) MapModuleOne_ProvideAdminHandlerFactory.provideAdminHandler(testComponentImpl.mapModuleOne); diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_DEFAULT_MODE_test.DaggerTestComponent index 1d9618dd228..849d9052952 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.MapFactory; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; import mapkeys.MapKeys; import mapkeys.MapModule; import mapkeys.MapModule_ClassKeyFactory; @@ -84,7 +84,7 @@ final class DaggerTestComponent { } @Override - public Provider, Integer>> classKeyProvider() { + public javax.inject.Provider, Integer>> classKeyProvider() { return mapOfClassOfAndIntegerProvider; } @@ -94,7 +94,7 @@ final class DaggerTestComponent { } @Override - public Provider inaccessibleEnumProvider() { + public javax.inject.Provider inaccessibleEnumProvider() { return mapOfPackagePrivateEnumAndIntegerProvider; } @@ -104,7 +104,7 @@ final class DaggerTestComponent { } @Override - public Provider> complexKeyProvider() { + public javax.inject.Provider> complexKeyProvider() { return mapOfComplexKeyAndIntegerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_FAST_INIT_MODE_test.DaggerTestComponent index 1d9618dd228..849d9052952 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithInaccessibleKeys_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.MapFactory; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; import mapkeys.MapKeys; import mapkeys.MapModule; import mapkeys.MapModule_ClassKeyFactory; @@ -84,7 +84,7 @@ final class DaggerTestComponent { } @Override - public Provider, Integer>> classKeyProvider() { + public javax.inject.Provider, Integer>> classKeyProvider() { return mapOfClassOfAndIntegerProvider; } @@ -94,7 +94,7 @@ final class DaggerTestComponent { } @Override - public Provider inaccessibleEnumProvider() { + public javax.inject.Provider inaccessibleEnumProvider() { return mapOfPackagePrivateEnumAndIntegerProvider; } @@ -104,7 +104,7 @@ final class DaggerTestComponent { } @Override - public Provider> complexKeyProvider() { + public javax.inject.Provider> complexKeyProvider() { return mapOfComplexKeyAndIntegerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_DEFAULT_MODE_test.DaggerTestComponent index b2e7cf5fd28..056ff5afe1f 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.MapFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -83,7 +83,7 @@ final class DaggerTestComponent { } @Override - public Provider> dispatcher() { + public javax.inject.Provider> dispatcher() { return mapOfPathEnumAndHandlerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_FAST_INIT_MODE_test.DaggerTestComponent index 4e898edfaa3..ae80b854b21 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithNonProviderValue_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -82,7 +82,7 @@ final class DaggerTestComponent { } @Override - public Provider> dispatcher() { + public javax.inject.Provider> dispatcher() { return mapOfPathEnumAndHandlerProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_DEFAULT_MODE_test.DaggerTestComponent index 0b463f566c6..e353cdbd897 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.MapProviderFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -66,7 +66,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfStringAndProviderOfHandlerProvider; + private Provider mapOfStringAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { @@ -83,7 +83,7 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher() { return mapOfStringAndProviderOfHandlerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_FAST_INIT_MODE_test.DaggerTestComponent index 65513bb7e24..4e83239d00d 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithStringKey_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -70,7 +70,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfStringAndProviderOfHandlerProvider; + private Provider mapOfStringAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { this.mapModuleOne = mapModuleOneParam; @@ -88,7 +88,7 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher() { return mapOfStringAndProviderOfHandlerProvider; } @@ -107,7 +107,7 @@ final class DaggerTestComponent { public T get() { switch (id) { case 0: // java.util.Map> - return (T) ImmutableMap.>of("Admin", testComponentImpl.provideAdminHandlerProvider, "Login", testComponentImpl.provideLoginHandlerProvider); + return (T) ImmutableMap.>of("Admin", testComponentImpl.provideAdminHandlerProvider, "Login", testComponentImpl.provideLoginHandlerProvider); case 1: // java.util.Map> test.MapModuleOne#provideAdminHandler return (T) MapModuleOne_ProvideAdminHandlerFactory.provideAdminHandler(testComponentImpl.mapModuleOne); diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_DEFAULT_MODE_test.DaggerTestComponent index 47847a7dc61..5611344d905 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.MapProviderFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -66,7 +66,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfWrappedClassKeyAndProviderOfHandlerProvider; + private Provider mapOfWrappedClassKeyAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { @@ -83,7 +83,8 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher( + ) { return mapOfWrappedClassKeyAndProviderOfHandlerProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_FAST_INIT_MODE_test.DaggerTestComponent index 3180571c21e..2b87e633b7f 100644 --- a/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapBindingComponentProcessorTest_mapBindingsWithWrappedKey_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -70,7 +70,7 @@ final class DaggerTestComponent { private Provider provideLoginHandlerProvider; - private Provider>> mapOfWrappedClassKeyAndProviderOfHandlerProvider; + private Provider mapOfWrappedClassKeyAndProviderOfHandlerProvider; private TestComponentImpl(MapModuleOne mapModuleOneParam, MapModuleTwo mapModuleTwoParam) { this.mapModuleOne = mapModuleOneParam; @@ -88,7 +88,8 @@ final class DaggerTestComponent { } @Override - public Provider>> dispatcher() { + public javax.inject.Provider>> dispatcher( + ) { return mapOfWrappedClassKeyAndProviderOfHandlerProvider; } @@ -107,7 +108,7 @@ final class DaggerTestComponent { public T get() { switch (id) { case 0: // java.util.Map> - return (T) ImmutableMap.>of(WrappedClassKeyCreator.createWrappedClassKey(Integer.class), testComponentImpl.provideAdminHandlerProvider, WrappedClassKeyCreator.createWrappedClassKey(Long.class), testComponentImpl.provideLoginHandlerProvider); + return (T) ImmutableMap.>of(WrappedClassKeyCreator.createWrappedClassKey(Integer.class), testComponentImpl.provideAdminHandlerProvider, WrappedClassKeyCreator.createWrappedClassKey(Long.class), testComponentImpl.provideLoginHandlerProvider); case 1: // java.util.Map> test.MapModuleOne#provideAdminHandler return (T) MapModuleOne_ProvideAdminHandlerFactory.provideAdminHandler(testComponentImpl.mapModuleOne); diff --git a/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent index 0010e588cb2..1db8ff8dfcd 100644 --- a/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,10 +2,10 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.MapBuilder; +import dagger.internal.Provider; import java.util.Collections; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -70,8 +70,8 @@ final class DaggerTestComponent { } @Override - public Map> providerStrings() { - return Collections.>emptyMap(); + public Map> providerStrings() { + return Collections.>emptyMap(); } @Override @@ -80,8 +80,8 @@ final class DaggerTestComponent { } @Override - public Map> providerInts() { - return Collections.>singletonMap(0, provideIntProvider); + public Map> providerInts() { + return Collections.>singletonMap(0, provideIntProvider); } @Override @@ -90,8 +90,8 @@ final class DaggerTestComponent { } @Override - public Map> providerLongs() { - return MapBuilder.>newMapBuilder(3).put(0L, provideLong0Provider).put(1L, provideLong1Provider).put(2L, provideLong2Provider).build(); + public Map> providerLongs() { + return MapBuilder.>newMapBuilder(3).put(0L, provideLong0Provider).put(1L, provideLong1Provider).put(2L, provideLong2Provider).build(); } private static final class SwitchingProvider implements Provider { diff --git a/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationWithGuavaTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationWithGuavaTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent index e99a9639e07..97cb73481dc 100644 --- a/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationWithGuavaTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MapRequestRepresentationWithGuavaTest_mapBindings_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import com.google.common.collect.ImmutableMap; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import java.util.Map; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -69,8 +69,8 @@ final class DaggerTestComponent { } @Override - public Map> providerLongs() { - return ImmutableMap.>builderWithExpectedSize(6).put(0L, testComponentImpl.provideLong0Provider).put(1L, testComponentImpl.provideLong1Provider).put(2L, testComponentImpl.provideLong2Provider).put(3L, provideLong3Provider).put(4L, provideLong4Provider).put(5L, provideLong5Provider).build(); + public Map> providerLongs() { + return ImmutableMap.>builderWithExpectedSize(6).put(0L, testComponentImpl.provideLong0Provider).put(1L, testComponentImpl.provideLong1Provider).put(2L, testComponentImpl.provideLong2Provider).put(3L, provideLong3Provider).put(4L, provideLong4Provider).put(5L, provideLong5Provider).build(); } private static final class SwitchingProvider implements Provider { @@ -136,8 +136,8 @@ final class DaggerTestComponent { } @Override - public Map> providerStrings() { - return ImmutableMap.>of(); + public Map> providerStrings() { + return ImmutableMap.>of(); } @Override @@ -146,8 +146,8 @@ final class DaggerTestComponent { } @Override - public Map> providerInts() { - return ImmutableMap.>of(0, provideIntProvider); + public Map> providerInts() { + return ImmutableMap.>of(0, provideIntProvider); } @Override @@ -156,8 +156,8 @@ final class DaggerTestComponent { } @Override - public Map> providerLongs() { - return ImmutableMap.>of(0L, provideLong0Provider, 1L, provideLong1Provider, 2L, provideLong2Provider); + public Map> providerLongs() { + return ImmutableMap.>of(0L, provideLong0Provider, 1L, provideLong1Provider, 2L, provideLong2Provider); } @Override diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent index f8228a18188..e322e42763d 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.errorprone.annotations.CanIgnoreReturnValue; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import java.util.List; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.InaccessiblesModule_InaccessiblesFactory; import other.UsesInaccessibles; import other.UsesInaccessibles_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent index fd1c9305011..ee997892ae0 100644 --- a/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/MembersInjectionTest_accessibleRawType_ofInaccessibleType_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.errorprone.annotations.CanIgnoreReturnValue; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import java.util.List; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.InaccessiblesModule_InaccessiblesFactory; import other.UsesInaccessibles; import other.UsesInaccessibles_Factory; diff --git a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_DEFAULT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_DEFAULT_JAVA7_MODE_test.DaggerTestComponent index 9636b1a623f..24a86c515e7 100644 --- a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_DEFAULT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_DEFAULT_JAVA7_MODE_test.DaggerTestComponent @@ -57,7 +57,7 @@ final class DaggerTestComponent { @Override public Optional>> providerOfLazyOfMaybe() { - return Optional.of(ProviderOfLazy.create(Maybe_MaybeModule_ProvideMaybeFactory.create())); + return (Optional) Optional.of(ProviderOfLazy.create(Maybe_MaybeModule_ProvideMaybeFactory.create())); } @Override @@ -67,7 +67,7 @@ final class DaggerTestComponent { @Override public Optional>> providerOfLazyOfDefinitelyNot() { - return Optional.>>absent(); + return (Optional) Optional.>>absent(); } } } diff --git a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent index 88631be0e04..06503d984b5 100644 --- a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_JAVA7_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.base.Optional; import dagger.Lazy; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.ProviderOfLazy; import javax.annotation.Generated; -import javax.inject.Provider; import other.DefinitelyNot; import other.Maybe; import other.Maybe_MaybeModule_ProvideMaybeFactory; @@ -64,8 +64,8 @@ final class DaggerTestComponent { } @Override - public Optional>> providerOfLazyOfMaybe() { - return Optional.of(ProviderOfLazy.create(provideMaybeProvider)); + public Optional>> providerOfLazyOfMaybe() { + return (Optional) Optional.of(ProviderOfLazy.create(provideMaybeProvider)); } @Override @@ -74,8 +74,8 @@ final class DaggerTestComponent { } @Override - public Optional>> providerOfLazyOfDefinitelyNot() { - return Optional.>>absent(); + public Optional>> providerOfLazyOfDefinitelyNot() { + return (Optional) Optional.>>absent(); } private static final class SwitchingProvider implements Provider { diff --git a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_MODE_test.DaggerTestComponent index bc2d8aa7253..54068ac6b46 100644 --- a/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/OptionalBindingRequestFulfillmentTest_inlinedOptionalBindings_FAST_INIT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import com.google.common.base.Optional; import dagger.Lazy; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import dagger.internal.ProviderOfLazy; import javax.annotation.processing.Generated; -import javax.inject.Provider; import other.DefinitelyNot; import other.Maybe; import other.Maybe_MaybeModule_ProvideMaybeFactory; @@ -64,7 +64,7 @@ final class DaggerTestComponent { } @Override - public Optional>> providerOfLazyOfMaybe() { + public Optional>> providerOfLazyOfMaybe() { return Optional.of(ProviderOfLazy.create(provideMaybeProvider)); } @@ -74,7 +74,7 @@ final class DaggerTestComponent { } @Override - public Optional>> providerOfLazyOfDefinitelyNot() { + public Optional>> providerOfLazyOfDefinitelyNot() { return Optional.absent(); } diff --git a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_DEFAULT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_DEFAULT_MODE_test.DaggerParent index 11af50c5f07..8be0f98b01c 100644 --- a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_DEFAULT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_DEFAULT_MODE_test.DaggerParent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.producers.internal.CancellationListener; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_FAST_INIT_MODE_test.DaggerParent b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_FAST_INIT_MODE_test.DaggerParent index 5d0b797d517..cf5ae455e52 100644 --- a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_FAST_INIT_MODE_test.DaggerParent +++ b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_productionScope_injectConstructor_FAST_INIT_MODE_test.DaggerParent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import dagger.producers.internal.CancellationListener; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_DEFAULT_MODE_test.DaggerTestClass_SimpleComponent b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_DEFAULT_MODE_test.DaggerTestClass_SimpleComponent index d55cd373511..6123ca47034 100644 --- a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_DEFAULT_MODE_test.DaggerTestClass_SimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_DEFAULT_MODE_test.DaggerTestClass_SimpleComponent @@ -5,6 +5,7 @@ import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.InstanceFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import dagger.internal.SetFactory; import dagger.producers.Producer; import dagger.producers.internal.CancellationListener; @@ -12,7 +13,6 @@ import dagger.producers.internal.Producers; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.Executor; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerTestClass_SimpleComponent b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerTestClass_SimpleComponent index 9ad6e6fa2bf..cf9c52436d4 100644 --- a/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerTestClass_SimpleComponent +++ b/javatests/dagger/internal/codegen/goldens/ProductionComponentProcessorTest_simpleComponent_FAST_INIT_MODE_test.DaggerTestClass_SimpleComponent @@ -5,6 +5,7 @@ import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; import dagger.internal.InstanceFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import dagger.internal.SetFactory; import dagger.producers.Producer; import dagger.producers.internal.CancellationListener; @@ -12,7 +13,6 @@ import dagger.producers.internal.Producers; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.Executor; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_DEFAULT_MODE_test.DaggerParentComponent b/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_DEFAULT_MODE_test.DaggerParentComponent index b05b85f062e..00787281042 100644 --- a/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_DEFAULT_MODE_test.DaggerParentComponent +++ b/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_DEFAULT_MODE_test.DaggerParentComponent @@ -3,8 +3,8 @@ package test; import com.google.errorprone.annotations.CanIgnoreReturnValue; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_FAST_INIT_MODE_test.DaggerParentComponent b/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_FAST_INIT_MODE_test.DaggerParentComponent index 6311a200cba..36c5032d173 100644 --- a/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_FAST_INIT_MODE_test.DaggerParentComponent +++ b/javatests/dagger/internal/codegen/goldens/SubcomponentValidationTest_delegateFactoryNotCreatedForSubcomponentWhenProviderExistsInParent_FAST_INIT_MODE_test.DaggerParentComponent @@ -3,8 +3,8 @@ package test; import com.google.errorprone.annotations.CanIgnoreReturnValue; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_DEFAULT_MODE_test.DaggerTestComponent index e0230e0c7c5..95ce23a3cd8 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_DEFAULT_MODE_test.DaggerTestComponent @@ -4,8 +4,8 @@ import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; import dagger.internal.MembersInjectors; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -56,7 +56,7 @@ final class DaggerTestComponent { } @Override - public Provider> providerOfMembersInjector() { + public javax.inject.Provider> providerOfMembersInjector() { return fooMembersInjectorProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_FAST_INIT_MODE_test.DaggerTestComponent index e0230e0c7c5..95ce23a3cd8 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_memberInjectors_FAST_INIT_MODE_test.DaggerTestComponent @@ -4,8 +4,8 @@ import dagger.MembersInjector; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; import dagger.internal.MembersInjectors; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -56,7 +56,7 @@ final class DaggerTestComponent { } @Override - public Provider> providerOfMembersInjector() { + public javax.inject.Provider> providerOfMembersInjector() { return fooMembersInjectorProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_DEFAULT_MODE_test.DaggerTestComponent index 904fb4aea02..dd50b770e90 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_DEFAULT_MODE_test.DaggerTestComponent @@ -3,9 +3,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; import dagger.internal.Preconditions; +import dagger.internal.Provider; import java.util.Optional; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -94,12 +94,12 @@ final class DaggerTestComponent { } @Override - public Provider> providerOfOptionalOfPresent() { + public javax.inject.Provider> providerOfOptionalOfPresent() { return optionalOfPresentProvider; } @Override - public Provider> providerOfOptionalOfAbsent() { + public javax.inject.Provider> providerOfOptionalOfAbsent() { return optionalOfAbsentProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_FAST_INIT_MODE_test.DaggerTestComponent index 1e46fdee1ee..26462e468ce 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_optionals_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,9 +2,9 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.InstanceFactory; +import dagger.internal.Provider; import java.util.Optional; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -73,12 +73,12 @@ final class DaggerTestComponent { } @Override - public Provider> providerOfOptionalOfPresent() { + public javax.inject.Provider> providerOfOptionalOfPresent() { return optionalOfPresentProvider; } @Override - public Provider> providerOfOptionalOfAbsent() { + public javax.inject.Provider> providerOfOptionalOfAbsent() { return optionalOfAbsentProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_DEFAULT_MODE_test.DaggerTestComponent index d3f68be073d..e7c8b4f651f 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_DEFAULT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -54,12 +54,12 @@ final class DaggerTestComponent { } @Override - public Provider objectProvider() { + public javax.inject.Provider objectProvider() { return ((Provider) cProvider); } @Override - public Provider charSequenceProvider() { + public javax.inject.Provider charSequenceProvider() { return cProvider; } } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_FAST_INIT_MODE_test.DaggerTestComponent index 440def076bd..b8603ec1acb 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_scopedBinds_FAST_INIT_MODE_test.DaggerTestComponent @@ -2,8 +2,8 @@ package test; import dagger.internal.DaggerGenerated; import dagger.internal.DoubleCheck; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -57,12 +57,12 @@ final class DaggerTestComponent { } @Override - public Provider objectProvider() { + public javax.inject.Provider objectProvider() { return ((Provider) cProvider); } @Override - public Provider charSequenceProvider() { + public javax.inject.Provider charSequenceProvider() { return cProvider; } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_switchingProviderTest_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_switchingProviderTest_FAST_INIT_MODE_test.DaggerTestComponent index c2bcf91165d..39ded9383f7 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_switchingProviderTest_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_switchingProviderTest_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -358,507 +358,507 @@ final class DaggerTestComponent { } @Override - public Provider getBinding0Provider() { + public javax.inject.Provider getBinding0Provider() { return binding0Provider; } @Override - public Provider getBinding1Provider() { + public javax.inject.Provider getBinding1Provider() { return binding1Provider; } @Override - public Provider getBinding2Provider() { + public javax.inject.Provider getBinding2Provider() { return binding2Provider; } @Override - public Provider getBinding3Provider() { + public javax.inject.Provider getBinding3Provider() { return binding3Provider; } @Override - public Provider getBinding4Provider() { + public javax.inject.Provider getBinding4Provider() { return binding4Provider; } @Override - public Provider getBinding5Provider() { + public javax.inject.Provider getBinding5Provider() { return binding5Provider; } @Override - public Provider getBinding6Provider() { + public javax.inject.Provider getBinding6Provider() { return binding6Provider; } @Override - public Provider getBinding7Provider() { + public javax.inject.Provider getBinding7Provider() { return binding7Provider; } @Override - public Provider getBinding8Provider() { + public javax.inject.Provider getBinding8Provider() { return binding8Provider; } @Override - public Provider getBinding9Provider() { + public javax.inject.Provider getBinding9Provider() { return binding9Provider; } @Override - public Provider getBinding10Provider() { + public javax.inject.Provider getBinding10Provider() { return binding10Provider; } @Override - public Provider getBinding11Provider() { + public javax.inject.Provider getBinding11Provider() { return binding11Provider; } @Override - public Provider getBinding12Provider() { + public javax.inject.Provider getBinding12Provider() { return binding12Provider; } @Override - public Provider getBinding13Provider() { + public javax.inject.Provider getBinding13Provider() { return binding13Provider; } @Override - public Provider getBinding14Provider() { + public javax.inject.Provider getBinding14Provider() { return binding14Provider; } @Override - public Provider getBinding15Provider() { + public javax.inject.Provider getBinding15Provider() { return binding15Provider; } @Override - public Provider getBinding16Provider() { + public javax.inject.Provider getBinding16Provider() { return binding16Provider; } @Override - public Provider getBinding17Provider() { + public javax.inject.Provider getBinding17Provider() { return binding17Provider; } @Override - public Provider getBinding18Provider() { + public javax.inject.Provider getBinding18Provider() { return binding18Provider; } @Override - public Provider getBinding19Provider() { + public javax.inject.Provider getBinding19Provider() { return binding19Provider; } @Override - public Provider getBinding20Provider() { + public javax.inject.Provider getBinding20Provider() { return binding20Provider; } @Override - public Provider getBinding21Provider() { + public javax.inject.Provider getBinding21Provider() { return binding21Provider; } @Override - public Provider getBinding22Provider() { + public javax.inject.Provider getBinding22Provider() { return binding22Provider; } @Override - public Provider getBinding23Provider() { + public javax.inject.Provider getBinding23Provider() { return binding23Provider; } @Override - public Provider getBinding24Provider() { + public javax.inject.Provider getBinding24Provider() { return binding24Provider; } @Override - public Provider getBinding25Provider() { + public javax.inject.Provider getBinding25Provider() { return binding25Provider; } @Override - public Provider getBinding26Provider() { + public javax.inject.Provider getBinding26Provider() { return binding26Provider; } @Override - public Provider getBinding27Provider() { + public javax.inject.Provider getBinding27Provider() { return binding27Provider; } @Override - public Provider getBinding28Provider() { + public javax.inject.Provider getBinding28Provider() { return binding28Provider; } @Override - public Provider getBinding29Provider() { + public javax.inject.Provider getBinding29Provider() { return binding29Provider; } @Override - public Provider getBinding30Provider() { + public javax.inject.Provider getBinding30Provider() { return binding30Provider; } @Override - public Provider getBinding31Provider() { + public javax.inject.Provider getBinding31Provider() { return binding31Provider; } @Override - public Provider getBinding32Provider() { + public javax.inject.Provider getBinding32Provider() { return binding32Provider; } @Override - public Provider getBinding33Provider() { + public javax.inject.Provider getBinding33Provider() { return binding33Provider; } @Override - public Provider getBinding34Provider() { + public javax.inject.Provider getBinding34Provider() { return binding34Provider; } @Override - public Provider getBinding35Provider() { + public javax.inject.Provider getBinding35Provider() { return binding35Provider; } @Override - public Provider getBinding36Provider() { + public javax.inject.Provider getBinding36Provider() { return binding36Provider; } @Override - public Provider getBinding37Provider() { + public javax.inject.Provider getBinding37Provider() { return binding37Provider; } @Override - public Provider getBinding38Provider() { + public javax.inject.Provider getBinding38Provider() { return binding38Provider; } @Override - public Provider getBinding39Provider() { + public javax.inject.Provider getBinding39Provider() { return binding39Provider; } @Override - public Provider getBinding40Provider() { + public javax.inject.Provider getBinding40Provider() { return binding40Provider; } @Override - public Provider getBinding41Provider() { + public javax.inject.Provider getBinding41Provider() { return binding41Provider; } @Override - public Provider getBinding42Provider() { + public javax.inject.Provider getBinding42Provider() { return binding42Provider; } @Override - public Provider getBinding43Provider() { + public javax.inject.Provider getBinding43Provider() { return binding43Provider; } @Override - public Provider getBinding44Provider() { + public javax.inject.Provider getBinding44Provider() { return binding44Provider; } @Override - public Provider getBinding45Provider() { + public javax.inject.Provider getBinding45Provider() { return binding45Provider; } @Override - public Provider getBinding46Provider() { + public javax.inject.Provider getBinding46Provider() { return binding46Provider; } @Override - public Provider getBinding47Provider() { + public javax.inject.Provider getBinding47Provider() { return binding47Provider; } @Override - public Provider getBinding48Provider() { + public javax.inject.Provider getBinding48Provider() { return binding48Provider; } @Override - public Provider getBinding49Provider() { + public javax.inject.Provider getBinding49Provider() { return binding49Provider; } @Override - public Provider getBinding50Provider() { + public javax.inject.Provider getBinding50Provider() { return binding50Provider; } @Override - public Provider getBinding51Provider() { + public javax.inject.Provider getBinding51Provider() { return binding51Provider; } @Override - public Provider getBinding52Provider() { + public javax.inject.Provider getBinding52Provider() { return binding52Provider; } @Override - public Provider getBinding53Provider() { + public javax.inject.Provider getBinding53Provider() { return binding53Provider; } @Override - public Provider getBinding54Provider() { + public javax.inject.Provider getBinding54Provider() { return binding54Provider; } @Override - public Provider getBinding55Provider() { + public javax.inject.Provider getBinding55Provider() { return binding55Provider; } @Override - public Provider getBinding56Provider() { + public javax.inject.Provider getBinding56Provider() { return binding56Provider; } @Override - public Provider getBinding57Provider() { + public javax.inject.Provider getBinding57Provider() { return binding57Provider; } @Override - public Provider getBinding58Provider() { + public javax.inject.Provider getBinding58Provider() { return binding58Provider; } @Override - public Provider getBinding59Provider() { + public javax.inject.Provider getBinding59Provider() { return binding59Provider; } @Override - public Provider getBinding60Provider() { + public javax.inject.Provider getBinding60Provider() { return binding60Provider; } @Override - public Provider getBinding61Provider() { + public javax.inject.Provider getBinding61Provider() { return binding61Provider; } @Override - public Provider getBinding62Provider() { + public javax.inject.Provider getBinding62Provider() { return binding62Provider; } @Override - public Provider getBinding63Provider() { + public javax.inject.Provider getBinding63Provider() { return binding63Provider; } @Override - public Provider getBinding64Provider() { + public javax.inject.Provider getBinding64Provider() { return binding64Provider; } @Override - public Provider getBinding65Provider() { + public javax.inject.Provider getBinding65Provider() { return binding65Provider; } @Override - public Provider getBinding66Provider() { + public javax.inject.Provider getBinding66Provider() { return binding66Provider; } @Override - public Provider getBinding67Provider() { + public javax.inject.Provider getBinding67Provider() { return binding67Provider; } @Override - public Provider getBinding68Provider() { + public javax.inject.Provider getBinding68Provider() { return binding68Provider; } @Override - public Provider getBinding69Provider() { + public javax.inject.Provider getBinding69Provider() { return binding69Provider; } @Override - public Provider getBinding70Provider() { + public javax.inject.Provider getBinding70Provider() { return binding70Provider; } @Override - public Provider getBinding71Provider() { + public javax.inject.Provider getBinding71Provider() { return binding71Provider; } @Override - public Provider getBinding72Provider() { + public javax.inject.Provider getBinding72Provider() { return binding72Provider; } @Override - public Provider getBinding73Provider() { + public javax.inject.Provider getBinding73Provider() { return binding73Provider; } @Override - public Provider getBinding74Provider() { + public javax.inject.Provider getBinding74Provider() { return binding74Provider; } @Override - public Provider getBinding75Provider() { + public javax.inject.Provider getBinding75Provider() { return binding75Provider; } @Override - public Provider getBinding76Provider() { + public javax.inject.Provider getBinding76Provider() { return binding76Provider; } @Override - public Provider getBinding77Provider() { + public javax.inject.Provider getBinding77Provider() { return binding77Provider; } @Override - public Provider getBinding78Provider() { + public javax.inject.Provider getBinding78Provider() { return binding78Provider; } @Override - public Provider getBinding79Provider() { + public javax.inject.Provider getBinding79Provider() { return binding79Provider; } @Override - public Provider getBinding80Provider() { + public javax.inject.Provider getBinding80Provider() { return binding80Provider; } @Override - public Provider getBinding81Provider() { + public javax.inject.Provider getBinding81Provider() { return binding81Provider; } @Override - public Provider getBinding82Provider() { + public javax.inject.Provider getBinding82Provider() { return binding82Provider; } @Override - public Provider getBinding83Provider() { + public javax.inject.Provider getBinding83Provider() { return binding83Provider; } @Override - public Provider getBinding84Provider() { + public javax.inject.Provider getBinding84Provider() { return binding84Provider; } @Override - public Provider getBinding85Provider() { + public javax.inject.Provider getBinding85Provider() { return binding85Provider; } @Override - public Provider getBinding86Provider() { + public javax.inject.Provider getBinding86Provider() { return binding86Provider; } @Override - public Provider getBinding87Provider() { + public javax.inject.Provider getBinding87Provider() { return binding87Provider; } @Override - public Provider getBinding88Provider() { + public javax.inject.Provider getBinding88Provider() { return binding88Provider; } @Override - public Provider getBinding89Provider() { + public javax.inject.Provider getBinding89Provider() { return binding89Provider; } @Override - public Provider getBinding90Provider() { + public javax.inject.Provider getBinding90Provider() { return binding90Provider; } @Override - public Provider getBinding91Provider() { + public javax.inject.Provider getBinding91Provider() { return binding91Provider; } @Override - public Provider getBinding92Provider() { + public javax.inject.Provider getBinding92Provider() { return binding92Provider; } @Override - public Provider getBinding93Provider() { + public javax.inject.Provider getBinding93Provider() { return binding93Provider; } @Override - public Provider getBinding94Provider() { + public javax.inject.Provider getBinding94Provider() { return binding94Provider; } @Override - public Provider getBinding95Provider() { + public javax.inject.Provider getBinding95Provider() { return binding95Provider; } @Override - public Provider getBinding96Provider() { + public javax.inject.Provider getBinding96Provider() { return binding96Provider; } @Override - public Provider getBinding97Provider() { + public javax.inject.Provider getBinding97Provider() { return binding97Provider; } @Override - public Provider getBinding98Provider() { + public javax.inject.Provider getBinding98Provider() { return binding98Provider; } @Override - public Provider getBinding99Provider() { + public javax.inject.Provider getBinding99Provider() { return binding99Provider; } @Override - public Provider getBinding100Provider() { + public javax.inject.Provider getBinding100Provider() { return binding100Provider; } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_DEFAULT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_DEFAULT_MODE_test.DaggerTestComponent index 00679b41725..939d6cda194 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_DEFAULT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_DEFAULT_MODE_test.DaggerTestComponent @@ -46,12 +46,12 @@ final class DaggerTestComponent { @Override public Provider objectProvider() { - return ((Provider) TestModule_SFactory.create()); + return ((dagger.internal.Provider) TestModule_SFactory.create()); } @Override public Provider charSequenceProvider() { - return ((Provider) TestModule_SFactory.create()); + return ((dagger.internal.Provider) TestModule_SFactory.create()); } } } diff --git a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_FAST_INIT_MODE_test.DaggerTestComponent b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_FAST_INIT_MODE_test.DaggerTestComponent index 2970ba6f60c..f0d4e0d6136 100644 --- a/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_FAST_INIT_MODE_test.DaggerTestComponent +++ b/javatests/dagger/internal/codegen/goldens/SwitchingProviderTest_unscopedBinds_FAST_INIT_MODE_test.DaggerTestComponent @@ -1,8 +1,8 @@ package test; import dagger.internal.DaggerGenerated; +import dagger.internal.Provider; import javax.annotation.processing.Generated; -import javax.inject.Provider; @DaggerGenerated @Generated( @@ -53,12 +53,12 @@ final class DaggerTestComponent { } @Override - public Provider objectProvider() { + public javax.inject.Provider objectProvider() { return ((Provider) sProvider); } @Override - public Provider charSequenceProvider() { + public javax.inject.Provider charSequenceProvider() { return ((Provider) sProvider); } diff --git a/javatests/dagger/internal/codegen/kotlin/KspComponentProcessorTest.java b/javatests/dagger/internal/codegen/kotlin/KspComponentProcessorTest.java index cc4f5a1555e..b430dcda413 100644 --- a/javatests/dagger/internal/codegen/kotlin/KspComponentProcessorTest.java +++ b/javatests/dagger/internal/codegen/kotlin/KspComponentProcessorTest.java @@ -230,8 +230,8 @@ public void injectBindingWithProvidersComponentTest() throws Exception { "package test;", "", "import dagger.internal.DaggerGenerated;", + "import dagger.internal.Provider;", "import javax.annotation.processing.Generated;", - "import javax.inject.Provider;", "", "@DaggerGenerated", "@Generated(", @@ -283,7 +283,7 @@ public void injectBindingWithProvidersComponentTest() throws Exception { " }", "", " @Override", - " public Provider foo() {", + " public javax.inject.Provider foo() {", " return fooProvider;", " }", " }", diff --git a/javatests/dagger/producers/BUILD b/javatests/dagger/producers/BUILD index 0253799969e..6c768561424 100644 --- a/javatests/dagger/producers/BUILD +++ b/javatests/dagger/producers/BUILD @@ -31,6 +31,7 @@ GenJavaTests( functional = 0, javacopts = JAVA_RELEASE_MIN + DOCLINT_REFERENCES + DOCLINT_HTML_AND_SYNTAX, deps = [ + "//java/dagger:core", "//java/dagger/producers", "//third_party/java/guava:testlib", "//third_party/java/guava/collect", diff --git a/javatests/dagger/producers/internal/AbstractProducesMethodProducerTest.java b/javatests/dagger/producers/internal/AbstractProducesMethodProducerTest.java index af1350447c3..0b32d71708f 100644 --- a/javatests/dagger/producers/internal/AbstractProducesMethodProducerTest.java +++ b/javatests/dagger/producers/internal/AbstractProducesMethodProducerTest.java @@ -28,13 +28,13 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; +import dagger.internal.Provider; import dagger.producers.Producer; import dagger.producers.monitoring.ProducerMonitor; import dagger.producers.monitoring.ProducerToken; import dagger.producers.monitoring.ProductionComponentMonitor; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; -import javax.inject.Provider; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/javatests/dagger/producers/internal/ProducersTest.java b/javatests/dagger/producers/internal/ProducersTest.java index 1cfe12106ae..5b2d9c1036a 100644 --- a/javatests/dagger/producers/internal/ProducersTest.java +++ b/javatests/dagger/producers/internal/ProducersTest.java @@ -23,12 +23,12 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; +import dagger.internal.Provider; import dagger.producers.Produced; import dagger.producers.Producer; import java.util.Set; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; -import javax.inject.Provider; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4;