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

Side by Side Diff: sdk/lib/mirrors/mirrors.dart

Issue 24631003: Add proper API for creating private symbols wrt a library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 2 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
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 // For the purposes of the mirrors library, we adopt a naming 5 // For the purposes of the mirrors library, we adopt a naming
6 // convention with respect to getters and setters. Specifically, for 6 // convention with respect to getters and setters. Specifically, for
7 // some variable or field... 7 // some variable or field...
8 // 8 //
9 // var myField; 9 // var myField;
10 // 10 //
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 /** 98 /**
99 * Returns the name of [symbol]. 99 * Returns the name of [symbol].
100 * 100 *
101 * The following text is non-normative: 101 * The following text is non-normative:
102 * 102 *
103 * Using this method may result in larger output. If possible, use 103 * Using this method may result in larger output. If possible, use
104 * [MirrorsUsed] to specify which symbols must be retained in clear text. 104 * [MirrorsUsed] to specify which symbols must be retained in clear text.
105 */ 105 */
106 external static String getName(Symbol symbol); 106 external static String getName(Symbol symbol);
107
108 /**
109 * Returns a symbol for [name]. If [name] is a private identifier, the symbol
110 * returned is with respect to [lib].
ahe 2013/10/11 10:27:15 What happens if name is a private identifier and l
rmacnak 2013/10/11 20:39:33 Specified ArgumentError.
111 *
112 * The following text is non-normative:
113 *
114 * Using this method may result in larger output. If possible, use
115 * the const constructor of Symbol or symbol literals.
116 */
117 external static Symbol getSymbol(String name, [LibraryMirror lib]);
ahe 2013/10/11 10:27:15 Change from "lib" to "library" (don't abbreviate).
rmacnak 2013/10/11 20:39:33 Done.
107 } 118 }
108 119
109 /** 120 /**
110 * Returns a [MirrorSystem] for the current isolate. 121 * Returns a [MirrorSystem] for the current isolate.
111 */ 122 */
112 external MirrorSystem currentMirrorSystem(); 123 external MirrorSystem currentMirrorSystem();
113 124
114 /** 125 /**
115 * Creates a [MirrorSystem] for the isolate which is listening on 126 * Creates a [MirrorSystem] for the isolate which is listening on
116 * the [SendPort]. 127 * the [SendPort].
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 * 1358 *
1348 * When used as metadata on an import of "dart:mirrors", this metadata does 1359 * When used as metadata on an import of "dart:mirrors", this metadata does
1349 * not apply to the library in which the annotation is used, but instead 1360 * not apply to the library in which the annotation is used, but instead
1350 * applies to the other libraries (all libraries if "*" is used). 1361 * applies to the other libraries (all libraries if "*" is used).
1351 */ 1362 */
1352 final override; 1363 final override;
1353 1364
1354 const MirrorsUsed( 1365 const MirrorsUsed(
1355 {this.symbols, this.targets, this.metaTargets, this.override}); 1366 {this.symbols, this.targets, this.metaTargets, this.override});
1356 } 1367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698