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.element; | 5 library analyzer.src.generated.element; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
9 | 9 |
10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
(...skipping 8112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8123 for (Element child in children) { | 8123 for (Element child in children) { |
8124 child.accept(visitor); | 8124 child.accept(visitor); |
8125 } | 8125 } |
8126 } | 8126 } |
8127 } | 8127 } |
8128 | 8128 |
8129 /** | 8129 /** |
8130 * Return the type that results from replacing the type parameters in the | 8130 * Return the type that results from replacing the type parameters in the |
8131 * given [type] with the type arguments associated with this member. | 8131 * given [type] with the type arguments associated with this member. |
8132 */ | 8132 */ |
8133 @deprecated | |
8134 DartType substituteFor(DartType type) { | 8133 DartType substituteFor(DartType type) { |
8135 if (type == null) { | 8134 if (type == null) { |
8136 return null; | 8135 return null; |
8137 } | 8136 } |
8138 List<DartType> argumentTypes = _definingType.typeArguments; | 8137 List<DartType> argumentTypes = _definingType.typeArguments; |
8139 List<DartType> parameterTypes = | 8138 List<DartType> parameterTypes = |
8140 TypeParameterTypeImpl.getTypes(_definingType.typeParameters); | 8139 TypeParameterTypeImpl.getTypes(_definingType.typeParameters); |
8141 return type.substitute2(argumentTypes, parameterTypes); | 8140 return type.substitute2(argumentTypes, parameterTypes); |
8142 } | 8141 } |
8143 | 8142 |
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10830 | 10829 |
10831 @override | 10830 @override |
10832 void visitElement(Element element) { | 10831 void visitElement(Element element) { |
10833 int offset = element.nameOffset; | 10832 int offset = element.nameOffset; |
10834 if (offset != -1) { | 10833 if (offset != -1) { |
10835 map[offset] = element; | 10834 map[offset] = element; |
10836 } | 10835 } |
10837 super.visitElement(element); | 10836 super.visitElement(element); |
10838 } | 10837 } |
10839 } | 10838 } |
OLD | NEW |