Chromium Code Reviews| 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 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Representation of the invocation of a member on an object. | 8 * Representation of the invocation of a member on an object. |
| 9 * | 9 * |
| 10 * This is the type of objects passed to [Object.noSuchMethod] when | 10 * This is the type of objects passed to [Object.noSuchMethod] when |
| 11 * an object doesn't support the member invocation that was attempted | 11 * an object doesn't support the member invocation that was attempted |
| 12 * on it. | 12 * on it. |
| 13 */ | 13 */ |
| 14 abstract class Invocation { | 14 abstract class Invocation { |
| 15 /** The name of the invoked member. */ | 15 /** The name of the invoked member. */ |
|
Ivan Posva
2013/04/16 18:19:49
To be able to get the "name" of the invoked member
ahe
2013/04/16 18:32:00
Did you notice MirrorSystem.getName? Does that pro
| |
| 16 String get memberName; | 16 Symbol get memberName; |
| 17 | 17 |
| 18 /** An unmodifiable view of the positional arguments of the call. */ | 18 /** An unmodifiable view of the positional arguments of the call. */ |
| 19 List get positionalArguments; | 19 List get positionalArguments; |
| 20 | 20 |
| 21 /** An unmodifiable view of the named arguments of the call. */ | 21 /** An unmodifiable view of the named arguments of the call. */ |
| 22 Map<String, dynamic> get namedArguments; | 22 Map<Symbol, dynamic> get namedArguments; |
| 23 | 23 |
| 24 /** Whether the invocation was a method call. */ | 24 /** Whether the invocation was a method call. */ |
| 25 bool get isMethod; | 25 bool get isMethod; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Whether the invocation was a getter call. | 28 * Whether the invocation was a getter call. |
| 29 * If so, both types of arguments will be null. | 29 * If so, both types of arguments will be null. |
| 30 */ | 30 */ |
| 31 bool get isGetter; | 31 bool get isGetter; |
| 32 | 32 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * Perform the invocation on the provided object. | 45 * Perform the invocation on the provided object. |
| 46 * | 46 * |
| 47 * If the object doesn't support the invocation, its [noSuchMethod] | 47 * If the object doesn't support the invocation, its [noSuchMethod] |
| 48 * method will be called with either this [InvocationMirror] or another | 48 * method will be called with either this [InvocationMirror] or another |
| 49 * equivalent [InvocationMirror]. | 49 * equivalent [InvocationMirror]. |
| 50 */ | 50 */ |
| 51 invokeOn(Object receiver); | 51 invokeOn(Object receiver); |
| 52 } | 52 } |
| OLD | NEW |