Skip to content
This repository has been archived by the owner on Dec 8, 2019. It is now read-only.

Allow resolving with 'subtype' aka named dependencies #2

Open
karfau opened this issue Jul 12, 2014 · 0 comments
Open

Allow resolving with 'subtype' aka named dependencies #2

karfau opened this issue Jul 12, 2014 · 0 comments

Comments

@karfau
Copy link
Owner

karfau commented Jul 12, 2014

In other libraries there is a feature that is known as "named dependencies", that allows to differentiate dependencies not only by type, but also by a String.

I think It is not nessesary to restrict this to a String.
Any argument to Resolver.get(...) after the first one could specify a subtype to differentiate what should be returned.

This would require to change the interface in a way that could even allow any level of nesting.

This would also allow to solve #1 in this way:

resolver.get(Provider, Dependency);

which could just return the currently mapped provider from the mapping for the second argument.

@karfau karfau changed the title Allow resolving with *subtype* aka named dependencies Allow resolving with 'subtype' aka named dependencies Jul 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant