Examples of using Guice with Kotlin
This repo provides examples of using Google Guice with Kotlin.
Examples include:
- Simple injection using a module, mapping an interface to an implementing class
- Using the Singleton scope
- Injection mapping to an instance
- Injection using the
@Provides
annotation and a constructor method - Annotation-based bindings
- Injection using a Provider class
- Injection using a MapBinder and a Factory so implementations can be selected at runtime
- Using Assisted Inject
For more information, see the comments in MainGuiceModule.kt
$ mvn exec:java
- Google Guice
- Eat Code Sleep Repeat - Google Guice Tutorial on YouTube
- MVP Java - Google Guice Tutorial on YouTube
- Advanced Dependency Injection With Guice on dzone