Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use named Provides if no unnamed exists #3

Open
Frotty opened this issue Feb 16, 2016 · 0 comments
Open

Use named Provides if no unnamed exists #3

Frotty opened this issue Feb 16, 2016 · 0 comments

Comments

@Frotty
Copy link

Frotty commented Feb 16, 2016

Hi. I want to use feather in a project that will use plugins. This means I will have interfaces the user can implement and inject into the system. However there are also defaults provided for the essential parts.
Now my problem is, that I want a named provider to be injected into an unnamed inject - WHEN there is no unnamed and no other named provides available (ie it's the only one with the right type).

I'm trying to achieve that you don't have to use "Named" annotations on parameters/fields when "overriding" the default provider. If you provide your own, unnamed provider, it will be chosen instead of the named one (this is already working). If you don't provide an unnamed one, the named default one should be used as fallback.

Any chance you will do this? Otherwise i need to hack it in myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant