OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
6 * Everything in Dart is an [Object]. | 6 * Everything in Dart is an [Object]. |
7 */ | 7 */ |
8 class Object { | 8 class Object { |
9 /** | 9 /** |
10 * Creates a new [Object] instance. | 10 * Creates a new [Object] instance. |
(...skipping 30 matching lines...) Expand all Loading... |
41 external int get hashCode; | 41 external int get hashCode; |
42 | 42 |
43 /** | 43 /** |
44 * Returns a string representation of this object. | 44 * Returns a string representation of this object. |
45 */ | 45 */ |
46 external String toString(); | 46 external String toString(); |
47 | 47 |
48 /** | 48 /** |
49 * [noSuchMethod] is invoked when users invoke a non-existant method | 49 * [noSuchMethod] is invoked when users invoke a non-existant method |
50 * on an object. The name of the method and the arguments of the | 50 * on an object. The name of the method and the arguments of the |
51 * invocation are passed to [noSuchMethod]. If [noSuchMethod] | 51 * invocation are passed to [noSuchMethod] in an [InvocationMirror]. |
52 * returns a value, that value becomes the result of the original | 52 * If [noSuchMethod] returns a value, that value becomes the result of |
53 * invocation. | 53 * the original invocation. |
54 * | 54 * |
55 * The default behavior of [noSuchMethod] is to throw a | 55 * The default behavior of [noSuchMethod] is to throw a |
56 * [noSuchMethodError]. | 56 * [noSuchMethodError]. |
57 */ | 57 */ |
58 external Dynamic noSuchMethod(String name, List args); | 58 external dynamic noSuchMethod(InvocationMirror invocation); |
| 59 |
59 /** | 60 /** |
60 * A representation of the runtime type of the object. | 61 * A representation of the runtime type of the object. |
61 */ | 62 */ |
62 external Type get runtimeType; | 63 external Type get runtimeType; |
63 } | 64 } |
64 | 65 |
OLD | NEW |