| 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 analyzer.task.dart; | 5 library analyzer.task.dart; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/error.dart'; | 10 import 'package:analyzer/src/generated/error.dart'; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 * Initialize a newly created target for the [unit] in the [library]. | 160 * Initialize a newly created target for the [unit] in the [library]. |
| 161 */ | 161 */ |
| 162 LibrarySpecificUnit(this.library, this.unit); | 162 LibrarySpecificUnit(this.library, this.unit); |
| 163 | 163 |
| 164 @override | 164 @override |
| 165 int get hashCode { | 165 int get hashCode { |
| 166 return JenkinsSmiHash.combine(library.hashCode, unit.hashCode); | 166 return JenkinsSmiHash.combine(library.hashCode, unit.hashCode); |
| 167 } | 167 } |
| 168 | 168 |
| 169 @override | 169 @override |
| 170 Source get librarySource => library; |
| 171 |
| 172 @override |
| 170 Source get source => unit; | 173 Source get source => unit; |
| 171 | 174 |
| 172 @override | 175 @override |
| 173 bool operator ==(other) { | 176 bool operator ==(other) { |
| 174 return other is LibrarySpecificUnit && | 177 return other is LibrarySpecificUnit && |
| 175 other.library == library && | 178 other.library == library && |
| 176 other.unit == unit; | 179 other.unit == unit; |
| 177 } | 180 } |
| 178 | 181 |
| 179 @override | 182 @override |
| 180 String toString() => '$unit in $library'; | 183 String toString() => '$unit in $library'; |
| 181 } | 184 } |
| OLD | NEW |