Skip to content

Use named Provides if no unnamed exists #3

Description

@Frotty

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions