@@ -4,13 +4,13 @@ class DirectiveTypeTuple {
4
4
final Directive directive;
5
5
final Type type;
6
6
DirectiveTypeTuple (this .directive, this .type);
7
- toString () => '@$directive #$type ' ;
7
+ String toString () => '@$directive #$type ' ;
8
8
}
9
9
10
10
@Injectable ()
11
11
class DirectiveMap {
12
12
final Map <String , List <DirectiveTypeTuple >> map = new HashMap <String , List <DirectiveTypeTuple >>();
13
- DirectiveSelectorFactory _directiveSelectorFactory;
13
+ final DirectiveSelectorFactory _directiveSelectorFactory;
14
14
FormatterMap _formatters;
15
15
DirectiveSelector _selector;
16
16
@@ -20,10 +20,10 @@ class DirectiveMap {
20
20
this ._directiveSelectorFactory) {
21
21
(injector as ModuleInjector ).types.forEach ((type) {
22
22
metadataExtractor (type)
23
- .where ((annotation) => annotation is Directive )
24
- .forEach ((Directive directive ) {
25
- map.putIfAbsent (directive .selector, () => []).add (new DirectiveTypeTuple (directive , type));
26
- });
23
+ .where ((annotation) => annotation is Directive )
24
+ .forEach ((Directive dir ) {
25
+ map.putIfAbsent (dir .selector, () => []).add (new DirectiveTypeTuple (dir , type));
26
+ });
27
27
});
28
28
}
29
29
@@ -39,8 +39,8 @@ class DirectiveMap {
39
39
}
40
40
41
41
void forEach (fn (K , Type )) {
42
- map.forEach ((_, types) {
43
- types.forEach ((tuple) {
42
+ map.values. forEach ((List < DirectiveTypeTuple > types) {
43
+ types.forEach ((DirectiveTypeTuple tuple) {
44
44
fn (tuple.directive, tuple.type);
45
45
});
46
46
});
0 commit comments