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 part of initialize; | 4 part of initialize; |
5 | 5 |
6 /// Implement this class to create your own initializer. | 6 /// Implement this class to create your own initializer. |
7 /// | 7 /// |
8 /// Hello world example: | 8 /// Hello world example: |
9 /// | 9 /// |
10 /// class Print implements Initializer<Type> { | 10 /// class Print implements Initializer<Type> { |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // The package this library lives in. May be null if its the same as the root | 35 // The package this library lives in. May be null if its the same as the root |
36 // package. | 36 // package. |
37 final String package; | 37 final String package; |
38 | 38 |
39 // The path to the library. | 39 // The path to the library. |
40 final String path; | 40 final String path; |
41 | 41 |
42 const LibraryIdentifier(this.name, this.package, this.path); | 42 const LibraryIdentifier(this.name, this.package, this.path); |
43 | 43 |
44 bool operator ==(LibraryIdentifier other) => | 44 bool operator ==(dynamic other) => |
45 name == other.name && package == other.package && path == other.path; | 45 other is LibraryIdentifier && |
| 46 name == other.name && |
| 47 package == other.package && |
| 48 path == other.path; |
46 | 49 |
47 String toString() => '$name: $package:$path'; | 50 String toString() => '$name: $package:$path'; |
48 } | 51 } |
OLD | NEW |