Add reflectee to instance

This commit is contained in:
Tobe O 2018-08-20 22:19:48 -04:00
parent 95579e0ee9
commit b1d0cdf670
4 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,6 @@
# 1.0.0-alpha.2
* Added `ReflectedInstance.reflectee`.
# 1.0.0-alpha.1
* Allow omission of the first argument of `Container.make`, to use
a generic type argument instead.

View file

@ -163,7 +163,7 @@ class _ReflectedInstanceMirror extends ReflectedInstance {
_ReflectedInstanceMirror(this.mirror)
: super(new _ReflectedClassMirror(mirror.type),
new _ReflectedClassMirror(mirror.type));
new _ReflectedClassMirror(mirror.type), mirror.reflectee);
@override
T invoke<T>(Invocation invocation) {

View file

@ -16,8 +16,9 @@ abstract class Reflector {
abstract class ReflectedInstance {
final ReflectedType type;
final ReflectedClass clazz;
final Object reflectee;
const ReflectedInstance(this.type, this.clazz);
const ReflectedInstance(this.type, this.clazz, this.reflectee);
@override
int get hashCode => hash2(type, clazz);

View file

@ -1,5 +1,5 @@
name: angel_container
version: 1.0.0-alpha.1
version: 1.0.0-alpha.2
author: Tobe O <thosakwe@gmail.com>
description: "A better IoC container and dependency injector for Angel, ultimately allowing Angel to be used without dart:mirrors."
homepage: https://github.com/angel-dart/container.git