| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 part of dart.core; | |
| 6 | |
| 7 /** | |
| 8 * Representation of the invocation of a member on an object. | |
| 9 * | |
| 10 * This is the type of objects passed to [Object.noSuchMethod] when | |
| 11 * an object doesn't support the member invocation that was attempted | |
| 12 * on it. | |
| 13 */ | |
| 14 abstract class Invocation { | |
| 15 /** The name of the invoked member. */ | |
| 16 Symbol get memberName; | |
| 17 | |
| 18 /** | |
| 19 * An unmodifiable view of the positional arguments of the call. | |
| 20 * | |
| 21 * If the member is a getter, the positional arguments is empty. | |
| 22 */ | |
| 23 List get positionalArguments; | |
| 24 | |
| 25 /** | |
| 26 * An unmodifiable view of the named arguments of the call. | |
| 27 * | |
| 28 * If the member is a getter, setter or operator, the named arguments | |
| 29 * is empty. | |
| 30 */ | |
| 31 Map<Symbol, dynamic> get namedArguments; | |
| 32 | |
| 33 /** Whether the invocation was a method call. */ | |
| 34 bool get isMethod; | |
| 35 | |
| 36 /** | |
| 37 * Whether the invocation was a getter call. | |
| 38 * If so, both types of arguments is empty. | |
| 39 */ | |
| 40 bool get isGetter; | |
| 41 | |
| 42 /** | |
| 43 * Whether the invocation was a setter call. | |
| 44 * | |
| 45 * If so, [arguments] has exactly one positonal argument, | |
| 46 * and [namedArguments] is empty. | |
| 47 */ | |
| 48 bool get isSetter; | |
| 49 | |
| 50 /** Whether the invocation was a getter or a setter call. */ | |
| 51 bool get isAccessor => isGetter || isSetter; | |
| 52 } | |
| OLD | NEW |