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

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/instrumentation.dart

Issue 23852002: java2dart improvements and new analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.instrumentation; 3 library engine.instrumentation;
4 import 'java_core.dart'; 4 import 'java_core.dart';
5 /** 5 /**
6 * The class `Instrumentation` implements support for logging instrumentation in formation. 6 * The class `Instrumentation` implements support for logging instrumentation in formation.
7 * 7 *
8 * Instrumentation information consists of information about specific operations . Those operations 8 * Instrumentation information consists of information about specific operations . Those operations
9 * can range from user-facing operations, such as saving the changes to a file, to internal 9 * can range from user-facing operations, such as saving the changes to a file, to internal
10 * operations, such as tokenizing source code. The information to be logged is g athered by 10 * operations, such as tokenizing source code. The information to be logged is g athered by
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 */ 248 */
249 InstrumentationBuilder record(Exception exception); 249 InstrumentationBuilder record(Exception exception);
250 } 250 }
251 /** 251 /**
252 * The instrumentation recording level representing (1) recording [EVERYTHING] r ecording of 252 * The instrumentation recording level representing (1) recording [EVERYTHING] r ecording of
253 * all instrumentation data, (2) recording only [METRICS] information, or (3) re cording 253 * all instrumentation data, (2) recording only [METRICS] information, or (3) re cording
254 * turned [OFF] in which case nothing is recorded. 254 * turned [OFF] in which case nothing is recorded.
255 * 255 *
256 * @coverage dart.engine.utilities 256 * @coverage dart.engine.utilities
257 */ 257 */
258 class InstrumentationLevel implements Enum<InstrumentationLevel> { 258 class InstrumentationLevel extends Enum<InstrumentationLevel> {
259 259
260 /** Recording all instrumented information */ 260 /** Recording all instrumented information */
261 static final InstrumentationLevel EVERYTHING = new InstrumentationLevel('EVERY THING', 0); 261 static final InstrumentationLevel EVERYTHING = new InstrumentationLevel('EVERY THING', 0);
262 262
263 /** Recording only metrics */ 263 /** Recording only metrics */
264 static final InstrumentationLevel METRICS = new InstrumentationLevel('METRICS' , 1); 264 static final InstrumentationLevel METRICS = new InstrumentationLevel('METRICS' , 1);
265 265
266 /** Nothing recorded */ 266 /** Nothing recorded */
267 static final InstrumentationLevel OFF = new InstrumentationLevel('OFF', 2); 267 static final InstrumentationLevel OFF = new InstrumentationLevel('OFF', 2);
268 static final List<InstrumentationLevel> values = [EVERYTHING, METRICS, OFF]; 268 static final List<InstrumentationLevel> values = [EVERYTHING, METRICS, OFF];
269
270 /// The name of this enum constant, as declared in the enum declaration.
271 final String name;
272
273 /// The position in the enum declaration.
274 final int ordinal;
275 static InstrumentationLevel fromString(String str) { 269 static InstrumentationLevel fromString(String str) {
276 if (str == "EVERYTHING") { 270 if (str == "EVERYTHING") {
277 return InstrumentationLevel.EVERYTHING; 271 return InstrumentationLevel.EVERYTHING;
278 } 272 }
279 if (str == "METRICS") { 273 if (str == "METRICS") {
280 return InstrumentationLevel.METRICS; 274 return InstrumentationLevel.METRICS;
281 } 275 }
282 if (str == "OFF") { 276 if (str == "OFF") {
283 return InstrumentationLevel.OFF; 277 return InstrumentationLevel.OFF;
284 } 278 }
285 throw new IllegalArgumentException("Unrecognised InstrumentationLevel"); 279 throw new IllegalArgumentException("Unrecognised InstrumentationLevel");
286 } 280 }
287 InstrumentationLevel(this.name, this.ordinal); 281 InstrumentationLevel(String name, int ordinal) : super(name, ordinal);
288 int compareTo(InstrumentationLevel other) => ordinal - other.ordinal;
289 int get hashCode => ordinal;
290 String toString() => name;
291 } 282 }
292 /** 283 /**
293 * The interface `InstrumentationLogger` defines the behavior of objects that ar e used to log 284 * The interface `InstrumentationLogger` defines the behavior of objects that ar e used to log
294 * instrumentation data. 285 * instrumentation data.
295 * 286 *
296 * For an example of using objects that implement this interface, see [Instrumen tation]. 287 * For an example of using objects that implement this interface, see [Instrumen tation].
297 * 288 *
298 * @coverage dart.engine.utilities 289 * @coverage dart.engine.utilities
299 */ 290 */
300 abstract class InstrumentationLogger { 291 abstract class InstrumentationLogger {
301 292
302 /** 293 /**
303 * Create a builder that can collect the data associated with an operation ide ntified by the given 294 * Create a builder that can collect the data associated with an operation ide ntified by the given
304 * name. 295 * name.
305 * 296 *
306 * @param name the name used to uniquely identify the operation 297 * @param name the name used to uniquely identify the operation
307 * @return the builder that was created 298 * @return the builder that was created
308 */ 299 */
309 InstrumentationBuilder createBuilder(String name); 300 InstrumentationBuilder createBuilder(String name);
310 } 301 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/html.dart ('k') | pkg/analyzer_experimental/lib/src/generated/java_core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698