| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /// Opaque name used by mirrors, invocations and [Function.apply]. | 7 /// Opaque name used by mirrors, invocations and [Function.apply]. |
| 8 abstract class Symbol { | 8 abstract class Symbol { |
| 9 /** | 9 /** |
| 10 * Constructs a new Symbol. | 10 * Constructs a new Symbol. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * "`^`", "`~`", "`<<`", "`>>`", "`<`", "`<=`", "`>`", "`>=`", "`==`", | 24 * "`^`", "`~`", "`<<`", "`>>`", "`<`", "`<=`", "`>`", "`>=`", "`==`", |
| 25 * "`[]`", "`[]=`", or "`unary-`"), | 25 * "`[]`", "`[]=`", or "`unary-`"), |
| 26 * * any of the above preceded by any number of qualifiers, | 26 * * any of the above preceded by any number of qualifiers, |
| 27 * where a qualifier is a non-private identifier followed by '`.`', | 27 * where a qualifier is a non-private identifier followed by '`.`', |
| 28 * * or the empty string (the default name of a library with no library | 28 * * or the empty string (the default name of a library with no library |
| 29 * name declaration). | 29 * name declaration). |
| 30 * | 30 * |
| 31 * The following text is non-normative: | 31 * The following text is non-normative: |
| 32 * | 32 * |
| 33 * Creating non-const Symbol instances may result in larger output. If | 33 * Creating non-const Symbol instances may result in larger output. If |
| 34 * possible, use [MirrorsUsed] in "dart:mirrors" to specify which names might | 34 * possible, use `MirrorsUsed` from "dart:mirrors" to specify which names |
| 35 * be passed to this constructor. | 35 * might be passed to this constructor. |
| 36 */ | 36 */ |
| 37 const factory Symbol(String name) = internal.Symbol; | 37 const factory Symbol(String name) = internal.Symbol; |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * Returns a hash code compatible with [operator==]. | 40 * Returns a hash code compatible with [operator==]. |
| 41 * | 41 * |
| 42 * Equal symbols have the same hash code. | 42 * Equal symbols have the same hash code. |
| 43 */ | 43 */ |
| 44 int get hashCode; | 44 int get hashCode; |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Symbols are equal to other symbols that correspond to the same member name. | 47 * Symbols are equal to other symbols that correspond to the same member name. |
| 48 * | 48 * |
| 49 * Qualified member names, like `#foo.bar` are equal only if they have the | 49 * Qualified member names, like `#foo.bar` are equal only if they have the |
| 50 * same identifiers before the same final member name. | 50 * same identifiers before the same final member name. |
| 51 */ | 51 */ |
| 52 bool operator ==(other); | 52 bool operator ==(other); |
| 53 } | 53 } |
| OLD | NEW |