Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: sdk/lib/core/invocation.dart

Issue 22918025: Make Invocation.positionalArguments and .namedArguments never be null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/invocation_mirror_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. */
16 Symbol get memberName; 16 Symbol get memberName;
17 17
18 /** An unmodifiable view of the positional arguments of the call. */ 18 /**
19 * An unmodifiable view of the positional arguments of the call.
20 *
21 * If the member is a getter, the positional arguments will be empty.
floitsch 2013/08/23 16:10:03 is empty.
22 */
19 List get positionalArguments; 23 List get positionalArguments;
20 24
21 /** An unmodifiable view of the named arguments of the call. */ 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
floitsch 2013/08/23 16:10:03 is empty.
29 * will be empty.
30 */
22 Map<Symbol, dynamic> get namedArguments; 31 Map<Symbol, dynamic> get namedArguments;
23 32
24 /** Whether the invocation was a method call. */ 33 /** Whether the invocation was a method call. */
25 bool get isMethod; 34 bool get isMethod;
26 35
27 /** 36 /**
28 * Whether the invocation was a getter call. 37 * Whether the invocation was a getter call.
29 * If so, both types of arguments will be null. 38 * If so, both types of arguments will be empty.
floitsch 2013/08/23 16:10:03 is empty.
30 */ 39 */
31 bool get isGetter; 40 bool get isGetter;
32 41
33 /** 42 /**
34 * Whether the invocation was a setter call. 43 * Whether the invocation was a setter call.
35 * 44 *
36 * If so, [arguments] will have exactly one positonal argument, 45 * If so, [arguments] will have exactly one positonal argument,
37 * and namedArguments will be null. 46 * and namedArguments will be empty.
floitsch 2013/08/23 16:10:03 has exactly ... is empty.
38 */ 47 */
39 bool get isSetter; 48 bool get isSetter;
40 49
41 /** Whether the invocation was a getter or a setter call. */ 50 /** Whether the invocation was a getter or a setter call. */
42 bool get isAccessor => isGetter || isSetter; 51 bool get isAccessor => isGetter || isSetter;
43 } 52 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/invocation_mirror_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698