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

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

Issue 1971193002: Patches to support Dart VM patch files in dart2js. (Closed) Base URL: sso://user/ahe/dart-sdk@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « sdk/lib/core/errors.dart ('k') | sdk/lib/core/null.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 * An [Expando] allows adding new properties to objects. 8 * An [Expando] allows adding new properties to objects.
9 * 9 *
10 * Does not work on numbers, strings, booleans or null. 10 * Does not work on numbers, strings, booleans or null.
(...skipping 18 matching lines...) Expand all
29 * no name was passed to the constructor, the name is [:null:]. 29 * no name was passed to the constructor, the name is [:null:].
30 */ 30 */
31 final String name; 31 final String name;
32 32
33 /** 33 /**
34 * Creates a new [Expando]. The optional name is only used for 34 * Creates a new [Expando]. The optional name is only used for
35 * debugging purposes and creating two different [Expando]s with the 35 * debugging purposes and creating two different [Expando]s with the
36 * same name yields two [Expando]s that work on different properties 36 * same name yields two [Expando]s that work on different properties
37 * of the objects they are used on. 37 * of the objects they are used on.
38 */ 38 */
39 external Expando([String name]); 39 external Expando([this.name]);
40 40
41 /** 41 /**
42 * Expando toString method override. 42 * Expando toString method override.
43 */ 43 */
44 String toString() => "Expando:$name"; 44 String toString() => "Expando:$name";
45 45
46 /** 46 /**
47 * Gets the value of this [Expando]'s property on the given 47 * Gets the value of this [Expando]'s property on the given
48 * object. If the object hasn't been expanded, the method returns 48 * object. If the object hasn't been expanded, the method returns
49 * [:null:]. 49 * [:null:].
50 * 50 *
51 * The object must not be a number, a string, a boolean or null. 51 * The object must not be a number, a string, a boolean or null.
52 */ 52 */
53 external T operator [](Object object); 53 external T operator [](Object object);
54 54
55 /** 55 /**
56 * Sets the value of this [Expando]'s property on the given 56 * Sets the value of this [Expando]'s property on the given
57 * object. Properties can effectively be removed again by setting 57 * object. Properties can effectively be removed again by setting
58 * their value to null. 58 * their value to null.
59 * 59 *
60 * The object must not be a number, a string, a boolean or null. 60 * The object must not be a number, a string, a boolean or null.
61 */ 61 */
62 external void operator []=(Object object, T value); 62 external void operator []=(Object object, T value);
63 63
64 } 64 }
OLDNEW
« no previous file with comments | « sdk/lib/core/errors.dart ('k') | sdk/lib/core/null.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698