Voiteh / Depin

Dependency injection library for Ceylon
Apache License 2.0
0 stars 0 forks source link

Resolve default dependency when named is not provided #36

Closed Voiteh closed 5 years ago

Voiteh commented 5 years ago

Whenever we want to provide a dependency it's name is taken in consideration to be injected. There should be a way to perform injection of first found dependency on Type branch to ease injection of singletons. In such case there should be annotation for controlling of such behavior.

Voiteh commented 5 years ago

We could have FallbackDecorator introducing fallback annotation providing ability to fallback everytime the injection fails. Probably we could hold this as separate collection Map<Type<>,Dependency>> in Dependencies class