Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Created March 8, 2023 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfcporciuncula/c39601e2c92209e118f37b86de1d741f to your computer and use it in GitHub Desktop.
Save tfcporciuncula/c39601e2c92209e118f37b86de1d741f to your computer and use it in GitHub Desktop.
- class GreetingHandler @AssistedInject constructor(
+ @Inject
+ class GreetingHandler(
    @Assisted private val assistedArg: String,
-   @SpecialGreeting1 private val specialGreeting1: String,
-   @SpecialGreeting2 private val specialGreeting2: String,
+   private val specialGreeting1: SpecialGreeting1,
+   private val specialGreeting2: SpecialGreeting2,
    private val greetings: Set<String>,
    private val greetingConcatenator: Lazy<GreetingConcatenator>,
-   private val platformGreeter: Provider<PlatformGreeter>,
+   private val platformGreeter: () -> PlatformGreeter,
  ) {
-   @AssistedFactory
-   interface Factory {
-     fun create(assistedArg: String): GreetingHandler
-   }
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment