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

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: maintain dart2js coverage 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
« no previous file with comments | « sdk/lib/_internal/lib/mirrors_patch.dart ('k') | tests/lib/lib.status » ('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 // 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 [library] is not a [LibraryMirror] or if
110 * [name] is a private identifier and [library] is [:null:], throws an
111 * [ArgumentError]. If [name] is a private identifier, the symbol returned is
112 * with respect to [library].
113 *
114 * The following text is non-normative:
115 *
116 * Using this method may result in larger output. If possible, use
117 * the const constructor of Symbol or symbol literals.
118 */
119 external static Symbol getSymbol(String name, [LibraryMirror library]);
107 } 120 }
108 121
109 /** 122 /**
110 * Returns a [MirrorSystem] for the current isolate. 123 * Returns a [MirrorSystem] for the current isolate.
111 */ 124 */
112 external MirrorSystem currentMirrorSystem(); 125 external MirrorSystem currentMirrorSystem();
113 126
114 /** 127 /**
115 * Creates a [MirrorSystem] for the isolate which is listening on 128 * Creates a [MirrorSystem] for the isolate which is listening on
116 * the [SendPort]. 129 * the [SendPort].
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 * 1376 *
1364 * When used as metadata on an import of "dart:mirrors", this metadata does 1377 * When used as metadata on an import of "dart:mirrors", this metadata does
1365 * not apply to the library in which the annotation is used, but instead 1378 * not apply to the library in which the annotation is used, but instead
1366 * applies to the other libraries (all libraries if "*" is used). 1379 * applies to the other libraries (all libraries if "*" is used).
1367 */ 1380 */
1368 final override; 1381 final override;
1369 1382
1370 const MirrorsUsed( 1383 const MirrorsUsed(
1371 {this.symbols, this.targets, this.metaTargets, this.override}); 1384 {this.symbols, this.targets, this.metaTargets, this.override});
1372 } 1385 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/mirrors_patch.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698