ltackmann/dice — pull request #1 by ggirou (2013-03-23 23:45:35+00:00)
Title: Beginning of injection using dart:mirrors

Let me know what you think about.

Here's my changes:
- Injector.getInstance now returns a Future.
- Changed Injector to an abstract class and created InjectorImpl. The implementation is hidden and it's easier to test directly than private methods.
- Inject into variables and setters prefixed with $ or _$
- Added toClassMirror in Binder. I think it's not the best way how I've done it, maybe a specific implementation as ClassMirrorBinder could be better.

Limitation of dart:mirrors:references
- Parameter name doesn't work, it returns "TODO:unnamed" : I'd like to inject dependencies into setters or constructors with prefixed parameters instead of prefixed name.
- We are not able to get Type from a TypeMirror, and TypeMirror from Type

To do:
- Injection into constructors
- Check if a variable is final, static, ...
- Tests with inherired class
- How to manage singleton?
- How to manage circular references?