File tree 1 file changed +9
-8
lines changed
app/src/main/kotlin/com/hana053/micropost/interactor
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -41,32 +41,33 @@ fun interactorModule() = Kodein.Module {
41
41
}
42
42
43
43
bind<LoginInteractor >() with singleton {
44
- instance<Retrofit >().create( LoginInteractor :: class .java )
44
+ instance<Retrofit >().create< LoginInteractor >( )
45
45
}
46
46
47
47
bind<FeedInteractor >() with singleton {
48
- instance<Retrofit >().create( FeedInteractor :: class .java )
48
+ instance<Retrofit >().create< FeedInteractor >( )
49
49
}
50
50
51
51
bind<UserInteractor >() with singleton {
52
- instance<Retrofit >().create( UserInteractor :: class .java )
52
+ instance<Retrofit >().create< UserInteractor >( )
53
53
}
54
54
55
55
bind<RelationshipInteractor >() with singleton {
56
- instance<Retrofit >().create( RelationshipInteractor :: class .java )
56
+ instance<Retrofit >().create< RelationshipInteractor >( )
57
57
}
58
58
59
59
bind<UserMicropostInteractor >() with singleton {
60
- instance<Retrofit >().create( UserMicropostInteractor :: class .java )
60
+ instance<Retrofit >().create< UserMicropostInteractor >( )
61
61
}
62
62
63
63
bind<MicropostInteractor >() with singleton {
64
- instance<Retrofit >().create( MicropostInteractor :: class .java )
64
+ instance<Retrofit >().create< MicropostInteractor >( )
65
65
}
66
66
67
67
bind<RelatedUserListInteractor >() with singleton {
68
- instance<Retrofit >().create( RelatedUserListInteractor :: class .java )
68
+ instance<Retrofit >().create< RelatedUserListInteractor >( )
69
69
}
70
-
71
70
}
72
71
72
+ inline fun <reified T : Any > Retrofit.create (): T = create(T ::class .java)
73
+
You can’t perform that action at this time.
0 commit comments