OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library analyzer.src.dart.resolver.scope; | 5 library analyzer.src.dart.resolver.scope; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 class Namespace { | 656 class Namespace { |
657 /** | 657 /** |
658 * An empty namespace. | 658 * An empty namespace. |
659 */ | 659 */ |
660 static Namespace EMPTY = new Namespace(new HashMap<String, Element>()); | 660 static Namespace EMPTY = new Namespace(new HashMap<String, Element>()); |
661 | 661 |
662 /** | 662 /** |
663 * A table mapping names that are defined in this namespace to the element | 663 * A table mapping names that are defined in this namespace to the element |
664 * representing the thing declared with that name. | 664 * representing the thing declared with that name. |
665 */ | 665 */ |
666 final HashMap<String, Element> _definedNames; | 666 final Map<String, Element> _definedNames; |
667 | 667 |
668 /** | 668 /** |
669 * Initialize a newly created namespace to have the [_definedNames]. | 669 * Initialize a newly created namespace to have the [_definedNames]. |
670 */ | 670 */ |
671 Namespace(this._definedNames); | 671 Namespace(this._definedNames); |
672 | 672 |
673 /** | 673 /** |
674 * Return a table containing the same mappings as those defined by this | 674 * Return a table containing the same mappings as those defined by this |
675 * namespace. | 675 * namespace. |
676 */ | 676 */ |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1166 |
1167 /** | 1167 /** |
1168 * Define the type parameters declared by the [classElement]. | 1168 * Define the type parameters declared by the [classElement]. |
1169 */ | 1169 */ |
1170 void _defineTypeParameters(ClassElement classElement) { | 1170 void _defineTypeParameters(ClassElement classElement) { |
1171 for (TypeParameterElement typeParameter in classElement.typeParameters) { | 1171 for (TypeParameterElement typeParameter in classElement.typeParameters) { |
1172 define(typeParameter); | 1172 define(typeParameter); |
1173 } | 1173 } |
1174 } | 1174 } |
1175 } | 1175 } |
OLD | NEW |