Closed rvdsoft closed 3 years ago
Hi rvdsoft,
I think PopKorn can achieve the same results with less code. If some parameters needs to be injected and some others don't, just add the ones you want to be injected by default:
@Injectable
class MyPresenter(foo:String, foo2:String = inject<String>()) *
You can then create your presenter like this: MyPresenter("some"). You don't need any factories.
*Notice that PopKorn can inject primitive types too (Int, Long, String...)
Thanks
Hi rvdsoft,
I'm glad to announce that version 2.1.0 introduces Assisted Dependencies:
@Injectable(BY_NEW)
class MyPresenter(@Assisted someId:Long, other:MyClass)
and to be used anywhere like this:
inject<MyPresenter>{
assist(344L)
}
Would be nice if you added something like Assisted Inject.