| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library analyzer.src.task.targets; |
| 6 |
| 7 import 'package:analyzer/src/generated/source.dart'; |
| 8 import 'package:analyzer/task/model.dart'; |
| 9 |
| 10 /** |
| 11 * A `SourceTarget` is a [Source] that can be used as an [AnalysisTarget]. |
| 12 */ |
| 13 class SourceTarget implements AnalysisTarget { |
| 14 /** |
| 15 * The source being represented as a target. |
| 16 */ |
| 17 final Source source; |
| 18 |
| 19 /** |
| 20 * Initialize a newly created target to represent the given [source]. |
| 21 */ |
| 22 SourceTarget(this.source); |
| 23 |
| 24 @override |
| 25 int get hashCode => source.hashCode; |
| 26 |
| 27 @override |
| 28 bool operator ==(Object object) { |
| 29 return object is SourceTarget && object.source == source; |
| 30 } |
| 31 } |
| OLD | NEW |