koin-annotations icon indicating copy to clipboard operation
koin-annotations copied to clipboard

ForwardedParameters

Open undermark5 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. There does not appear to be a way to forward injected parameters to another managed dependency without writing that code out manually. Ideally there should be a way to name and forward injected parameters.

Describe the solution you'd like Perhaps a new annotation @ForwardedParameters which accepts an array of names, and a name property on the @InjectedParameter. The specified injected parameters are then forwarded to the specific dependency as injected parameters (in the order specified by the order in the array of names)

Describe alternatives you've considered Implementing KoinComponent and manually writing the injector/getter in the constructor as a default parameter value using the appropriate injected parameters. Or using KoinJavaComponent.get/inject

Target Koin project koin-annotations

undermark5 avatar Apr 05 '24 14:04 undermark5

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 02 '24 22:09 stale[bot]

Not stale, and issue #148 is effectively a duplicate of this (Unless I'm misunderstanding)

undermark5 avatar Sep 09 '24 17:09 undermark5