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 class Symbol { | 8 class Symbol { |
9 | 9 |
10 /** | 10 /** |
11 * Constructs a new Symbol. | 11 * Constructs a new Symbol. |
12 * | 12 * |
13 * An [ArgumentError] is thrown if [name] starts with an underscore, | 13 * An [ArgumentError] is thrown if [name] starts with an underscore, |
14 * or if [name] is not a [String]. An [ArgumentError] is thrown if | 14 * or if [name] is not a [String]. An [ArgumentError] is thrown if |
15 * [name] is not an empty string and is not a valid identifier | 15 * [name] is not an empty string and is not a valid identifier |
16 * optionally followed by [:'=':]. | 16 * optionally followed by [:'=':]. |
17 */ | 17 */ |
18 external const Symbol(String name); | 18 external const Symbol(String name); |
19 | 19 |
20 external bool operator ==(other); | 20 external bool operator ==(other); |
21 | 21 |
22 external int get hashCode; | 22 external int get hashCode; |
23 | |
24 // TODO(ahe): Who to remove this? | |
ahe
2013/04/11 20:12:27
I meant "How to remove this?". I think I know now
| |
25 external static String getName(Symbol symbol); | |
23 } | 26 } |
OLD | NEW |