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.generated.testing.element_factory; | 5 library analyzer.src.generated.testing.element_factory; |
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/ast/token.dart'; |
10 import 'package:analyzer/dart/element/element.dart'; | 11 import 'package:analyzer/dart/element/element.dart'; |
11 import 'package:analyzer/dart/element/type.dart'; | 12 import 'package:analyzer/dart/element/type.dart'; |
12 import 'package:analyzer/src/dart/element/element.dart'; | 13 import 'package:analyzer/src/dart/element/element.dart'; |
13 import 'package:analyzer/src/dart/element/type.dart'; | 14 import 'package:analyzer/src/dart/element/type.dart'; |
14 import 'package:analyzer/src/generated/constant.dart'; | 15 import 'package:analyzer/src/generated/constant.dart'; |
15 import 'package:analyzer/src/generated/engine.dart'; | 16 import 'package:analyzer/src/generated/engine.dart'; |
16 import 'package:analyzer/src/generated/java_core.dart'; | 17 import 'package:analyzer/src/generated/java_core.dart'; |
17 import 'package:analyzer/src/generated/resolver.dart'; | 18 import 'package:analyzer/src/generated/resolver.dart'; |
18 import 'package:analyzer/src/generated/scanner.dart'; | |
19 import 'package:analyzer/src/generated/source.dart'; | 19 import 'package:analyzer/src/generated/source.dart'; |
20 import 'package:analyzer/src/generated/testing/ast_factory.dart'; | 20 import 'package:analyzer/src/generated/testing/ast_factory.dart'; |
21 import 'package:analyzer/src/generated/utilities_dart.dart'; | 21 import 'package:analyzer/src/generated/utilities_dart.dart'; |
22 import 'package:path/path.dart'; | 22 import 'package:path/path.dart'; |
23 | 23 |
24 /** | 24 /** |
25 * The class `ElementFactory` defines utility methods used to create elements fo
r testing | 25 * The class `ElementFactory` defines utility methods used to create elements fo
r testing |
26 * purposes. The elements that are created are complete in the sense that as muc
h of the element | 26 * purposes. The elements that are created are complete in the sense that as muc
h of the element |
27 * model as can be created, given the provided information, has been created. | 27 * model as can be created, given the provided information, has been created. |
28 */ | 28 */ |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 642 } |
643 | 643 |
644 static TypeParameterElementImpl typeParameterWithType(String name, | 644 static TypeParameterElementImpl typeParameterWithType(String name, |
645 [DartType bound]) { | 645 [DartType bound]) { |
646 TypeParameterElementImpl typeParameter = typeParameterElement(name); | 646 TypeParameterElementImpl typeParameter = typeParameterElement(name); |
647 typeParameter.type = new TypeParameterTypeImpl(typeParameter); | 647 typeParameter.type = new TypeParameterTypeImpl(typeParameter); |
648 typeParameter.bound = bound; | 648 typeParameter.bound = bound; |
649 return typeParameter; | 649 return typeParameter; |
650 } | 650 } |
651 } | 651 } |
OLD | NEW |