aboutsummaryrefslogtreecommitdiff
path: root/src/Utilities/GuiceModule.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utilities/GuiceModule.kt')
-rw-r--r--src/Utilities/GuiceModule.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Utilities/GuiceModule.kt b/src/Utilities/GuiceModule.kt
index 4ce4863d..57bad468 100644
--- a/src/Utilities/GuiceModule.kt
+++ b/src/Utilities/GuiceModule.kt
@@ -45,14 +45,14 @@ class GuiceModule(val config: DokkaGenerator) : Module {
}
-private inline fun <reified T> Binder.registerCategory(category: String) {
+private inline fun <reified T: Any> Binder.registerCategory(category: String) {
ServiceLocator.allServices(category).forEach {
- @suppress("UNCHECKED_CAST")
+ @Suppress("UNCHECKED_CAST")
bind(javaClass<T>()).annotatedWith(Names.named(it.name)).to(javaClass<T>().classLoader.loadClass(it.className) as Class<T>)
}
}
-private inline fun <reified Base, reified T : Base> Binder.bindNameAnnotated(name: String) {
+private inline fun <reified Base : Any, reified T : Base> Binder.bindNameAnnotated(name: String) {
bind(javaClass<Base>()).annotatedWith(Names.named(name)).to(javaClass<T>())
}