| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dev_compiler.src.closure.closure_codegen; | |
| 6 | |
| 7 import 'package:analyzer/analyzer.dart' show ParameterKind; | 5 import 'package:analyzer/analyzer.dart' show ParameterKind; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 6 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; | 7 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; |
| 10 | 8 |
| 11 import 'closure_annotation.dart'; | 9 import 'closure_annotation.dart'; |
| 12 import 'closure_type.dart'; | 10 import 'closure_type.dart'; |
| 13 | 11 |
| 14 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types. | 12 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types. |
| 15 abstract class ClosureAnnotator { | 13 abstract class ClosureAnnotator { |
| 16 TypeProvider get types; | 14 TypeProvider get types; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 if (type is InterfaceType) { | 133 if (type is InterfaceType) { |
| 136 return _closureTypeForClass(type.element, type); | 134 return _closureTypeForClass(type.element, type); |
| 137 } | 135 } |
| 138 return new ClosureType.unknown(); | 136 return new ClosureType.unknown(); |
| 139 } | 137 } |
| 140 | 138 |
| 141 /// TODO(ochafik): Use a package-and-file-uri-dependent naming, since librarie
s can collide. | 139 /// TODO(ochafik): Use a package-and-file-uri-dependent naming, since librarie
s can collide. |
| 142 String _getFullName(ClassElement type) => | 140 String _getFullName(ClassElement type) => |
| 143 type.library.name == '' ? type.name : '${type.library.name}.${type.name}'; | 141 type.library.name == '' ? type.name : '${type.library.name}.${type.name}'; |
| 144 } | 142 } |
| OLD | NEW |