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

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1581993002: Make summary builder classes implement summary interfaces. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | pkg/analyzer/test/src/summary/name_filter_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'base.dart' as base; 10 import 'base.dart' as base;
(...skipping 23 matching lines...) Expand all
34 34
35 /** 35 /**
36 * Enum used to indicate the kind of a parameter. 36 * Enum used to indicate the kind of a parameter.
37 */ 37 */
38 enum UnlinkedParamKind { 38 enum UnlinkedParamKind {
39 required, 39 required,
40 positional, 40 positional,
41 named, 41 named,
42 } 42 }
43 43
44 class PrelinkedDependencyBuilder { 44 class PrelinkedDependencyBuilder extends Object with _PrelinkedDependencyMixin i mplements PrelinkedDependency {
45 bool _finished = false; 45 bool _finished = false;
46 46
47 String _uri; 47 String _uri;
48 List<String> _parts; 48 List<String> _parts;
49 49
50 PrelinkedDependencyBuilder(); 50 PrelinkedDependencyBuilder();
51 51
52 @override
53 String get uri => _uri ?? '';
54
52 /** 55 /**
53 * The relative URI of the dependent library. This URI is relative to the 56 * The relative URI of the dependent library. This URI is relative to the
54 * importing library, even if there are intervening `export` declarations. 57 * importing library, even if there are intervening `export` declarations.
55 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports 58 * So, for example, if `a.dart` imports `b/c.dart` and `b/c.dart` exports
56 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be 59 * `d/e.dart`, the URI listed for `a.dart`'s dependency on `e.dart` will be
57 * `b/d/e.dart`. 60 * `b/d/e.dart`.
58 */ 61 */
59 void set uri(String _value) { 62 void set uri(String _value) {
60 assert(!_finished); 63 assert(!_finished);
61 _uri = _value; 64 _uri = _value;
62 } 65 }
63 66
67 @override
68 List<String> get parts => _parts ?? const <String>[];
69
64 /** 70 /**
65 * URI for the compilation units listed in the library's `part` declarations. 71 * URI for the compilation units listed in the library's `part` declarations.
66 * These URIs are relative to the importing library. 72 * These URIs are relative to the importing library.
67 */ 73 */
68 void set parts(List<String> _value) { 74 void set parts(List<String> _value) {
69 assert(!_finished); 75 assert(!_finished);
70 _parts = _value; 76 _parts = _value;
71 } 77 }
72 78
73 fb.Offset finish(fb.Builder fbBuilder) { 79 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 List<String> get parts; 127 List<String> get parts;
122 } 128 }
123 129
124 class _PrelinkedDependencyReader extends fb.TableReader<_PrelinkedDependencyImpl > { 130 class _PrelinkedDependencyReader extends fb.TableReader<_PrelinkedDependencyImpl > {
125 const _PrelinkedDependencyReader(); 131 const _PrelinkedDependencyReader();
126 132
127 @override 133 @override
128 _PrelinkedDependencyImpl createObject(fb.BufferPointer bp) => new _PrelinkedDe pendencyImpl(bp); 134 _PrelinkedDependencyImpl createObject(fb.BufferPointer bp) => new _PrelinkedDe pendencyImpl(bp);
129 } 135 }
130 136
131 class _PrelinkedDependencyImpl implements PrelinkedDependency { 137 class _PrelinkedDependencyImpl extends Object with _PrelinkedDependencyMixin imp lements PrelinkedDependency {
132 final fb.BufferPointer _bp; 138 final fb.BufferPointer _bp;
133 139
134 _PrelinkedDependencyImpl(this._bp); 140 _PrelinkedDependencyImpl(this._bp);
135 141
136 String _uri; 142 String _uri;
137 List<String> _parts; 143 List<String> _parts;
138 144
139 @override 145 @override
140 Map<String, Object> toMap() => {
141 "uri": uri,
142 "parts": parts,
143 };
144
145 @override
146 String get uri { 146 String get uri {
147 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); 147 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
148 return _uri; 148 return _uri;
149 } 149 }
150 150
151 @override 151 @override
152 List<String> get parts { 152 List<String> get parts {
153 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]); 153 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
154 return _parts; 154 return _parts;
155 } 155 }
156 } 156 }
157 157
158 class PrelinkedLibraryBuilder { 158 abstract class _PrelinkedDependencyMixin implements PrelinkedDependency {
159 @override
160 Map<String, Object> toMap() => {
161 "uri": uri,
162 "parts": parts,
163 };
164 }
165
166 class PrelinkedLibraryBuilder extends Object with _PrelinkedLibraryMixin impleme nts PrelinkedLibrary {
159 bool _finished = false; 167 bool _finished = false;
160 168
161 List<PrelinkedUnitBuilder> _units; 169 List<PrelinkedUnitBuilder> _units;
162 List<PrelinkedDependencyBuilder> _dependencies; 170 List<PrelinkedDependencyBuilder> _dependencies;
163 List<int> _importDependencies; 171 List<int> _importDependencies;
164 172
165 PrelinkedLibraryBuilder(); 173 PrelinkedLibraryBuilder();
166 174
175 @override
176 List<PrelinkedUnit> get units => _units ?? const <PrelinkedUnit>[];
177
167 /** 178 /**
168 * The pre-linked summary of all the compilation units constituting the 179 * The pre-linked summary of all the compilation units constituting the
169 * library. The summary of the defining compilation unit is listed first, 180 * library. The summary of the defining compilation unit is listed first,
170 * followed by the summary of each part, in the order of the `part` 181 * followed by the summary of each part, in the order of the `part`
171 * declarations in the defining compilation unit. 182 * declarations in the defining compilation unit.
172 */ 183 */
173 void set units(List<PrelinkedUnitBuilder> _value) { 184 void set units(List<PrelinkedUnitBuilder> _value) {
174 assert(!_finished); 185 assert(!_finished);
175 _units = _value; 186 _units = _value;
176 } 187 }
177 188
189 @override
190 List<PrelinkedDependency> get dependencies => _dependencies ?? const <Prelinke dDependency>[];
191
178 /** 192 /**
179 * The libraries that this library depends on (either via an explicit import 193 * The libraries that this library depends on (either via an explicit import
180 * statement or via the implicit dependencies on `dart:core` and 194 * statement or via the implicit dependencies on `dart:core` and
181 * `dart:async`). The first element of this array is a pseudo-dependency 195 * `dart:async`). The first element of this array is a pseudo-dependency
182 * representing the library itself (it is also used for "dynamic"). 196 * representing the library itself (it is also used for "dynamic").
183 * 197 *
184 * TODO(paulberry): consider removing this entirely and just using 198 * TODO(paulberry): consider removing this entirely and just using
185 * [UnlinkedLibrary.imports]. 199 * [UnlinkedLibrary.imports].
186 */ 200 */
187 void set dependencies(List<PrelinkedDependencyBuilder> _value) { 201 void set dependencies(List<PrelinkedDependencyBuilder> _value) {
188 assert(!_finished); 202 assert(!_finished);
189 _dependencies = _value; 203 _dependencies = _value;
190 } 204 }
191 205
206 @override
207 List<int> get importDependencies => _importDependencies ?? const <int>[];
208
192 /** 209 /**
193 * For each import in [UnlinkedUnit.imports], an index into [dependencies] 210 * For each import in [UnlinkedUnit.imports], an index into [dependencies]
194 * of the library being imported. 211 * of the library being imported.
195 * 212 *
196 * TODO(paulberry): if [dependencies] is removed, this can be removed as 213 * TODO(paulberry): if [dependencies] is removed, this can be removed as
197 * well, since there will effectively be a one-to-one mapping. 214 * well, since there will effectively be a one-to-one mapping.
198 */ 215 */
199 void set importDependencies(List<int> _value) { 216 void set importDependencies(List<int> _value) {
200 assert(!_finished); 217 assert(!_finished);
201 _importDependencies = _value; 218 _importDependencies = _value;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 List<int> get importDependencies; 298 List<int> get importDependencies;
282 } 299 }
283 300
284 class _PrelinkedLibraryReader extends fb.TableReader<_PrelinkedLibraryImpl> { 301 class _PrelinkedLibraryReader extends fb.TableReader<_PrelinkedLibraryImpl> {
285 const _PrelinkedLibraryReader(); 302 const _PrelinkedLibraryReader();
286 303
287 @override 304 @override
288 _PrelinkedLibraryImpl createObject(fb.BufferPointer bp) => new _PrelinkedLibra ryImpl(bp); 305 _PrelinkedLibraryImpl createObject(fb.BufferPointer bp) => new _PrelinkedLibra ryImpl(bp);
289 } 306 }
290 307
291 class _PrelinkedLibraryImpl implements PrelinkedLibrary { 308 class _PrelinkedLibraryImpl extends Object with _PrelinkedLibraryMixin implement s PrelinkedLibrary {
292 final fb.BufferPointer _bp; 309 final fb.BufferPointer _bp;
293 310
294 _PrelinkedLibraryImpl(this._bp); 311 _PrelinkedLibraryImpl(this._bp);
295 312
296 List<PrelinkedUnit> _units; 313 List<PrelinkedUnit> _units;
297 List<PrelinkedDependency> _dependencies; 314 List<PrelinkedDependency> _dependencies;
298 List<int> _importDependencies; 315 List<int> _importDependencies;
299 316
300 @override 317 @override
301 Map<String, Object> toMap() => {
302 "units": units,
303 "dependencies": dependencies,
304 "importDependencies": importDependencies,
305 };
306
307 @override
308 List<PrelinkedUnit> get units { 318 List<PrelinkedUnit> get units {
309 _units ??= const fb.ListReader<PrelinkedUnit>(const _PrelinkedUnitReader()). vTableGet(_bp, 0, const <PrelinkedUnit>[]); 319 _units ??= const fb.ListReader<PrelinkedUnit>(const _PrelinkedUnitReader()). vTableGet(_bp, 0, const <PrelinkedUnit>[]);
310 return _units; 320 return _units;
311 } 321 }
312 322
313 @override 323 @override
314 List<PrelinkedDependency> get dependencies { 324 List<PrelinkedDependency> get dependencies {
315 _dependencies ??= const fb.ListReader<PrelinkedDependency>(const _PrelinkedD ependencyReader()).vTableGet(_bp, 1, const <PrelinkedDependency>[]); 325 _dependencies ??= const fb.ListReader<PrelinkedDependency>(const _PrelinkedD ependencyReader()).vTableGet(_bp, 1, const <PrelinkedDependency>[]);
316 return _dependencies; 326 return _dependencies;
317 } 327 }
318 328
319 @override 329 @override
320 List<int> get importDependencies { 330 List<int> get importDependencies {
321 _importDependencies ??= const fb.ListReader<int>(const fb.Int32Reader()).vTa bleGet(_bp, 2, const <int>[]); 331 _importDependencies ??= const fb.ListReader<int>(const fb.Int32Reader()).vTa bleGet(_bp, 2, const <int>[]);
322 return _importDependencies; 332 return _importDependencies;
323 } 333 }
324 } 334 }
325 335
326 class PrelinkedReferenceBuilder { 336 abstract class _PrelinkedLibraryMixin implements PrelinkedLibrary {
337 @override
338 Map<String, Object> toMap() => {
339 "units": units,
340 "dependencies": dependencies,
341 "importDependencies": importDependencies,
342 };
343 }
344
345 class PrelinkedReferenceBuilder extends Object with _PrelinkedReferenceMixin imp lements PrelinkedReference {
327 bool _finished = false; 346 bool _finished = false;
328 347
329 int _dependency; 348 int _dependency;
330 PrelinkedReferenceKind _kind; 349 PrelinkedReferenceKind _kind;
331 int _unit; 350 int _unit;
332 int _numTypeParameters; 351 int _numTypeParameters;
333 352
334 PrelinkedReferenceBuilder(); 353 PrelinkedReferenceBuilder();
335 354
355 @override
356 int get dependency => _dependency ?? 0;
357
336 /** 358 /**
337 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y 359 * Index into [PrelinkedLibrary.dependencies] indicating which imported librar y
338 * declares the entity being referred to. 360 * declares the entity being referred to.
339 */ 361 */
340 void set dependency(int _value) { 362 void set dependency(int _value) {
341 assert(!_finished); 363 assert(!_finished);
342 _dependency = _value; 364 _dependency = _value;
343 } 365 }
344 366
367 @override
368 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ;
369
345 /** 370 /**
346 * The kind of the entity being referred to. For the pseudo-type `dynamic`, 371 * The kind of the entity being referred to. For the pseudo-type `dynamic`,
347 * the kind is [PrelinkedReferenceKind.classOrEnum]. 372 * the kind is [PrelinkedReferenceKind.classOrEnum].
348 */ 373 */
349 void set kind(PrelinkedReferenceKind _value) { 374 void set kind(PrelinkedReferenceKind _value) {
350 assert(!_finished); 375 assert(!_finished);
351 _kind = _value; 376 _kind = _value;
352 } 377 }
353 378
379 @override
380 int get unit => _unit ?? 0;
381
354 /** 382 /**
355 * Integer index indicating which unit in the imported library contains the 383 * Integer index indicating which unit in the imported library contains the
356 * definition of the entity. As with indices into [PrelinkedLibrary.units], 384 * definition of the entity. As with indices into [PrelinkedLibrary.units],
357 * zero represents the defining compilation unit, and nonzero values 385 * zero represents the defining compilation unit, and nonzero values
358 * represent parts in the order of the corresponding `part` declarations. 386 * represent parts in the order of the corresponding `part` declarations.
359 */ 387 */
360 void set unit(int _value) { 388 void set unit(int _value) {
361 assert(!_finished); 389 assert(!_finished);
362 _unit = _value; 390 _unit = _value;
363 } 391 }
364 392
393 @override
394 int get numTypeParameters => _numTypeParameters ?? 0;
395
365 /** 396 /**
366 * If the entity being referred to is generic, the number of type parameters 397 * If the entity being referred to is generic, the number of type parameters
367 * it accepts. Otherwise zero. 398 * it accepts. Otherwise zero.
368 */ 399 */
369 void set numTypeParameters(int _value) { 400 void set numTypeParameters(int _value) {
370 assert(!_finished); 401 assert(!_finished);
371 _numTypeParameters = _value; 402 _numTypeParameters = _value;
372 } 403 }
373 404
374 fb.Offset finish(fb.Builder fbBuilder) { 405 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 int get numTypeParameters; 463 int get numTypeParameters;
433 } 464 }
434 465
435 class _PrelinkedReferenceReader extends fb.TableReader<_PrelinkedReferenceImpl> { 466 class _PrelinkedReferenceReader extends fb.TableReader<_PrelinkedReferenceImpl> {
436 const _PrelinkedReferenceReader(); 467 const _PrelinkedReferenceReader();
437 468
438 @override 469 @override
439 _PrelinkedReferenceImpl createObject(fb.BufferPointer bp) => new _PrelinkedRef erenceImpl(bp); 470 _PrelinkedReferenceImpl createObject(fb.BufferPointer bp) => new _PrelinkedRef erenceImpl(bp);
440 } 471 }
441 472
442 class _PrelinkedReferenceImpl implements PrelinkedReference { 473 class _PrelinkedReferenceImpl extends Object with _PrelinkedReferenceMixin imple ments PrelinkedReference {
443 final fb.BufferPointer _bp; 474 final fb.BufferPointer _bp;
444 475
445 _PrelinkedReferenceImpl(this._bp); 476 _PrelinkedReferenceImpl(this._bp);
446 477
447 int _dependency; 478 int _dependency;
448 PrelinkedReferenceKind _kind; 479 PrelinkedReferenceKind _kind;
449 int _unit; 480 int _unit;
450 int _numTypeParameters; 481 int _numTypeParameters;
451 482
452 @override 483 @override
453 Map<String, Object> toMap() => {
454 "dependency": dependency,
455 "kind": kind,
456 "unit": unit,
457 "numTypeParameters": numTypeParameters,
458 };
459
460 @override
461 int get dependency { 484 int get dependency {
462 _dependency ??= const fb.Int32Reader().vTableGet(_bp, 0, 0); 485 _dependency ??= const fb.Int32Reader().vTableGet(_bp, 0, 0);
463 return _dependency; 486 return _dependency;
464 } 487 }
465 488
466 @override 489 @override
467 PrelinkedReferenceKind get kind { 490 PrelinkedReferenceKind get kind {
468 _kind ??= PrelinkedReferenceKind.values[const fb.Int32Reader().vTableGet(_bp , 1, 0)]; 491 _kind ??= PrelinkedReferenceKind.values[const fb.Int32Reader().vTableGet(_bp , 1, 0)];
469 return _kind; 492 return _kind;
470 } 493 }
471 494
472 @override 495 @override
473 int get unit { 496 int get unit {
474 _unit ??= const fb.Int32Reader().vTableGet(_bp, 2, 0); 497 _unit ??= const fb.Int32Reader().vTableGet(_bp, 2, 0);
475 return _unit; 498 return _unit;
476 } 499 }
477 500
478 @override 501 @override
479 int get numTypeParameters { 502 int get numTypeParameters {
480 _numTypeParameters ??= const fb.Int32Reader().vTableGet(_bp, 3, 0); 503 _numTypeParameters ??= const fb.Int32Reader().vTableGet(_bp, 3, 0);
481 return _numTypeParameters; 504 return _numTypeParameters;
482 } 505 }
483 } 506 }
484 507
485 class PrelinkedUnitBuilder { 508 abstract class _PrelinkedReferenceMixin implements PrelinkedReference {
509 @override
510 Map<String, Object> toMap() => {
511 "dependency": dependency,
512 "kind": kind,
513 "unit": unit,
514 "numTypeParameters": numTypeParameters,
515 };
516 }
517
518 class PrelinkedUnitBuilder extends Object with _PrelinkedUnitMixin implements Pr elinkedUnit {
486 bool _finished = false; 519 bool _finished = false;
487 520
488 List<PrelinkedReferenceBuilder> _references; 521 List<PrelinkedReferenceBuilder> _references;
489 522
490 PrelinkedUnitBuilder(); 523 PrelinkedUnitBuilder();
491 524
525 @override
526 List<PrelinkedReference> get references => _references ?? const <PrelinkedRefe rence>[];
527
492 /** 528 /**
493 * For each reference in [UnlinkedUnit.references], information about how 529 * For each reference in [UnlinkedUnit.references], information about how
494 * that reference is resolved. 530 * that reference is resolved.
495 */ 531 */
496 void set references(List<PrelinkedReferenceBuilder> _value) { 532 void set references(List<PrelinkedReferenceBuilder> _value) {
497 assert(!_finished); 533 assert(!_finished);
498 _references = _value; 534 _references = _value;
499 } 535 }
500 536
501 fb.Offset finish(fb.Builder fbBuilder) { 537 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 29 matching lines...) Expand all
531 List<PrelinkedReference> get references; 567 List<PrelinkedReference> get references;
532 } 568 }
533 569
534 class _PrelinkedUnitReader extends fb.TableReader<_PrelinkedUnitImpl> { 570 class _PrelinkedUnitReader extends fb.TableReader<_PrelinkedUnitImpl> {
535 const _PrelinkedUnitReader(); 571 const _PrelinkedUnitReader();
536 572
537 @override 573 @override
538 _PrelinkedUnitImpl createObject(fb.BufferPointer bp) => new _PrelinkedUnitImpl (bp); 574 _PrelinkedUnitImpl createObject(fb.BufferPointer bp) => new _PrelinkedUnitImpl (bp);
539 } 575 }
540 576
541 class _PrelinkedUnitImpl implements PrelinkedUnit { 577 class _PrelinkedUnitImpl extends Object with _PrelinkedUnitMixin implements Prel inkedUnit {
542 final fb.BufferPointer _bp; 578 final fb.BufferPointer _bp;
543 579
544 _PrelinkedUnitImpl(this._bp); 580 _PrelinkedUnitImpl(this._bp);
545 581
546 List<PrelinkedReference> _references; 582 List<PrelinkedReference> _references;
547 583
548 @override 584 @override
549 Map<String, Object> toMap() => {
550 "references": references,
551 };
552
553 @override
554 List<PrelinkedReference> get references { 585 List<PrelinkedReference> get references {
555 _references ??= const fb.ListReader<PrelinkedReference>(const _PrelinkedRefe renceReader()).vTableGet(_bp, 0, const <PrelinkedReference>[]); 586 _references ??= const fb.ListReader<PrelinkedReference>(const _PrelinkedRefe renceReader()).vTableGet(_bp, 0, const <PrelinkedReference>[]);
556 return _references; 587 return _references;
557 } 588 }
558 } 589 }
559 590
560 class SdkBundleBuilder { 591 abstract class _PrelinkedUnitMixin implements PrelinkedUnit {
592 @override
593 Map<String, Object> toMap() => {
594 "references": references,
595 };
596 }
597
598 class SdkBundleBuilder extends Object with _SdkBundleMixin implements SdkBundle {
561 bool _finished = false; 599 bool _finished = false;
562 600
563 List<String> _prelinkedLibraryUris; 601 List<String> _prelinkedLibraryUris;
564 List<PrelinkedLibraryBuilder> _prelinkedLibraries; 602 List<PrelinkedLibraryBuilder> _prelinkedLibraries;
565 List<String> _unlinkedUnitUris; 603 List<String> _unlinkedUnitUris;
566 List<UnlinkedUnitBuilder> _unlinkedUnits; 604 List<UnlinkedUnitBuilder> _unlinkedUnits;
567 605
568 SdkBundleBuilder(); 606 SdkBundleBuilder();
569 607
608 @override
609 List<String> get prelinkedLibraryUris => _prelinkedLibraryUris ?? const <Strin g>[];
610
570 /** 611 /**
571 * The list of URIs of items in [prelinkedLibraries], e.g. `dart:core`. 612 * The list of URIs of items in [prelinkedLibraries], e.g. `dart:core`.
572 */ 613 */
573 void set prelinkedLibraryUris(List<String> _value) { 614 void set prelinkedLibraryUris(List<String> _value) {
574 assert(!_finished); 615 assert(!_finished);
575 _prelinkedLibraryUris = _value; 616 _prelinkedLibraryUris = _value;
576 } 617 }
577 618
619 @override
620 List<PrelinkedLibrary> get prelinkedLibraries => _prelinkedLibraries ?? const <PrelinkedLibrary>[];
621
578 /** 622 /**
579 * Pre-linked libraries. 623 * Pre-linked libraries.
580 */ 624 */
581 void set prelinkedLibraries(List<PrelinkedLibraryBuilder> _value) { 625 void set prelinkedLibraries(List<PrelinkedLibraryBuilder> _value) {
582 assert(!_finished); 626 assert(!_finished);
583 _prelinkedLibraries = _value; 627 _prelinkedLibraries = _value;
584 } 628 }
585 629
630 @override
631 List<String> get unlinkedUnitUris => _unlinkedUnitUris ?? const <String>[];
632
586 /** 633 /**
587 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. 634 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
588 */ 635 */
589 void set unlinkedUnitUris(List<String> _value) { 636 void set unlinkedUnitUris(List<String> _value) {
590 assert(!_finished); 637 assert(!_finished);
591 _unlinkedUnitUris = _value; 638 _unlinkedUnitUris = _value;
592 } 639 }
593 640
641 @override
642 List<UnlinkedUnit> get unlinkedUnits => _unlinkedUnits ?? const <UnlinkedUnit> [];
643
594 /** 644 /**
595 * Unlinked information for the compilation units constituting the SDK. 645 * Unlinked information for the compilation units constituting the SDK.
596 */ 646 */
597 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) { 647 void set unlinkedUnits(List<UnlinkedUnitBuilder> _value) {
598 assert(!_finished); 648 assert(!_finished);
599 _unlinkedUnits = _value; 649 _unlinkedUnits = _value;
600 } 650 }
601 651
602 List<int> toBuffer() { 652 List<int> toBuffer() {
603 fb.Builder fbBuilder = new fb.Builder(); 653 fb.Builder fbBuilder = new fb.Builder();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 List<UnlinkedUnit> get unlinkedUnits; 729 List<UnlinkedUnit> get unlinkedUnits;
680 } 730 }
681 731
682 class _SdkBundleReader extends fb.TableReader<_SdkBundleImpl> { 732 class _SdkBundleReader extends fb.TableReader<_SdkBundleImpl> {
683 const _SdkBundleReader(); 733 const _SdkBundleReader();
684 734
685 @override 735 @override
686 _SdkBundleImpl createObject(fb.BufferPointer bp) => new _SdkBundleImpl(bp); 736 _SdkBundleImpl createObject(fb.BufferPointer bp) => new _SdkBundleImpl(bp);
687 } 737 }
688 738
689 class _SdkBundleImpl implements SdkBundle { 739 class _SdkBundleImpl extends Object with _SdkBundleMixin implements SdkBundle {
690 final fb.BufferPointer _bp; 740 final fb.BufferPointer _bp;
691 741
692 _SdkBundleImpl(this._bp); 742 _SdkBundleImpl(this._bp);
693 743
694 List<String> _prelinkedLibraryUris; 744 List<String> _prelinkedLibraryUris;
695 List<PrelinkedLibrary> _prelinkedLibraries; 745 List<PrelinkedLibrary> _prelinkedLibraries;
696 List<String> _unlinkedUnitUris; 746 List<String> _unlinkedUnitUris;
697 List<UnlinkedUnit> _unlinkedUnits; 747 List<UnlinkedUnit> _unlinkedUnits;
698 748
699 @override 749 @override
700 Map<String, Object> toMap() => {
701 "prelinkedLibraryUris": prelinkedLibraryUris,
702 "prelinkedLibraries": prelinkedLibraries,
703 "unlinkedUnitUris": unlinkedUnitUris,
704 "unlinkedUnits": unlinkedUnits,
705 };
706
707 @override
708 List<String> get prelinkedLibraryUris { 750 List<String> get prelinkedLibraryUris {
709 _prelinkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader( )).vTableGet(_bp, 0, const <String>[]); 751 _prelinkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader( )).vTableGet(_bp, 0, const <String>[]);
710 return _prelinkedLibraryUris; 752 return _prelinkedLibraryUris;
711 } 753 }
712 754
713 @override 755 @override
714 List<PrelinkedLibrary> get prelinkedLibraries { 756 List<PrelinkedLibrary> get prelinkedLibraries {
715 _prelinkedLibraries ??= const fb.ListReader<PrelinkedLibrary>(const _Prelink edLibraryReader()).vTableGet(_bp, 1, const <PrelinkedLibrary>[]); 757 _prelinkedLibraries ??= const fb.ListReader<PrelinkedLibrary>(const _Prelink edLibraryReader()).vTableGet(_bp, 1, const <PrelinkedLibrary>[]);
716 return _prelinkedLibraries; 758 return _prelinkedLibraries;
717 } 759 }
718 760
719 @override 761 @override
720 List<String> get unlinkedUnitUris { 762 List<String> get unlinkedUnitUris {
721 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bp, 2, const <String>[]); 763 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v TableGet(_bp, 2, const <String>[]);
722 return _unlinkedUnitUris; 764 return _unlinkedUnitUris;
723 } 765 }
724 766
725 @override 767 @override
726 List<UnlinkedUnit> get unlinkedUnits { 768 List<UnlinkedUnit> get unlinkedUnits {
727 _unlinkedUnits ??= const fb.ListReader<UnlinkedUnit>(const _UnlinkedUnitRead er()).vTableGet(_bp, 3, const <UnlinkedUnit>[]); 769 _unlinkedUnits ??= const fb.ListReader<UnlinkedUnit>(const _UnlinkedUnitRead er()).vTableGet(_bp, 3, const <UnlinkedUnit>[]);
728 return _unlinkedUnits; 770 return _unlinkedUnits;
729 } 771 }
730 } 772 }
731 773
732 class UnlinkedClassBuilder { 774 abstract class _SdkBundleMixin implements SdkBundle {
775 @override
776 Map<String, Object> toMap() => {
777 "prelinkedLibraryUris": prelinkedLibraryUris,
778 "prelinkedLibraries": prelinkedLibraries,
779 "unlinkedUnitUris": unlinkedUnitUris,
780 "unlinkedUnits": unlinkedUnits,
781 };
782 }
783
784 class UnlinkedClassBuilder extends Object with _UnlinkedClassMixin implements Un linkedClass {
733 bool _finished = false; 785 bool _finished = false;
734 786
735 String _name; 787 String _name;
736 int _nameOffset; 788 int _nameOffset;
737 UnlinkedDocumentationCommentBuilder _documentationComment; 789 UnlinkedDocumentationCommentBuilder _documentationComment;
738 List<UnlinkedTypeParamBuilder> _typeParameters; 790 List<UnlinkedTypeParamBuilder> _typeParameters;
739 UnlinkedTypeRefBuilder _supertype; 791 UnlinkedTypeRefBuilder _supertype;
740 List<UnlinkedTypeRefBuilder> _mixins; 792 List<UnlinkedTypeRefBuilder> _mixins;
741 List<UnlinkedTypeRefBuilder> _interfaces; 793 List<UnlinkedTypeRefBuilder> _interfaces;
742 List<UnlinkedVariableBuilder> _fields; 794 List<UnlinkedVariableBuilder> _fields;
743 List<UnlinkedExecutableBuilder> _executables; 795 List<UnlinkedExecutableBuilder> _executables;
744 bool _isAbstract; 796 bool _isAbstract;
745 bool _isMixinApplication; 797 bool _isMixinApplication;
746 bool _hasNoSupertype; 798 bool _hasNoSupertype;
747 799
748 UnlinkedClassBuilder(); 800 UnlinkedClassBuilder();
749 801
802 @override
803 String get name => _name ?? '';
804
750 /** 805 /**
751 * Name of the class. 806 * Name of the class.
752 */ 807 */
753 void set name(String _value) { 808 void set name(String _value) {
754 assert(!_finished); 809 assert(!_finished);
755 _name = _value; 810 _name = _value;
756 } 811 }
757 812
813 @override
814 int get nameOffset => _nameOffset ?? 0;
815
758 /** 816 /**
759 * Offset of the class name relative to the beginning of the file. 817 * Offset of the class name relative to the beginning of the file.
760 */ 818 */
761 void set nameOffset(int _value) { 819 void set nameOffset(int _value) {
762 assert(!_finished); 820 assert(!_finished);
763 _nameOffset = _value; 821 _nameOffset = _value;
764 } 822 }
765 823
824 @override
825 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
826
766 /** 827 /**
767 * Documentation comment for the class, or `null` if there is no 828 * Documentation comment for the class, or `null` if there is no
768 * documentation comment. 829 * documentation comment.
769 */ 830 */
770 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 831 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
771 assert(!_finished); 832 assert(!_finished);
772 _documentationComment = _value; 833 _documentationComment = _value;
773 } 834 }
774 835
836 @override
837 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[];
838
775 /** 839 /**
776 * Type parameters of the class, if any. 840 * Type parameters of the class, if any.
777 */ 841 */
778 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 842 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
779 assert(!_finished); 843 assert(!_finished);
780 _typeParameters = _value; 844 _typeParameters = _value;
781 } 845 }
782 846
847 @override
848 UnlinkedTypeRef get supertype => _supertype;
849
783 /** 850 /**
784 * Supertype of the class, or `null` if either (a) the class doesn't 851 * Supertype of the class, or `null` if either (a) the class doesn't
785 * explicitly declare a supertype (and hence has supertype `Object`), or (b) 852 * explicitly declare a supertype (and hence has supertype `Object`), or (b)
786 * the class *is* `Object` (and hence has no supertype). 853 * the class *is* `Object` (and hence has no supertype).
787 */ 854 */
788 void set supertype(UnlinkedTypeRefBuilder _value) { 855 void set supertype(UnlinkedTypeRefBuilder _value) {
789 assert(!_finished); 856 assert(!_finished);
790 _supertype = _value; 857 _supertype = _value;
791 } 858 }
792 859
860 @override
861 List<UnlinkedTypeRef> get mixins => _mixins ?? const <UnlinkedTypeRef>[];
862
793 /** 863 /**
794 * Mixins appearing in a `with` clause, if any. 864 * Mixins appearing in a `with` clause, if any.
795 */ 865 */
796 void set mixins(List<UnlinkedTypeRefBuilder> _value) { 866 void set mixins(List<UnlinkedTypeRefBuilder> _value) {
797 assert(!_finished); 867 assert(!_finished);
798 _mixins = _value; 868 _mixins = _value;
799 } 869 }
800 870
871 @override
872 List<UnlinkedTypeRef> get interfaces => _interfaces ?? const <UnlinkedTypeRef> [];
873
801 /** 874 /**
802 * Interfaces appearing in an `implements` clause, if any. 875 * Interfaces appearing in an `implements` clause, if any.
803 */ 876 */
804 void set interfaces(List<UnlinkedTypeRefBuilder> _value) { 877 void set interfaces(List<UnlinkedTypeRefBuilder> _value) {
805 assert(!_finished); 878 assert(!_finished);
806 _interfaces = _value; 879 _interfaces = _value;
807 } 880 }
808 881
882 @override
883 List<UnlinkedVariable> get fields => _fields ?? const <UnlinkedVariable>[];
884
809 /** 885 /**
810 * Field declarations contained in the class. 886 * Field declarations contained in the class.
811 */ 887 */
812 void set fields(List<UnlinkedVariableBuilder> _value) { 888 void set fields(List<UnlinkedVariableBuilder> _value) {
813 assert(!_finished); 889 assert(!_finished);
814 _fields = _value; 890 _fields = _value;
815 } 891 }
816 892
893 @override
894 List<UnlinkedExecutable> get executables => _executables ?? const <UnlinkedExe cutable>[];
895
817 /** 896 /**
818 * Executable objects (methods, getters, and setters) contained in the class. 897 * Executable objects (methods, getters, and setters) contained in the class.
819 */ 898 */
820 void set executables(List<UnlinkedExecutableBuilder> _value) { 899 void set executables(List<UnlinkedExecutableBuilder> _value) {
821 assert(!_finished); 900 assert(!_finished);
822 _executables = _value; 901 _executables = _value;
823 } 902 }
824 903
904 @override
905 bool get isAbstract => _isAbstract ?? false;
906
825 /** 907 /**
826 * Indicates whether the class is declared with the `abstract` keyword. 908 * Indicates whether the class is declared with the `abstract` keyword.
827 */ 909 */
828 void set isAbstract(bool _value) { 910 void set isAbstract(bool _value) {
829 assert(!_finished); 911 assert(!_finished);
830 _isAbstract = _value; 912 _isAbstract = _value;
831 } 913 }
832 914
915 @override
916 bool get isMixinApplication => _isMixinApplication ?? false;
917
833 /** 918 /**
834 * Indicates whether the class is declared using mixin application syntax. 919 * Indicates whether the class is declared using mixin application syntax.
835 */ 920 */
836 void set isMixinApplication(bool _value) { 921 void set isMixinApplication(bool _value) {
837 assert(!_finished); 922 assert(!_finished);
838 _isMixinApplication = _value; 923 _isMixinApplication = _value;
839 } 924 }
840 925
926 @override
927 bool get hasNoSupertype => _hasNoSupertype ?? false;
928
841 /** 929 /**
842 * Indicates whether this class is the core "Object" class (and hence has no 930 * Indicates whether this class is the core "Object" class (and hence has no
843 * supertype) 931 * supertype)
844 */ 932 */
845 void set hasNoSupertype(bool _value) { 933 void set hasNoSupertype(bool _value) {
846 assert(!_finished); 934 assert(!_finished);
847 _hasNoSupertype = _value; 935 _hasNoSupertype = _value;
848 } 936 }
849 937
850 fb.Offset finish(fb.Builder fbBuilder) { 938 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 bool get hasNoSupertype; 1098 bool get hasNoSupertype;
1011 } 1099 }
1012 1100
1013 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> { 1101 class _UnlinkedClassReader extends fb.TableReader<_UnlinkedClassImpl> {
1014 const _UnlinkedClassReader(); 1102 const _UnlinkedClassReader();
1015 1103
1016 @override 1104 @override
1017 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl (bp); 1105 _UnlinkedClassImpl createObject(fb.BufferPointer bp) => new _UnlinkedClassImpl (bp);
1018 } 1106 }
1019 1107
1020 class _UnlinkedClassImpl implements UnlinkedClass { 1108 class _UnlinkedClassImpl extends Object with _UnlinkedClassMixin implements Unli nkedClass {
1021 final fb.BufferPointer _bp; 1109 final fb.BufferPointer _bp;
1022 1110
1023 _UnlinkedClassImpl(this._bp); 1111 _UnlinkedClassImpl(this._bp);
1024 1112
1025 String _name; 1113 String _name;
1026 int _nameOffset; 1114 int _nameOffset;
1027 UnlinkedDocumentationComment _documentationComment; 1115 UnlinkedDocumentationComment _documentationComment;
1028 List<UnlinkedTypeParam> _typeParameters; 1116 List<UnlinkedTypeParam> _typeParameters;
1029 UnlinkedTypeRef _supertype; 1117 UnlinkedTypeRef _supertype;
1030 List<UnlinkedTypeRef> _mixins; 1118 List<UnlinkedTypeRef> _mixins;
1031 List<UnlinkedTypeRef> _interfaces; 1119 List<UnlinkedTypeRef> _interfaces;
1032 List<UnlinkedVariable> _fields; 1120 List<UnlinkedVariable> _fields;
1033 List<UnlinkedExecutable> _executables; 1121 List<UnlinkedExecutable> _executables;
1034 bool _isAbstract; 1122 bool _isAbstract;
1035 bool _isMixinApplication; 1123 bool _isMixinApplication;
1036 bool _hasNoSupertype; 1124 bool _hasNoSupertype;
1037 1125
1038 @override 1126 @override
1039 Map<String, Object> toMap() => {
1040 "name": name,
1041 "nameOffset": nameOffset,
1042 "documentationComment": documentationComment,
1043 "typeParameters": typeParameters,
1044 "supertype": supertype,
1045 "mixins": mixins,
1046 "interfaces": interfaces,
1047 "fields": fields,
1048 "executables": executables,
1049 "isAbstract": isAbstract,
1050 "isMixinApplication": isMixinApplication,
1051 "hasNoSupertype": hasNoSupertype,
1052 };
1053
1054 @override
1055 String get name { 1127 String get name {
1056 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 1128 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
1057 return _name; 1129 return _name;
1058 } 1130 }
1059 1131
1060 @override 1132 @override
1061 int get nameOffset { 1133 int get nameOffset {
1062 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 1134 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
1063 return _nameOffset; 1135 return _nameOffset;
1064 } 1136 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 return _isMixinApplication; 1189 return _isMixinApplication;
1118 } 1190 }
1119 1191
1120 @override 1192 @override
1121 bool get hasNoSupertype { 1193 bool get hasNoSupertype {
1122 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 11, false); 1194 _hasNoSupertype ??= const fb.BoolReader().vTableGet(_bp, 11, false);
1123 return _hasNoSupertype; 1195 return _hasNoSupertype;
1124 } 1196 }
1125 } 1197 }
1126 1198
1127 class UnlinkedCombinatorBuilder { 1199 abstract class _UnlinkedClassMixin implements UnlinkedClass {
1200 @override
1201 Map<String, Object> toMap() => {
1202 "name": name,
1203 "nameOffset": nameOffset,
1204 "documentationComment": documentationComment,
1205 "typeParameters": typeParameters,
1206 "supertype": supertype,
1207 "mixins": mixins,
1208 "interfaces": interfaces,
1209 "fields": fields,
1210 "executables": executables,
1211 "isAbstract": isAbstract,
1212 "isMixinApplication": isMixinApplication,
1213 "hasNoSupertype": hasNoSupertype,
1214 };
1215 }
1216
1217 class UnlinkedCombinatorBuilder extends Object with _UnlinkedCombinatorMixin imp lements UnlinkedCombinator {
1128 bool _finished = false; 1218 bool _finished = false;
1129 1219
1130 List<String> _shows; 1220 List<String> _shows;
1131 List<String> _hides; 1221 List<String> _hides;
1132 1222
1133 UnlinkedCombinatorBuilder(); 1223 UnlinkedCombinatorBuilder();
1134 1224
1225 @override
1226 List<String> get shows => _shows ?? const <String>[];
1227
1135 /** 1228 /**
1136 * List of names which are shown. Empty if this is a `hide` combinator. 1229 * List of names which are shown. Empty if this is a `hide` combinator.
1137 */ 1230 */
1138 void set shows(List<String> _value) { 1231 void set shows(List<String> _value) {
1139 assert(!_finished); 1232 assert(!_finished);
1140 _shows = _value; 1233 _shows = _value;
1141 } 1234 }
1142 1235
1236 @override
1237 List<String> get hides => _hides ?? const <String>[];
1238
1143 /** 1239 /**
1144 * List of names which are hidden. Empty if this is a `show` combinator. 1240 * List of names which are hidden. Empty if this is a `show` combinator.
1145 */ 1241 */
1146 void set hides(List<String> _value) { 1242 void set hides(List<String> _value) {
1147 assert(!_finished); 1243 assert(!_finished);
1148 _hides = _value; 1244 _hides = _value;
1149 } 1245 }
1150 1246
1151 fb.Offset finish(fb.Builder fbBuilder) { 1247 fb.Offset finish(fb.Builder fbBuilder) {
1152 assert(!_finished); 1248 assert(!_finished);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 List<String> get hides; 1290 List<String> get hides;
1195 } 1291 }
1196 1292
1197 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl> { 1293 class _UnlinkedCombinatorReader extends fb.TableReader<_UnlinkedCombinatorImpl> {
1198 const _UnlinkedCombinatorReader(); 1294 const _UnlinkedCombinatorReader();
1199 1295
1200 @override 1296 @override
1201 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb inatorImpl(bp); 1297 _UnlinkedCombinatorImpl createObject(fb.BufferPointer bp) => new _UnlinkedComb inatorImpl(bp);
1202 } 1298 }
1203 1299
1204 class _UnlinkedCombinatorImpl implements UnlinkedCombinator { 1300 class _UnlinkedCombinatorImpl extends Object with _UnlinkedCombinatorMixin imple ments UnlinkedCombinator {
1205 final fb.BufferPointer _bp; 1301 final fb.BufferPointer _bp;
1206 1302
1207 _UnlinkedCombinatorImpl(this._bp); 1303 _UnlinkedCombinatorImpl(this._bp);
1208 1304
1209 List<String> _shows; 1305 List<String> _shows;
1210 List<String> _hides; 1306 List<String> _hides;
1211 1307
1212 @override 1308 @override
1213 Map<String, Object> toMap() => {
1214 "shows": shows,
1215 "hides": hides,
1216 };
1217
1218 @override
1219 List<String> get shows { 1309 List<String> get shows {
1220 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 0, const <String>[]); 1310 _shows ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 0, const <String>[]);
1221 return _shows; 1311 return _shows;
1222 } 1312 }
1223 1313
1224 @override 1314 @override
1225 List<String> get hides { 1315 List<String> get hides {
1226 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]); 1316 _hides ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 1, const <String>[]);
1227 return _hides; 1317 return _hides;
1228 } 1318 }
1229 } 1319 }
1230 1320
1231 class UnlinkedDocumentationCommentBuilder { 1321 abstract class _UnlinkedCombinatorMixin implements UnlinkedCombinator {
1322 @override
1323 Map<String, Object> toMap() => {
1324 "shows": shows,
1325 "hides": hides,
1326 };
1327 }
1328
1329 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements UnlinkedDocumentationComment {
1232 bool _finished = false; 1330 bool _finished = false;
1233 1331
1234 String _text; 1332 String _text;
1235 int _offset; 1333 int _offset;
1236 int _length; 1334 int _length;
1237 1335
1238 UnlinkedDocumentationCommentBuilder(); 1336 UnlinkedDocumentationCommentBuilder();
1239 1337
1338 @override
1339 String get text => _text ?? '';
1340
1240 /** 1341 /**
1241 * Text of the documentation comment, with '\r\n' replaced by '\n'. 1342 * Text of the documentation comment, with '\r\n' replaced by '\n'.
1242 * 1343 *
1243 * References appearing within the doc comment in square brackets are not 1344 * References appearing within the doc comment in square brackets are not
1244 * specially encoded. 1345 * specially encoded.
1245 */ 1346 */
1246 void set text(String _value) { 1347 void set text(String _value) {
1247 assert(!_finished); 1348 assert(!_finished);
1248 _text = _value; 1349 _text = _value;
1249 } 1350 }
1250 1351
1352 @override
1353 int get offset => _offset ?? 0;
1354
1251 /** 1355 /**
1252 * Offset of the beginning of the documentation comment relative to the 1356 * Offset of the beginning of the documentation comment relative to the
1253 * beginning of the file. 1357 * beginning of the file.
1254 */ 1358 */
1255 void set offset(int _value) { 1359 void set offset(int _value) {
1256 assert(!_finished); 1360 assert(!_finished);
1257 _offset = _value; 1361 _offset = _value;
1258 } 1362 }
1259 1363
1364 @override
1365 int get length => _length ?? 0;
1366
1260 /** 1367 /**
1261 * Length of the documentation comment (prior to replacing '\r\n' with '\n'). 1368 * Length of the documentation comment (prior to replacing '\r\n' with '\n').
1262 */ 1369 */
1263 void set length(int _value) { 1370 void set length(int _value) {
1264 assert(!_finished); 1371 assert(!_finished);
1265 _length = _value; 1372 _length = _value;
1266 } 1373 }
1267 1374
1268 fb.Offset finish(fb.Builder fbBuilder) { 1375 fb.Offset finish(fb.Builder fbBuilder) {
1269 assert(!_finished); 1376 assert(!_finished);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 int get length; 1426 int get length;
1320 } 1427 }
1321 1428
1322 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume ntationCommentImpl> { 1429 class _UnlinkedDocumentationCommentReader extends fb.TableReader<_UnlinkedDocume ntationCommentImpl> {
1323 const _UnlinkedDocumentationCommentReader(); 1430 const _UnlinkedDocumentationCommentReader();
1324 1431
1325 @override 1432 @override
1326 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un linkedDocumentationCommentImpl(bp); 1433 _UnlinkedDocumentationCommentImpl createObject(fb.BufferPointer bp) => new _Un linkedDocumentationCommentImpl(bp);
1327 } 1434 }
1328 1435
1329 class _UnlinkedDocumentationCommentImpl implements UnlinkedDocumentationComment { 1436 class _UnlinkedDocumentationCommentImpl extends Object with _UnlinkedDocumentati onCommentMixin implements UnlinkedDocumentationComment {
1330 final fb.BufferPointer _bp; 1437 final fb.BufferPointer _bp;
1331 1438
1332 _UnlinkedDocumentationCommentImpl(this._bp); 1439 _UnlinkedDocumentationCommentImpl(this._bp);
1333 1440
1334 String _text; 1441 String _text;
1335 int _offset; 1442 int _offset;
1336 int _length; 1443 int _length;
1337 1444
1338 @override 1445 @override
1339 Map<String, Object> toMap() => {
1340 "text": text,
1341 "offset": offset,
1342 "length": length,
1343 };
1344
1345 @override
1346 String get text { 1446 String get text {
1347 _text ??= const fb.StringReader().vTableGet(_bp, 0, ''); 1447 _text ??= const fb.StringReader().vTableGet(_bp, 0, '');
1348 return _text; 1448 return _text;
1349 } 1449 }
1350 1450
1351 @override 1451 @override
1352 int get offset { 1452 int get offset {
1353 _offset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 1453 _offset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
1354 return _offset; 1454 return _offset;
1355 } 1455 }
1356 1456
1357 @override 1457 @override
1358 int get length { 1458 int get length {
1359 _length ??= const fb.Int32Reader().vTableGet(_bp, 2, 0); 1459 _length ??= const fb.Int32Reader().vTableGet(_bp, 2, 0);
1360 return _length; 1460 return _length;
1361 } 1461 }
1362 } 1462 }
1363 1463
1364 class UnlinkedEnumBuilder { 1464 abstract class _UnlinkedDocumentationCommentMixin implements UnlinkedDocumentati onComment {
1465 @override
1466 Map<String, Object> toMap() => {
1467 "text": text,
1468 "offset": offset,
1469 "length": length,
1470 };
1471 }
1472
1473 class UnlinkedEnumBuilder extends Object with _UnlinkedEnumMixin implements Unli nkedEnum {
1365 bool _finished = false; 1474 bool _finished = false;
1366 1475
1367 String _name; 1476 String _name;
1368 int _nameOffset; 1477 int _nameOffset;
1369 UnlinkedDocumentationCommentBuilder _documentationComment; 1478 UnlinkedDocumentationCommentBuilder _documentationComment;
1370 List<UnlinkedEnumValueBuilder> _values; 1479 List<UnlinkedEnumValueBuilder> _values;
1371 1480
1372 UnlinkedEnumBuilder(); 1481 UnlinkedEnumBuilder();
1373 1482
1483 @override
1484 String get name => _name ?? '';
1485
1374 /** 1486 /**
1375 * Name of the enum type. 1487 * Name of the enum type.
1376 */ 1488 */
1377 void set name(String _value) { 1489 void set name(String _value) {
1378 assert(!_finished); 1490 assert(!_finished);
1379 _name = _value; 1491 _name = _value;
1380 } 1492 }
1381 1493
1494 @override
1495 int get nameOffset => _nameOffset ?? 0;
1496
1382 /** 1497 /**
1383 * Offset of the enum name relative to the beginning of the file. 1498 * Offset of the enum name relative to the beginning of the file.
1384 */ 1499 */
1385 void set nameOffset(int _value) { 1500 void set nameOffset(int _value) {
1386 assert(!_finished); 1501 assert(!_finished);
1387 _nameOffset = _value; 1502 _nameOffset = _value;
1388 } 1503 }
1389 1504
1505 @override
1506 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
1507
1390 /** 1508 /**
1391 * Documentation comment for the enum, or `null` if there is no documentation 1509 * Documentation comment for the enum, or `null` if there is no documentation
1392 * comment. 1510 * comment.
1393 */ 1511 */
1394 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 1512 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
1395 assert(!_finished); 1513 assert(!_finished);
1396 _documentationComment = _value; 1514 _documentationComment = _value;
1397 } 1515 }
1398 1516
1517 @override
1518 List<UnlinkedEnumValue> get values => _values ?? const <UnlinkedEnumValue>[];
1519
1399 /** 1520 /**
1400 * Values listed in the enum declaration, in declaration order. 1521 * Values listed in the enum declaration, in declaration order.
1401 */ 1522 */
1402 void set values(List<UnlinkedEnumValueBuilder> _value) { 1523 void set values(List<UnlinkedEnumValueBuilder> _value) {
1403 assert(!_finished); 1524 assert(!_finished);
1404 _values = _value; 1525 _values = _value;
1405 } 1526 }
1406 1527
1407 fb.Offset finish(fb.Builder fbBuilder) { 1528 fb.Offset finish(fb.Builder fbBuilder) {
1408 assert(!_finished); 1529 assert(!_finished);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 List<UnlinkedEnumValue> get values; 1593 List<UnlinkedEnumValue> get values;
1473 } 1594 }
1474 1595
1475 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> { 1596 class _UnlinkedEnumReader extends fb.TableReader<_UnlinkedEnumImpl> {
1476 const _UnlinkedEnumReader(); 1597 const _UnlinkedEnumReader();
1477 1598
1478 @override 1599 @override
1479 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b p); 1600 _UnlinkedEnumImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumImpl(b p);
1480 } 1601 }
1481 1602
1482 class _UnlinkedEnumImpl implements UnlinkedEnum { 1603 class _UnlinkedEnumImpl extends Object with _UnlinkedEnumMixin implements Unlink edEnum {
1483 final fb.BufferPointer _bp; 1604 final fb.BufferPointer _bp;
1484 1605
1485 _UnlinkedEnumImpl(this._bp); 1606 _UnlinkedEnumImpl(this._bp);
1486 1607
1487 String _name; 1608 String _name;
1488 int _nameOffset; 1609 int _nameOffset;
1489 UnlinkedDocumentationComment _documentationComment; 1610 UnlinkedDocumentationComment _documentationComment;
1490 List<UnlinkedEnumValue> _values; 1611 List<UnlinkedEnumValue> _values;
1491 1612
1492 @override 1613 @override
1493 Map<String, Object> toMap() => {
1494 "name": name,
1495 "nameOffset": nameOffset,
1496 "documentationComment": documentationComment,
1497 "values": values,
1498 };
1499
1500 @override
1501 String get name { 1614 String get name {
1502 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 1615 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
1503 return _name; 1616 return _name;
1504 } 1617 }
1505 1618
1506 @override 1619 @override
1507 int get nameOffset { 1620 int get nameOffset {
1508 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 1621 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
1509 return _nameOffset; 1622 return _nameOffset;
1510 } 1623 }
1511 1624
1512 @override 1625 @override
1513 UnlinkedDocumentationComment get documentationComment { 1626 UnlinkedDocumentationComment get documentationComment {
1514 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null); 1627 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null);
1515 return _documentationComment; 1628 return _documentationComment;
1516 } 1629 }
1517 1630
1518 @override 1631 @override
1519 List<UnlinkedEnumValue> get values { 1632 List<UnlinkedEnumValue> get values {
1520 _values ??= const fb.ListReader<UnlinkedEnumValue>(const _UnlinkedEnumValueR eader()).vTableGet(_bp, 3, const <UnlinkedEnumValue>[]); 1633 _values ??= const fb.ListReader<UnlinkedEnumValue>(const _UnlinkedEnumValueR eader()).vTableGet(_bp, 3, const <UnlinkedEnumValue>[]);
1521 return _values; 1634 return _values;
1522 } 1635 }
1523 } 1636 }
1524 1637
1525 class UnlinkedEnumValueBuilder { 1638 abstract class _UnlinkedEnumMixin implements UnlinkedEnum {
1639 @override
1640 Map<String, Object> toMap() => {
1641 "name": name,
1642 "nameOffset": nameOffset,
1643 "documentationComment": documentationComment,
1644 "values": values,
1645 };
1646 }
1647
1648 class UnlinkedEnumValueBuilder extends Object with _UnlinkedEnumValueMixin imple ments UnlinkedEnumValue {
1526 bool _finished = false; 1649 bool _finished = false;
1527 1650
1528 String _name; 1651 String _name;
1529 int _nameOffset; 1652 int _nameOffset;
1530 UnlinkedDocumentationCommentBuilder _documentationComment; 1653 UnlinkedDocumentationCommentBuilder _documentationComment;
1531 1654
1532 UnlinkedEnumValueBuilder(); 1655 UnlinkedEnumValueBuilder();
1533 1656
1657 @override
1658 String get name => _name ?? '';
1659
1534 /** 1660 /**
1535 * Name of the enumerated value. 1661 * Name of the enumerated value.
1536 */ 1662 */
1537 void set name(String _value) { 1663 void set name(String _value) {
1538 assert(!_finished); 1664 assert(!_finished);
1539 _name = _value; 1665 _name = _value;
1540 } 1666 }
1541 1667
1668 @override
1669 int get nameOffset => _nameOffset ?? 0;
1670
1542 /** 1671 /**
1543 * Offset of the enum value name relative to the beginning of the file. 1672 * Offset of the enum value name relative to the beginning of the file.
1544 */ 1673 */
1545 void set nameOffset(int _value) { 1674 void set nameOffset(int _value) {
1546 assert(!_finished); 1675 assert(!_finished);
1547 _nameOffset = _value; 1676 _nameOffset = _value;
1548 } 1677 }
1549 1678
1679 @override
1680 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
1681
1550 /** 1682 /**
1551 * Documentation comment for the enum value, or `null` if there is no 1683 * Documentation comment for the enum value, or `null` if there is no
1552 * documentation comment. 1684 * documentation comment.
1553 */ 1685 */
1554 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 1686 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
1555 assert(!_finished); 1687 assert(!_finished);
1556 _documentationComment = _value; 1688 _documentationComment = _value;
1557 } 1689 }
1558 1690
1559 fb.Offset finish(fb.Builder fbBuilder) { 1691 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 UnlinkedDocumentationComment get documentationComment; 1744 UnlinkedDocumentationComment get documentationComment;
1613 } 1745 }
1614 1746
1615 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> { 1747 class _UnlinkedEnumValueReader extends fb.TableReader<_UnlinkedEnumValueImpl> {
1616 const _UnlinkedEnumValueReader(); 1748 const _UnlinkedEnumValueReader();
1617 1749
1618 @override 1750 @override
1619 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV alueImpl(bp); 1751 _UnlinkedEnumValueImpl createObject(fb.BufferPointer bp) => new _UnlinkedEnumV alueImpl(bp);
1620 } 1752 }
1621 1753
1622 class _UnlinkedEnumValueImpl implements UnlinkedEnumValue { 1754 class _UnlinkedEnumValueImpl extends Object with _UnlinkedEnumValueMixin impleme nts UnlinkedEnumValue {
1623 final fb.BufferPointer _bp; 1755 final fb.BufferPointer _bp;
1624 1756
1625 _UnlinkedEnumValueImpl(this._bp); 1757 _UnlinkedEnumValueImpl(this._bp);
1626 1758
1627 String _name; 1759 String _name;
1628 int _nameOffset; 1760 int _nameOffset;
1629 UnlinkedDocumentationComment _documentationComment; 1761 UnlinkedDocumentationComment _documentationComment;
1630 1762
1631 @override 1763 @override
1632 Map<String, Object> toMap() => {
1633 "name": name,
1634 "nameOffset": nameOffset,
1635 "documentationComment": documentationComment,
1636 };
1637
1638 @override
1639 String get name { 1764 String get name {
1640 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 1765 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
1641 return _name; 1766 return _name;
1642 } 1767 }
1643 1768
1644 @override 1769 @override
1645 int get nameOffset { 1770 int get nameOffset {
1646 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 1771 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
1647 return _nameOffset; 1772 return _nameOffset;
1648 } 1773 }
1649 1774
1650 @override 1775 @override
1651 UnlinkedDocumentationComment get documentationComment { 1776 UnlinkedDocumentationComment get documentationComment {
1652 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null); 1777 _documentationComment ??= const _UnlinkedDocumentationCommentReader().vTable Get(_bp, 2, null);
1653 return _documentationComment; 1778 return _documentationComment;
1654 } 1779 }
1655 } 1780 }
1656 1781
1657 class UnlinkedExecutableBuilder { 1782 abstract class _UnlinkedEnumValueMixin implements UnlinkedEnumValue {
1783 @override
1784 Map<String, Object> toMap() => {
1785 "name": name,
1786 "nameOffset": nameOffset,
1787 "documentationComment": documentationComment,
1788 };
1789 }
1790
1791 class UnlinkedExecutableBuilder extends Object with _UnlinkedExecutableMixin imp lements UnlinkedExecutable {
1658 bool _finished = false; 1792 bool _finished = false;
1659 1793
1660 String _name; 1794 String _name;
1661 int _nameOffset; 1795 int _nameOffset;
1662 UnlinkedDocumentationCommentBuilder _documentationComment; 1796 UnlinkedDocumentationCommentBuilder _documentationComment;
1663 List<UnlinkedTypeParamBuilder> _typeParameters; 1797 List<UnlinkedTypeParamBuilder> _typeParameters;
1664 UnlinkedTypeRefBuilder _returnType; 1798 UnlinkedTypeRefBuilder _returnType;
1665 List<UnlinkedParamBuilder> _parameters; 1799 List<UnlinkedParamBuilder> _parameters;
1666 UnlinkedExecutableKind _kind; 1800 UnlinkedExecutableKind _kind;
1667 bool _isAbstract; 1801 bool _isAbstract;
1668 bool _isStatic; 1802 bool _isStatic;
1669 bool _isConst; 1803 bool _isConst;
1670 bool _isFactory; 1804 bool _isFactory;
1671 bool _hasImplicitReturnType; 1805 bool _hasImplicitReturnType;
1672 bool _isExternal; 1806 bool _isExternal;
1673 1807
1674 UnlinkedExecutableBuilder(); 1808 UnlinkedExecutableBuilder();
1675 1809
1810 @override
1811 String get name => _name ?? '';
1812
1676 /** 1813 /**
1677 * Name of the executable. For setters, this includes the trailing "=". For 1814 * Name of the executable. For setters, this includes the trailing "=". For
1678 * named constructors, this excludes the class name and excludes the ".". 1815 * named constructors, this excludes the class name and excludes the ".".
1679 * For unnamed constructors, this is the empty string. 1816 * For unnamed constructors, this is the empty string.
1680 */ 1817 */
1681 void set name(String _value) { 1818 void set name(String _value) {
1682 assert(!_finished); 1819 assert(!_finished);
1683 _name = _value; 1820 _name = _value;
1684 } 1821 }
1685 1822
1823 @override
1824 int get nameOffset => _nameOffset ?? 0;
1825
1686 /** 1826 /**
1687 * Offset of the executable name relative to the beginning of the file. For 1827 * Offset of the executable name relative to the beginning of the file. For
1688 * named constructors, this excludes the class name and excludes the ".". 1828 * named constructors, this excludes the class name and excludes the ".".
1689 * For unnamed constructors, this is the offset of the class name (i.e. the 1829 * For unnamed constructors, this is the offset of the class name (i.e. the
1690 * offset of the second "C" in "class C { C(); }"). 1830 * offset of the second "C" in "class C { C(); }").
1691 */ 1831 */
1692 void set nameOffset(int _value) { 1832 void set nameOffset(int _value) {
1693 assert(!_finished); 1833 assert(!_finished);
1694 _nameOffset = _value; 1834 _nameOffset = _value;
1695 } 1835 }
1696 1836
1837 @override
1838 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
1839
1697 /** 1840 /**
1698 * Documentation comment for the executable, or `null` if there is no 1841 * Documentation comment for the executable, or `null` if there is no
1699 * documentation comment. 1842 * documentation comment.
1700 */ 1843 */
1701 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 1844 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
1702 assert(!_finished); 1845 assert(!_finished);
1703 _documentationComment = _value; 1846 _documentationComment = _value;
1704 } 1847 }
1705 1848
1849 @override
1850 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[];
1851
1706 /** 1852 /**
1707 * Type parameters of the executable, if any. Empty if support for generic 1853 * Type parameters of the executable, if any. Empty if support for generic
1708 * method syntax is disabled. 1854 * method syntax is disabled.
1709 */ 1855 */
1710 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 1856 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
1711 assert(!_finished); 1857 assert(!_finished);
1712 _typeParameters = _value; 1858 _typeParameters = _value;
1713 } 1859 }
1714 1860
1861 @override
1862 UnlinkedTypeRef get returnType => _returnType;
1863
1715 /** 1864 /**
1716 * Declared return type of the executable. Absent if the return type is 1865 * Declared return type of the executable. Absent if the return type is
1717 * `void` or the executable is a constructor. Note that when strong mode is 1866 * `void` or the executable is a constructor. Note that when strong mode is
1718 * enabled, the actual return type may be different due to type inference. 1867 * enabled, the actual return type may be different due to type inference.
1719 */ 1868 */
1720 void set returnType(UnlinkedTypeRefBuilder _value) { 1869 void set returnType(UnlinkedTypeRefBuilder _value) {
1721 assert(!_finished); 1870 assert(!_finished);
1722 _returnType = _value; 1871 _returnType = _value;
1723 } 1872 }
1724 1873
1874 @override
1875 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
1876
1725 /** 1877 /**
1726 * Parameters of the executable, if any. Note that getters have no 1878 * Parameters of the executable, if any. Note that getters have no
1727 * parameters (hence this will be the empty list), and setters have a single 1879 * parameters (hence this will be the empty list), and setters have a single
1728 * parameter. 1880 * parameter.
1729 */ 1881 */
1730 void set parameters(List<UnlinkedParamBuilder> _value) { 1882 void set parameters(List<UnlinkedParamBuilder> _value) {
1731 assert(!_finished); 1883 assert(!_finished);
1732 _parameters = _value; 1884 _parameters = _value;
1733 } 1885 }
1734 1886
1887 @override
1888 UnlinkedExecutableKind get kind => _kind ?? UnlinkedExecutableKind.functionOrM ethod;
1889
1735 /** 1890 /**
1736 * The kind of the executable (function/method, getter, setter, or 1891 * The kind of the executable (function/method, getter, setter, or
1737 * constructor). 1892 * constructor).
1738 */ 1893 */
1739 void set kind(UnlinkedExecutableKind _value) { 1894 void set kind(UnlinkedExecutableKind _value) {
1740 assert(!_finished); 1895 assert(!_finished);
1741 _kind = _value; 1896 _kind = _value;
1742 } 1897 }
1743 1898
1899 @override
1900 bool get isAbstract => _isAbstract ?? false;
1901
1744 /** 1902 /**
1745 * Indicates whether the executable is declared using the `abstract` keyword. 1903 * Indicates whether the executable is declared using the `abstract` keyword.
1746 */ 1904 */
1747 void set isAbstract(bool _value) { 1905 void set isAbstract(bool _value) {
1748 assert(!_finished); 1906 assert(!_finished);
1749 _isAbstract = _value; 1907 _isAbstract = _value;
1750 } 1908 }
1751 1909
1910 @override
1911 bool get isStatic => _isStatic ?? false;
1912
1752 /** 1913 /**
1753 * Indicates whether the executable is declared using the `static` keyword. 1914 * Indicates whether the executable is declared using the `static` keyword.
1754 * 1915 *
1755 * Note that for top level executables, this flag is false, since they are 1916 * Note that for top level executables, this flag is false, since they are
1756 * not declared using the `static` keyword (even though they are considered 1917 * not declared using the `static` keyword (even though they are considered
1757 * static for semantic purposes). 1918 * static for semantic purposes).
1758 */ 1919 */
1759 void set isStatic(bool _value) { 1920 void set isStatic(bool _value) {
1760 assert(!_finished); 1921 assert(!_finished);
1761 _isStatic = _value; 1922 _isStatic = _value;
1762 } 1923 }
1763 1924
1925 @override
1926 bool get isConst => _isConst ?? false;
1927
1764 /** 1928 /**
1765 * Indicates whether the executable is declared using the `const` keyword. 1929 * Indicates whether the executable is declared using the `const` keyword.
1766 */ 1930 */
1767 void set isConst(bool _value) { 1931 void set isConst(bool _value) {
1768 assert(!_finished); 1932 assert(!_finished);
1769 _isConst = _value; 1933 _isConst = _value;
1770 } 1934 }
1771 1935
1936 @override
1937 bool get isFactory => _isFactory ?? false;
1938
1772 /** 1939 /**
1773 * Indicates whether the executable is declared using the `factory` keyword. 1940 * Indicates whether the executable is declared using the `factory` keyword.
1774 */ 1941 */
1775 void set isFactory(bool _value) { 1942 void set isFactory(bool _value) {
1776 assert(!_finished); 1943 assert(!_finished);
1777 _isFactory = _value; 1944 _isFactory = _value;
1778 } 1945 }
1779 1946
1947 @override
1948 bool get hasImplicitReturnType => _hasImplicitReturnType ?? false;
1949
1780 /** 1950 /**
1781 * Indicates whether the executable lacks an explicit return type 1951 * Indicates whether the executable lacks an explicit return type
1782 * declaration. False for constructors and setters. 1952 * declaration. False for constructors and setters.
1783 */ 1953 */
1784 void set hasImplicitReturnType(bool _value) { 1954 void set hasImplicitReturnType(bool _value) {
1785 assert(!_finished); 1955 assert(!_finished);
1786 _hasImplicitReturnType = _value; 1956 _hasImplicitReturnType = _value;
1787 } 1957 }
1788 1958
1959 @override
1960 bool get isExternal => _isExternal ?? false;
1961
1789 /** 1962 /**
1790 * Indicates whether the executable is declared using the `external` keyword. 1963 * Indicates whether the executable is declared using the `external` keyword.
1791 */ 1964 */
1792 void set isExternal(bool _value) { 1965 void set isExternal(bool _value) {
1793 assert(!_finished); 1966 assert(!_finished);
1794 _isExternal = _value; 1967 _isExternal = _value;
1795 } 1968 }
1796 1969
1797 fb.Offset finish(fb.Builder fbBuilder) { 1970 fb.Offset finish(fb.Builder fbBuilder) {
1798 assert(!_finished); 1971 assert(!_finished);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 bool get isExternal; 2141 bool get isExternal;
1969 } 2142 }
1970 2143
1971 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl> { 2144 class _UnlinkedExecutableReader extends fb.TableReader<_UnlinkedExecutableImpl> {
1972 const _UnlinkedExecutableReader(); 2145 const _UnlinkedExecutableReader();
1973 2146
1974 @override 2147 @override
1975 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec utableImpl(bp); 2148 _UnlinkedExecutableImpl createObject(fb.BufferPointer bp) => new _UnlinkedExec utableImpl(bp);
1976 } 2149 }
1977 2150
1978 class _UnlinkedExecutableImpl implements UnlinkedExecutable { 2151 class _UnlinkedExecutableImpl extends Object with _UnlinkedExecutableMixin imple ments UnlinkedExecutable {
1979 final fb.BufferPointer _bp; 2152 final fb.BufferPointer _bp;
1980 2153
1981 _UnlinkedExecutableImpl(this._bp); 2154 _UnlinkedExecutableImpl(this._bp);
1982 2155
1983 String _name; 2156 String _name;
1984 int _nameOffset; 2157 int _nameOffset;
1985 UnlinkedDocumentationComment _documentationComment; 2158 UnlinkedDocumentationComment _documentationComment;
1986 List<UnlinkedTypeParam> _typeParameters; 2159 List<UnlinkedTypeParam> _typeParameters;
1987 UnlinkedTypeRef _returnType; 2160 UnlinkedTypeRef _returnType;
1988 List<UnlinkedParam> _parameters; 2161 List<UnlinkedParam> _parameters;
1989 UnlinkedExecutableKind _kind; 2162 UnlinkedExecutableKind _kind;
1990 bool _isAbstract; 2163 bool _isAbstract;
1991 bool _isStatic; 2164 bool _isStatic;
1992 bool _isConst; 2165 bool _isConst;
1993 bool _isFactory; 2166 bool _isFactory;
1994 bool _hasImplicitReturnType; 2167 bool _hasImplicitReturnType;
1995 bool _isExternal; 2168 bool _isExternal;
1996 2169
1997 @override 2170 @override
1998 Map<String, Object> toMap() => {
1999 "name": name,
2000 "nameOffset": nameOffset,
2001 "documentationComment": documentationComment,
2002 "typeParameters": typeParameters,
2003 "returnType": returnType,
2004 "parameters": parameters,
2005 "kind": kind,
2006 "isAbstract": isAbstract,
2007 "isStatic": isStatic,
2008 "isConst": isConst,
2009 "isFactory": isFactory,
2010 "hasImplicitReturnType": hasImplicitReturnType,
2011 "isExternal": isExternal,
2012 };
2013
2014 @override
2015 String get name { 2171 String get name {
2016 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 2172 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
2017 return _name; 2173 return _name;
2018 } 2174 }
2019 2175
2020 @override 2176 @override
2021 int get nameOffset { 2177 int get nameOffset {
2022 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 2178 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
2023 return _nameOffset; 2179 return _nameOffset;
2024 } 2180 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 return _hasImplicitReturnType; 2239 return _hasImplicitReturnType;
2084 } 2240 }
2085 2241
2086 @override 2242 @override
2087 bool get isExternal { 2243 bool get isExternal {
2088 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 12, false); 2244 _isExternal ??= const fb.BoolReader().vTableGet(_bp, 12, false);
2089 return _isExternal; 2245 return _isExternal;
2090 } 2246 }
2091 } 2247 }
2092 2248
2093 class UnlinkedExportNonPublicBuilder { 2249 abstract class _UnlinkedExecutableMixin implements UnlinkedExecutable {
2250 @override
2251 Map<String, Object> toMap() => {
2252 "name": name,
2253 "nameOffset": nameOffset,
2254 "documentationComment": documentationComment,
2255 "typeParameters": typeParameters,
2256 "returnType": returnType,
2257 "parameters": parameters,
2258 "kind": kind,
2259 "isAbstract": isAbstract,
2260 "isStatic": isStatic,
2261 "isConst": isConst,
2262 "isFactory": isFactory,
2263 "hasImplicitReturnType": hasImplicitReturnType,
2264 "isExternal": isExternal,
2265 };
2266 }
2267
2268 class UnlinkedExportNonPublicBuilder extends Object with _UnlinkedExportNonPubli cMixin implements UnlinkedExportNonPublic {
2094 bool _finished = false; 2269 bool _finished = false;
2095 2270
2096 int _offset; 2271 int _offset;
2097 int _uriOffset; 2272 int _uriOffset;
2098 int _uriEnd; 2273 int _uriEnd;
2099 2274
2100 UnlinkedExportNonPublicBuilder(); 2275 UnlinkedExportNonPublicBuilder();
2101 2276
2277 @override
2278 int get offset => _offset ?? 0;
2279
2102 /** 2280 /**
2103 * Offset of the "export" keyword. 2281 * Offset of the "export" keyword.
2104 */ 2282 */
2105 void set offset(int _value) { 2283 void set offset(int _value) {
2106 assert(!_finished); 2284 assert(!_finished);
2107 _offset = _value; 2285 _offset = _value;
2108 } 2286 }
2109 2287
2288 @override
2289 int get uriOffset => _uriOffset ?? 0;
2290
2110 /** 2291 /**
2111 * Offset of the URI string (including quotes) relative to the beginning of 2292 * Offset of the URI string (including quotes) relative to the beginning of
2112 * the file. 2293 * the file.
2113 */ 2294 */
2114 void set uriOffset(int _value) { 2295 void set uriOffset(int _value) {
2115 assert(!_finished); 2296 assert(!_finished);
2116 _uriOffset = _value; 2297 _uriOffset = _value;
2117 } 2298 }
2118 2299
2300 @override
2301 int get uriEnd => _uriEnd ?? 0;
2302
2119 /** 2303 /**
2120 * End of the URI string (including quotes) relative to the beginning of the 2304 * End of the URI string (including quotes) relative to the beginning of the
2121 * file. 2305 * file.
2122 */ 2306 */
2123 void set uriEnd(int _value) { 2307 void set uriEnd(int _value) {
2124 assert(!_finished); 2308 assert(!_finished);
2125 _uriEnd = _value; 2309 _uriEnd = _value;
2126 } 2310 }
2127 2311
2128 fb.Offset finish(fb.Builder fbBuilder) { 2312 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 int get uriEnd; 2358 int get uriEnd;
2175 } 2359 }
2176 2360
2177 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu blicImpl> { 2361 class _UnlinkedExportNonPublicReader extends fb.TableReader<_UnlinkedExportNonPu blicImpl> {
2178 const _UnlinkedExportNonPublicReader(); 2362 const _UnlinkedExportNonPublicReader();
2179 2363
2180 @override 2364 @override
2181 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke dExportNonPublicImpl(bp); 2365 _UnlinkedExportNonPublicImpl createObject(fb.BufferPointer bp) => new _Unlinke dExportNonPublicImpl(bp);
2182 } 2366 }
2183 2367
2184 class _UnlinkedExportNonPublicImpl implements UnlinkedExportNonPublic { 2368 class _UnlinkedExportNonPublicImpl extends Object with _UnlinkedExportNonPublicM ixin implements UnlinkedExportNonPublic {
2185 final fb.BufferPointer _bp; 2369 final fb.BufferPointer _bp;
2186 2370
2187 _UnlinkedExportNonPublicImpl(this._bp); 2371 _UnlinkedExportNonPublicImpl(this._bp);
2188 2372
2189 int _offset; 2373 int _offset;
2190 int _uriOffset; 2374 int _uriOffset;
2191 int _uriEnd; 2375 int _uriEnd;
2192 2376
2193 @override 2377 @override
2194 Map<String, Object> toMap() => {
2195 "offset": offset,
2196 "uriOffset": uriOffset,
2197 "uriEnd": uriEnd,
2198 };
2199
2200 @override
2201 int get offset { 2378 int get offset {
2202 _offset ??= const fb.Int32Reader().vTableGet(_bp, 0, 0); 2379 _offset ??= const fb.Int32Reader().vTableGet(_bp, 0, 0);
2203 return _offset; 2380 return _offset;
2204 } 2381 }
2205 2382
2206 @override 2383 @override
2207 int get uriOffset { 2384 int get uriOffset {
2208 _uriOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 2385 _uriOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
2209 return _uriOffset; 2386 return _uriOffset;
2210 } 2387 }
2211 2388
2212 @override 2389 @override
2213 int get uriEnd { 2390 int get uriEnd {
2214 _uriEnd ??= const fb.Int32Reader().vTableGet(_bp, 2, 0); 2391 _uriEnd ??= const fb.Int32Reader().vTableGet(_bp, 2, 0);
2215 return _uriEnd; 2392 return _uriEnd;
2216 } 2393 }
2217 } 2394 }
2218 2395
2219 class UnlinkedExportPublicBuilder { 2396 abstract class _UnlinkedExportNonPublicMixin implements UnlinkedExportNonPublic {
2397 @override
2398 Map<String, Object> toMap() => {
2399 "offset": offset,
2400 "uriOffset": uriOffset,
2401 "uriEnd": uriEnd,
2402 };
2403 }
2404
2405 class UnlinkedExportPublicBuilder extends Object with _UnlinkedExportPublicMixin implements UnlinkedExportPublic {
2220 bool _finished = false; 2406 bool _finished = false;
2221 2407
2222 String _uri; 2408 String _uri;
2223 List<UnlinkedCombinatorBuilder> _combinators; 2409 List<UnlinkedCombinatorBuilder> _combinators;
2224 2410
2225 UnlinkedExportPublicBuilder(); 2411 UnlinkedExportPublicBuilder();
2226 2412
2413 @override
2414 String get uri => _uri ?? '';
2415
2227 /** 2416 /**
2228 * URI used in the source code to reference the exported library. 2417 * URI used in the source code to reference the exported library.
2229 */ 2418 */
2230 void set uri(String _value) { 2419 void set uri(String _value) {
2231 assert(!_finished); 2420 assert(!_finished);
2232 _uri = _value; 2421 _uri = _value;
2233 } 2422 }
2234 2423
2424 @override
2425 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom binator>[];
2426
2235 /** 2427 /**
2236 * Combinators contained in this import declaration. 2428 * Combinators contained in this import declaration.
2237 */ 2429 */
2238 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 2430 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
2239 assert(!_finished); 2431 assert(!_finished);
2240 _combinators = _value; 2432 _combinators = _value;
2241 } 2433 }
2242 2434
2243 fb.Offset finish(fb.Builder fbBuilder) { 2435 fb.Offset finish(fb.Builder fbBuilder) {
2244 assert(!_finished); 2436 assert(!_finished);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 List<UnlinkedCombinator> get combinators; 2478 List<UnlinkedCombinator> get combinators;
2287 } 2479 }
2288 2480
2289 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm pl> { 2481 class _UnlinkedExportPublicReader extends fb.TableReader<_UnlinkedExportPublicIm pl> {
2290 const _UnlinkedExportPublicReader(); 2482 const _UnlinkedExportPublicReader();
2291 2483
2292 @override 2484 @override
2293 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx portPublicImpl(bp); 2485 _UnlinkedExportPublicImpl createObject(fb.BufferPointer bp) => new _UnlinkedEx portPublicImpl(bp);
2294 } 2486 }
2295 2487
2296 class _UnlinkedExportPublicImpl implements UnlinkedExportPublic { 2488 class _UnlinkedExportPublicImpl extends Object with _UnlinkedExportPublicMixin i mplements UnlinkedExportPublic {
2297 final fb.BufferPointer _bp; 2489 final fb.BufferPointer _bp;
2298 2490
2299 _UnlinkedExportPublicImpl(this._bp); 2491 _UnlinkedExportPublicImpl(this._bp);
2300 2492
2301 String _uri; 2493 String _uri;
2302 List<UnlinkedCombinator> _combinators; 2494 List<UnlinkedCombinator> _combinators;
2303 2495
2304 @override 2496 @override
2305 Map<String, Object> toMap() => {
2306 "uri": uri,
2307 "combinators": combinators,
2308 };
2309
2310 @override
2311 String get uri { 2497 String get uri {
2312 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); 2498 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
2313 return _uri; 2499 return _uri;
2314 } 2500 }
2315 2501
2316 @override 2502 @override
2317 List<UnlinkedCombinator> get combinators { 2503 List<UnlinkedCombinator> get combinators {
2318 _combinators ??= const fb.ListReader<UnlinkedCombinator>(const _UnlinkedComb inatorReader()).vTableGet(_bp, 1, const <UnlinkedCombinator>[]); 2504 _combinators ??= const fb.ListReader<UnlinkedCombinator>(const _UnlinkedComb inatorReader()).vTableGet(_bp, 1, const <UnlinkedCombinator>[]);
2319 return _combinators; 2505 return _combinators;
2320 } 2506 }
2321 } 2507 }
2322 2508
2323 class UnlinkedImportBuilder { 2509 abstract class _UnlinkedExportPublicMixin implements UnlinkedExportPublic {
2510 @override
2511 Map<String, Object> toMap() => {
2512 "uri": uri,
2513 "combinators": combinators,
2514 };
2515 }
2516
2517 class UnlinkedImportBuilder extends Object with _UnlinkedImportMixin implements UnlinkedImport {
2324 bool _finished = false; 2518 bool _finished = false;
2325 2519
2326 String _uri; 2520 String _uri;
2327 int _offset; 2521 int _offset;
2328 int _prefixReference; 2522 int _prefixReference;
2329 List<UnlinkedCombinatorBuilder> _combinators; 2523 List<UnlinkedCombinatorBuilder> _combinators;
2330 bool _isDeferred; 2524 bool _isDeferred;
2331 bool _isImplicit; 2525 bool _isImplicit;
2332 int _uriOffset; 2526 int _uriOffset;
2333 int _uriEnd; 2527 int _uriEnd;
2334 int _prefixOffset; 2528 int _prefixOffset;
2335 2529
2336 UnlinkedImportBuilder(); 2530 UnlinkedImportBuilder();
2337 2531
2532 @override
2533 String get uri => _uri ?? '';
2534
2338 /** 2535 /**
2339 * URI used in the source code to reference the imported library. 2536 * URI used in the source code to reference the imported library.
2340 */ 2537 */
2341 void set uri(String _value) { 2538 void set uri(String _value) {
2342 assert(!_finished); 2539 assert(!_finished);
2343 _uri = _value; 2540 _uri = _value;
2344 } 2541 }
2345 2542
2543 @override
2544 int get offset => _offset ?? 0;
2545
2346 /** 2546 /**
2347 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit] 2547 * If [isImplicit] is false, offset of the "import" keyword. If [isImplicit]
2348 * is true, zero. 2548 * is true, zero.
2349 */ 2549 */
2350 void set offset(int _value) { 2550 void set offset(int _value) {
2351 assert(!_finished); 2551 assert(!_finished);
2352 _offset = _value; 2552 _offset = _value;
2353 } 2553 }
2354 2554
2555 @override
2556 int get prefixReference => _prefixReference ?? 0;
2557
2355 /** 2558 /**
2356 * Index into [UnlinkedUnit.references] of the prefix declared by this 2559 * Index into [UnlinkedUnit.references] of the prefix declared by this
2357 * import declaration, or zero if this import declaration declares no prefix. 2560 * import declaration, or zero if this import declaration declares no prefix.
2358 * 2561 *
2359 * Note that multiple imports can declare the same prefix. 2562 * Note that multiple imports can declare the same prefix.
2360 */ 2563 */
2361 void set prefixReference(int _value) { 2564 void set prefixReference(int _value) {
2362 assert(!_finished); 2565 assert(!_finished);
2363 _prefixReference = _value; 2566 _prefixReference = _value;
2364 } 2567 }
2365 2568
2569 @override
2570 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom binator>[];
2571
2366 /** 2572 /**
2367 * Combinators contained in this import declaration. 2573 * Combinators contained in this import declaration.
2368 */ 2574 */
2369 void set combinators(List<UnlinkedCombinatorBuilder> _value) { 2575 void set combinators(List<UnlinkedCombinatorBuilder> _value) {
2370 assert(!_finished); 2576 assert(!_finished);
2371 _combinators = _value; 2577 _combinators = _value;
2372 } 2578 }
2373 2579
2580 @override
2581 bool get isDeferred => _isDeferred ?? false;
2582
2374 /** 2583 /**
2375 * Indicates whether the import declaration uses the `deferred` keyword. 2584 * Indicates whether the import declaration uses the `deferred` keyword.
2376 */ 2585 */
2377 void set isDeferred(bool _value) { 2586 void set isDeferred(bool _value) {
2378 assert(!_finished); 2587 assert(!_finished);
2379 _isDeferred = _value; 2588 _isDeferred = _value;
2380 } 2589 }
2381 2590
2591 @override
2592 bool get isImplicit => _isImplicit ?? false;
2593
2382 /** 2594 /**
2383 * Indicates whether the import declaration is implicit. 2595 * Indicates whether the import declaration is implicit.
2384 */ 2596 */
2385 void set isImplicit(bool _value) { 2597 void set isImplicit(bool _value) {
2386 assert(!_finished); 2598 assert(!_finished);
2387 _isImplicit = _value; 2599 _isImplicit = _value;
2388 } 2600 }
2389 2601
2602 @override
2603 int get uriOffset => _uriOffset ?? 0;
2604
2390 /** 2605 /**
2391 * Offset of the URI string (including quotes) relative to the beginning of 2606 * Offset of the URI string (including quotes) relative to the beginning of
2392 * the file. If [isImplicit] is true, zero. 2607 * the file. If [isImplicit] is true, zero.
2393 */ 2608 */
2394 void set uriOffset(int _value) { 2609 void set uriOffset(int _value) {
2395 assert(!_finished); 2610 assert(!_finished);
2396 _uriOffset = _value; 2611 _uriOffset = _value;
2397 } 2612 }
2398 2613
2614 @override
2615 int get uriEnd => _uriEnd ?? 0;
2616
2399 /** 2617 /**
2400 * End of the URI string (including quotes) relative to the beginning of the 2618 * End of the URI string (including quotes) relative to the beginning of the
2401 * file. If [isImplicit] is true, zero. 2619 * file. If [isImplicit] is true, zero.
2402 */ 2620 */
2403 void set uriEnd(int _value) { 2621 void set uriEnd(int _value) {
2404 assert(!_finished); 2622 assert(!_finished);
2405 _uriEnd = _value; 2623 _uriEnd = _value;
2406 } 2624 }
2407 2625
2626 @override
2627 int get prefixOffset => _prefixOffset ?? 0;
2628
2408 /** 2629 /**
2409 * Offset of the prefix name relative to the beginning of the file, or zero 2630 * Offset of the prefix name relative to the beginning of the file, or zero
2410 * if there is no prefix. 2631 * if there is no prefix.
2411 */ 2632 */
2412 void set prefixOffset(int _value) { 2633 void set prefixOffset(int _value) {
2413 assert(!_finished); 2634 assert(!_finished);
2414 _prefixOffset = _value; 2635 _prefixOffset = _value;
2415 } 2636 }
2416 2637
2417 fb.Offset finish(fb.Builder fbBuilder) { 2638 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 int get prefixOffset; 2750 int get prefixOffset;
2530 } 2751 }
2531 2752
2532 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> { 2753 class _UnlinkedImportReader extends fb.TableReader<_UnlinkedImportImpl> {
2533 const _UnlinkedImportReader(); 2754 const _UnlinkedImportReader();
2534 2755
2535 @override 2756 @override
2536 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm pl(bp); 2757 _UnlinkedImportImpl createObject(fb.BufferPointer bp) => new _UnlinkedImportIm pl(bp);
2537 } 2758 }
2538 2759
2539 class _UnlinkedImportImpl implements UnlinkedImport { 2760 class _UnlinkedImportImpl extends Object with _UnlinkedImportMixin implements Un linkedImport {
2540 final fb.BufferPointer _bp; 2761 final fb.BufferPointer _bp;
2541 2762
2542 _UnlinkedImportImpl(this._bp); 2763 _UnlinkedImportImpl(this._bp);
2543 2764
2544 String _uri; 2765 String _uri;
2545 int _offset; 2766 int _offset;
2546 int _prefixReference; 2767 int _prefixReference;
2547 List<UnlinkedCombinator> _combinators; 2768 List<UnlinkedCombinator> _combinators;
2548 bool _isDeferred; 2769 bool _isDeferred;
2549 bool _isImplicit; 2770 bool _isImplicit;
2550 int _uriOffset; 2771 int _uriOffset;
2551 int _uriEnd; 2772 int _uriEnd;
2552 int _prefixOffset; 2773 int _prefixOffset;
2553 2774
2554 @override 2775 @override
2555 Map<String, Object> toMap() => {
2556 "uri": uri,
2557 "offset": offset,
2558 "prefixReference": prefixReference,
2559 "combinators": combinators,
2560 "isDeferred": isDeferred,
2561 "isImplicit": isImplicit,
2562 "uriOffset": uriOffset,
2563 "uriEnd": uriEnd,
2564 "prefixOffset": prefixOffset,
2565 };
2566
2567 @override
2568 String get uri { 2776 String get uri {
2569 _uri ??= const fb.StringReader().vTableGet(_bp, 0, ''); 2777 _uri ??= const fb.StringReader().vTableGet(_bp, 0, '');
2570 return _uri; 2778 return _uri;
2571 } 2779 }
2572 2780
2573 @override 2781 @override
2574 int get offset { 2782 int get offset {
2575 _offset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 2783 _offset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
2576 return _offset; 2784 return _offset;
2577 } 2785 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 return _uriEnd; 2820 return _uriEnd;
2613 } 2821 }
2614 2822
2615 @override 2823 @override
2616 int get prefixOffset { 2824 int get prefixOffset {
2617 _prefixOffset ??= const fb.Int32Reader().vTableGet(_bp, 8, 0); 2825 _prefixOffset ??= const fb.Int32Reader().vTableGet(_bp, 8, 0);
2618 return _prefixOffset; 2826 return _prefixOffset;
2619 } 2827 }
2620 } 2828 }
2621 2829
2622 class UnlinkedParamBuilder { 2830 abstract class _UnlinkedImportMixin implements UnlinkedImport {
2831 @override
2832 Map<String, Object> toMap() => {
2833 "uri": uri,
2834 "offset": offset,
2835 "prefixReference": prefixReference,
2836 "combinators": combinators,
2837 "isDeferred": isDeferred,
2838 "isImplicit": isImplicit,
2839 "uriOffset": uriOffset,
2840 "uriEnd": uriEnd,
2841 "prefixOffset": prefixOffset,
2842 };
2843 }
2844
2845 class UnlinkedParamBuilder extends Object with _UnlinkedParamMixin implements Un linkedParam {
2623 bool _finished = false; 2846 bool _finished = false;
2624 2847
2625 String _name; 2848 String _name;
2626 int _nameOffset; 2849 int _nameOffset;
2627 UnlinkedTypeRefBuilder _type; 2850 UnlinkedTypeRefBuilder _type;
2628 List<UnlinkedParamBuilder> _parameters; 2851 List<UnlinkedParamBuilder> _parameters;
2629 UnlinkedParamKind _kind; 2852 UnlinkedParamKind _kind;
2630 bool _isFunctionTyped; 2853 bool _isFunctionTyped;
2631 bool _isInitializingFormal; 2854 bool _isInitializingFormal;
2632 bool _hasImplicitType; 2855 bool _hasImplicitType;
2633 2856
2634 UnlinkedParamBuilder(); 2857 UnlinkedParamBuilder();
2635 2858
2859 @override
2860 String get name => _name ?? '';
2861
2636 /** 2862 /**
2637 * Name of the parameter. 2863 * Name of the parameter.
2638 */ 2864 */
2639 void set name(String _value) { 2865 void set name(String _value) {
2640 assert(!_finished); 2866 assert(!_finished);
2641 _name = _value; 2867 _name = _value;
2642 } 2868 }
2643 2869
2870 @override
2871 int get nameOffset => _nameOffset ?? 0;
2872
2644 /** 2873 /**
2645 * Offset of the parameter name relative to the beginning of the file. 2874 * Offset of the parameter name relative to the beginning of the file.
2646 */ 2875 */
2647 void set nameOffset(int _value) { 2876 void set nameOffset(int _value) {
2648 assert(!_finished); 2877 assert(!_finished);
2649 _nameOffset = _value; 2878 _nameOffset = _value;
2650 } 2879 }
2651 2880
2881 @override
2882 UnlinkedTypeRef get type => _type;
2883
2652 /** 2884 /**
2653 * If [isFunctionTyped] is `true`, the declared return type. If 2885 * If [isFunctionTyped] is `true`, the declared return type. If
2654 * [isFunctionTyped] is `false`, the declared type. Absent if 2886 * [isFunctionTyped] is `false`, the declared type. Absent if
2655 * [isFunctionTyped] is `true` and the declared return type is `void`. Note 2887 * [isFunctionTyped] is `true` and the declared return type is `void`. Note
2656 * that when strong mode is enabled, the actual type may be different due to 2888 * that when strong mode is enabled, the actual type may be different due to
2657 * type inference. 2889 * type inference.
2658 */ 2890 */
2659 void set type(UnlinkedTypeRefBuilder _value) { 2891 void set type(UnlinkedTypeRefBuilder _value) {
2660 assert(!_finished); 2892 assert(!_finished);
2661 _type = _value; 2893 _type = _value;
2662 } 2894 }
2663 2895
2896 @override
2897 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
2898
2664 /** 2899 /**
2665 * If [isFunctionTyped] is `true`, the parameters of the function type. 2900 * If [isFunctionTyped] is `true`, the parameters of the function type.
2666 */ 2901 */
2667 void set parameters(List<UnlinkedParamBuilder> _value) { 2902 void set parameters(List<UnlinkedParamBuilder> _value) {
2668 assert(!_finished); 2903 assert(!_finished);
2669 _parameters = _value; 2904 _parameters = _value;
2670 } 2905 }
2671 2906
2907 @override
2908 UnlinkedParamKind get kind => _kind ?? UnlinkedParamKind.required;
2909
2672 /** 2910 /**
2673 * Kind of the parameter. 2911 * Kind of the parameter.
2674 */ 2912 */
2675 void set kind(UnlinkedParamKind _value) { 2913 void set kind(UnlinkedParamKind _value) {
2676 assert(!_finished); 2914 assert(!_finished);
2677 _kind = _value; 2915 _kind = _value;
2678 } 2916 }
2679 2917
2918 @override
2919 bool get isFunctionTyped => _isFunctionTyped ?? false;
2920
2680 /** 2921 /**
2681 * Indicates whether this is a function-typed parameter. 2922 * Indicates whether this is a function-typed parameter.
2682 */ 2923 */
2683 void set isFunctionTyped(bool _value) { 2924 void set isFunctionTyped(bool _value) {
2684 assert(!_finished); 2925 assert(!_finished);
2685 _isFunctionTyped = _value; 2926 _isFunctionTyped = _value;
2686 } 2927 }
2687 2928
2929 @override
2930 bool get isInitializingFormal => _isInitializingFormal ?? false;
2931
2688 /** 2932 /**
2689 * Indicates whether this is an initializing formal parameter (i.e. it is 2933 * Indicates whether this is an initializing formal parameter (i.e. it is
2690 * declared using `this.` syntax). 2934 * declared using `this.` syntax).
2691 */ 2935 */
2692 void set isInitializingFormal(bool _value) { 2936 void set isInitializingFormal(bool _value) {
2693 assert(!_finished); 2937 assert(!_finished);
2694 _isInitializingFormal = _value; 2938 _isInitializingFormal = _value;
2695 } 2939 }
2696 2940
2941 @override
2942 bool get hasImplicitType => _hasImplicitType ?? false;
2943
2697 /** 2944 /**
2698 * Indicates whether this parameter lacks an explicit type declaration. 2945 * Indicates whether this parameter lacks an explicit type declaration.
2699 * Always false for a function-typed parameter. 2946 * Always false for a function-typed parameter.
2700 */ 2947 */
2701 void set hasImplicitType(bool _value) { 2948 void set hasImplicitType(bool _value) {
2702 assert(!_finished); 2949 assert(!_finished);
2703 _hasImplicitType = _value; 2950 _hasImplicitType = _value;
2704 } 2951 }
2705 2952
2706 fb.Offset finish(fb.Builder fbBuilder) { 2953 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 bool get hasImplicitType; 3059 bool get hasImplicitType;
2813 } 3060 }
2814 3061
2815 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> { 3062 class _UnlinkedParamReader extends fb.TableReader<_UnlinkedParamImpl> {
2816 const _UnlinkedParamReader(); 3063 const _UnlinkedParamReader();
2817 3064
2818 @override 3065 @override
2819 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl (bp); 3066 _UnlinkedParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedParamImpl (bp);
2820 } 3067 }
2821 3068
2822 class _UnlinkedParamImpl implements UnlinkedParam { 3069 class _UnlinkedParamImpl extends Object with _UnlinkedParamMixin implements Unli nkedParam {
2823 final fb.BufferPointer _bp; 3070 final fb.BufferPointer _bp;
2824 3071
2825 _UnlinkedParamImpl(this._bp); 3072 _UnlinkedParamImpl(this._bp);
2826 3073
2827 String _name; 3074 String _name;
2828 int _nameOffset; 3075 int _nameOffset;
2829 UnlinkedTypeRef _type; 3076 UnlinkedTypeRef _type;
2830 List<UnlinkedParam> _parameters; 3077 List<UnlinkedParam> _parameters;
2831 UnlinkedParamKind _kind; 3078 UnlinkedParamKind _kind;
2832 bool _isFunctionTyped; 3079 bool _isFunctionTyped;
2833 bool _isInitializingFormal; 3080 bool _isInitializingFormal;
2834 bool _hasImplicitType; 3081 bool _hasImplicitType;
2835 3082
2836 @override 3083 @override
2837 Map<String, Object> toMap() => {
2838 "name": name,
2839 "nameOffset": nameOffset,
2840 "type": type,
2841 "parameters": parameters,
2842 "kind": kind,
2843 "isFunctionTyped": isFunctionTyped,
2844 "isInitializingFormal": isInitializingFormal,
2845 "hasImplicitType": hasImplicitType,
2846 };
2847
2848 @override
2849 String get name { 3084 String get name {
2850 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 3085 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
2851 return _name; 3086 return _name;
2852 } 3087 }
2853 3088
2854 @override 3089 @override
2855 int get nameOffset { 3090 int get nameOffset {
2856 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 3091 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
2857 return _nameOffset; 3092 return _nameOffset;
2858 } 3093 }
(...skipping 28 matching lines...) Expand all
2887 return _isInitializingFormal; 3122 return _isInitializingFormal;
2888 } 3123 }
2889 3124
2890 @override 3125 @override
2891 bool get hasImplicitType { 3126 bool get hasImplicitType {
2892 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 7, false); 3127 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 7, false);
2893 return _hasImplicitType; 3128 return _hasImplicitType;
2894 } 3129 }
2895 } 3130 }
2896 3131
2897 class UnlinkedPartBuilder { 3132 abstract class _UnlinkedParamMixin implements UnlinkedParam {
3133 @override
3134 Map<String, Object> toMap() => {
3135 "name": name,
3136 "nameOffset": nameOffset,
3137 "type": type,
3138 "parameters": parameters,
3139 "kind": kind,
3140 "isFunctionTyped": isFunctionTyped,
3141 "isInitializingFormal": isInitializingFormal,
3142 "hasImplicitType": hasImplicitType,
3143 };
3144 }
3145
3146 class UnlinkedPartBuilder extends Object with _UnlinkedPartMixin implements Unli nkedPart {
2898 bool _finished = false; 3147 bool _finished = false;
2899 3148
2900 int _uriOffset; 3149 int _uriOffset;
2901 int _uriEnd; 3150 int _uriEnd;
2902 3151
2903 UnlinkedPartBuilder(); 3152 UnlinkedPartBuilder();
2904 3153
3154 @override
3155 int get uriOffset => _uriOffset ?? 0;
3156
2905 /** 3157 /**
2906 * Offset of the URI string (including quotes) relative to the beginning of 3158 * Offset of the URI string (including quotes) relative to the beginning of
2907 * the file. 3159 * the file.
2908 */ 3160 */
2909 void set uriOffset(int _value) { 3161 void set uriOffset(int _value) {
2910 assert(!_finished); 3162 assert(!_finished);
2911 _uriOffset = _value; 3163 _uriOffset = _value;
2912 } 3164 }
2913 3165
3166 @override
3167 int get uriEnd => _uriEnd ?? 0;
3168
2914 /** 3169 /**
2915 * End of the URI string (including quotes) relative to the beginning of the 3170 * End of the URI string (including quotes) relative to the beginning of the
2916 * file. 3171 * file.
2917 */ 3172 */
2918 void set uriEnd(int _value) { 3173 void set uriEnd(int _value) {
2919 assert(!_finished); 3174 assert(!_finished);
2920 _uriEnd = _value; 3175 _uriEnd = _value;
2921 } 3176 }
2922 3177
2923 fb.Offset finish(fb.Builder fbBuilder) { 3178 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 int get uriEnd; 3214 int get uriEnd;
2960 } 3215 }
2961 3216
2962 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> { 3217 class _UnlinkedPartReader extends fb.TableReader<_UnlinkedPartImpl> {
2963 const _UnlinkedPartReader(); 3218 const _UnlinkedPartReader();
2964 3219
2965 @override 3220 @override
2966 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b p); 3221 _UnlinkedPartImpl createObject(fb.BufferPointer bp) => new _UnlinkedPartImpl(b p);
2967 } 3222 }
2968 3223
2969 class _UnlinkedPartImpl implements UnlinkedPart { 3224 class _UnlinkedPartImpl extends Object with _UnlinkedPartMixin implements Unlink edPart {
2970 final fb.BufferPointer _bp; 3225 final fb.BufferPointer _bp;
2971 3226
2972 _UnlinkedPartImpl(this._bp); 3227 _UnlinkedPartImpl(this._bp);
2973 3228
2974 int _uriOffset; 3229 int _uriOffset;
2975 int _uriEnd; 3230 int _uriEnd;
2976 3231
2977 @override 3232 @override
2978 Map<String, Object> toMap() => {
2979 "uriOffset": uriOffset,
2980 "uriEnd": uriEnd,
2981 };
2982
2983 @override
2984 int get uriOffset { 3233 int get uriOffset {
2985 _uriOffset ??= const fb.Int32Reader().vTableGet(_bp, 0, 0); 3234 _uriOffset ??= const fb.Int32Reader().vTableGet(_bp, 0, 0);
2986 return _uriOffset; 3235 return _uriOffset;
2987 } 3236 }
2988 3237
2989 @override 3238 @override
2990 int get uriEnd { 3239 int get uriEnd {
2991 _uriEnd ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 3240 _uriEnd ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
2992 return _uriEnd; 3241 return _uriEnd;
2993 } 3242 }
2994 } 3243 }
2995 3244
2996 class UnlinkedPublicNameBuilder { 3245 abstract class _UnlinkedPartMixin implements UnlinkedPart {
3246 @override
3247 Map<String, Object> toMap() => {
3248 "uriOffset": uriOffset,
3249 "uriEnd": uriEnd,
3250 };
3251 }
3252
3253 class UnlinkedPublicNameBuilder extends Object with _UnlinkedPublicNameMixin imp lements UnlinkedPublicName {
2997 bool _finished = false; 3254 bool _finished = false;
2998 3255
2999 String _name; 3256 String _name;
3000 PrelinkedReferenceKind _kind; 3257 PrelinkedReferenceKind _kind;
3001 int _numTypeParameters; 3258 int _numTypeParameters;
3002 3259
3003 UnlinkedPublicNameBuilder(); 3260 UnlinkedPublicNameBuilder();
3004 3261
3262 @override
3263 String get name => _name ?? '';
3264
3005 /** 3265 /**
3006 * The name itself. 3266 * The name itself.
3007 */ 3267 */
3008 void set name(String _value) { 3268 void set name(String _value) {
3009 assert(!_finished); 3269 assert(!_finished);
3010 _name = _value; 3270 _name = _value;
3011 } 3271 }
3012 3272
3273 @override
3274 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ;
3275
3013 /** 3276 /**
3014 * The kind of object referred to by the name. 3277 * The kind of object referred to by the name.
3015 */ 3278 */
3016 void set kind(PrelinkedReferenceKind _value) { 3279 void set kind(PrelinkedReferenceKind _value) {
3017 assert(!_finished); 3280 assert(!_finished);
3018 _kind = _value; 3281 _kind = _value;
3019 } 3282 }
3020 3283
3284 @override
3285 int get numTypeParameters => _numTypeParameters ?? 0;
3286
3021 /** 3287 /**
3022 * If the entity being referred to is generic, the number of type parameters 3288 * If the entity being referred to is generic, the number of type parameters
3023 * it accepts. Otherwise zero. 3289 * it accepts. Otherwise zero.
3024 */ 3290 */
3025 void set numTypeParameters(int _value) { 3291 void set numTypeParameters(int _value) {
3026 assert(!_finished); 3292 assert(!_finished);
3027 _numTypeParameters = _value; 3293 _numTypeParameters = _value;
3028 } 3294 }
3029 3295
3030 fb.Offset finish(fb.Builder fbBuilder) { 3296 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
3089 int get numTypeParameters; 3355 int get numTypeParameters;
3090 } 3356 }
3091 3357
3092 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl> { 3358 class _UnlinkedPublicNameReader extends fb.TableReader<_UnlinkedPublicNameImpl> {
3093 const _UnlinkedPublicNameReader(); 3359 const _UnlinkedPublicNameReader();
3094 3360
3095 @override 3361 @override
3096 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl icNameImpl(bp); 3362 _UnlinkedPublicNameImpl createObject(fb.BufferPointer bp) => new _UnlinkedPubl icNameImpl(bp);
3097 } 3363 }
3098 3364
3099 class _UnlinkedPublicNameImpl implements UnlinkedPublicName { 3365 class _UnlinkedPublicNameImpl extends Object with _UnlinkedPublicNameMixin imple ments UnlinkedPublicName {
3100 final fb.BufferPointer _bp; 3366 final fb.BufferPointer _bp;
3101 3367
3102 _UnlinkedPublicNameImpl(this._bp); 3368 _UnlinkedPublicNameImpl(this._bp);
3103 3369
3104 String _name; 3370 String _name;
3105 PrelinkedReferenceKind _kind; 3371 PrelinkedReferenceKind _kind;
3106 int _numTypeParameters; 3372 int _numTypeParameters;
3107 3373
3108 @override 3374 @override
3109 Map<String, Object> toMap() => {
3110 "name": name,
3111 "kind": kind,
3112 "numTypeParameters": numTypeParameters,
3113 };
3114
3115 @override
3116 String get name { 3375 String get name {
3117 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 3376 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3118 return _name; 3377 return _name;
3119 } 3378 }
3120 3379
3121 @override 3380 @override
3122 PrelinkedReferenceKind get kind { 3381 PrelinkedReferenceKind get kind {
3123 _kind ??= PrelinkedReferenceKind.values[const fb.Int32Reader().vTableGet(_bp , 1, 0)]; 3382 _kind ??= PrelinkedReferenceKind.values[const fb.Int32Reader().vTableGet(_bp , 1, 0)];
3124 return _kind; 3383 return _kind;
3125 } 3384 }
3126 3385
3127 @override 3386 @override
3128 int get numTypeParameters { 3387 int get numTypeParameters {
3129 _numTypeParameters ??= const fb.Int32Reader().vTableGet(_bp, 2, 0); 3388 _numTypeParameters ??= const fb.Int32Reader().vTableGet(_bp, 2, 0);
3130 return _numTypeParameters; 3389 return _numTypeParameters;
3131 } 3390 }
3132 } 3391 }
3133 3392
3134 class UnlinkedPublicNamespaceBuilder { 3393 abstract class _UnlinkedPublicNameMixin implements UnlinkedPublicName {
3394 @override
3395 Map<String, Object> toMap() => {
3396 "name": name,
3397 "kind": kind,
3398 "numTypeParameters": numTypeParameters,
3399 };
3400 }
3401
3402 class UnlinkedPublicNamespaceBuilder extends Object with _UnlinkedPublicNamespac eMixin implements UnlinkedPublicNamespace {
3135 bool _finished = false; 3403 bool _finished = false;
3136 3404
3137 List<UnlinkedPublicNameBuilder> _names; 3405 List<UnlinkedPublicNameBuilder> _names;
3138 List<UnlinkedExportPublicBuilder> _exports; 3406 List<UnlinkedExportPublicBuilder> _exports;
3139 List<String> _parts; 3407 List<String> _parts;
3140 3408
3141 UnlinkedPublicNamespaceBuilder(); 3409 UnlinkedPublicNamespaceBuilder();
3142 3410
3411 @override
3412 List<UnlinkedPublicName> get names => _names ?? const <UnlinkedPublicName>[];
3413
3143 /** 3414 /**
3144 * Public names defined in the compilation unit. 3415 * Public names defined in the compilation unit.
3145 * 3416 *
3146 * TODO(paulberry): consider sorting these names to reduce unnecessary 3417 * TODO(paulberry): consider sorting these names to reduce unnecessary
3147 * relinking. 3418 * relinking.
3148 */ 3419 */
3149 void set names(List<UnlinkedPublicNameBuilder> _value) { 3420 void set names(List<UnlinkedPublicNameBuilder> _value) {
3150 assert(!_finished); 3421 assert(!_finished);
3151 _names = _value; 3422 _names = _value;
3152 } 3423 }
3153 3424
3425 @override
3426 List<UnlinkedExportPublic> get exports => _exports ?? const <UnlinkedExportPub lic>[];
3427
3154 /** 3428 /**
3155 * Export declarations in the compilation unit. 3429 * Export declarations in the compilation unit.
3156 */ 3430 */
3157 void set exports(List<UnlinkedExportPublicBuilder> _value) { 3431 void set exports(List<UnlinkedExportPublicBuilder> _value) {
3158 assert(!_finished); 3432 assert(!_finished);
3159 _exports = _value; 3433 _exports = _value;
3160 } 3434 }
3161 3435
3436 @override
3437 List<String> get parts => _parts ?? const <String>[];
3438
3162 /** 3439 /**
3163 * URIs referenced by part declarations in the compilation unit. 3440 * URIs referenced by part declarations in the compilation unit.
3164 */ 3441 */
3165 void set parts(List<String> _value) { 3442 void set parts(List<String> _value) {
3166 assert(!_finished); 3443 assert(!_finished);
3167 _parts = _value; 3444 _parts = _value;
3168 } 3445 }
3169 3446
3170 List<int> toBuffer() { 3447 List<int> toBuffer() {
3171 fb.Builder fbBuilder = new fb.Builder(); 3448 fb.Builder fbBuilder = new fb.Builder();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3239 List<String> get parts; 3516 List<String> get parts;
3240 } 3517 }
3241 3518
3242 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames paceImpl> { 3519 class _UnlinkedPublicNamespaceReader extends fb.TableReader<_UnlinkedPublicNames paceImpl> {
3243 const _UnlinkedPublicNamespaceReader(); 3520 const _UnlinkedPublicNamespaceReader();
3244 3521
3245 @override 3522 @override
3246 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke dPublicNamespaceImpl(bp); 3523 _UnlinkedPublicNamespaceImpl createObject(fb.BufferPointer bp) => new _Unlinke dPublicNamespaceImpl(bp);
3247 } 3524 }
3248 3525
3249 class _UnlinkedPublicNamespaceImpl implements UnlinkedPublicNamespace { 3526 class _UnlinkedPublicNamespaceImpl extends Object with _UnlinkedPublicNamespaceM ixin implements UnlinkedPublicNamespace {
3250 final fb.BufferPointer _bp; 3527 final fb.BufferPointer _bp;
3251 3528
3252 _UnlinkedPublicNamespaceImpl(this._bp); 3529 _UnlinkedPublicNamespaceImpl(this._bp);
3253 3530
3254 List<UnlinkedPublicName> _names; 3531 List<UnlinkedPublicName> _names;
3255 List<UnlinkedExportPublic> _exports; 3532 List<UnlinkedExportPublic> _exports;
3256 List<String> _parts; 3533 List<String> _parts;
3257 3534
3258 @override 3535 @override
3259 Map<String, Object> toMap() => {
3260 "names": names,
3261 "exports": exports,
3262 "parts": parts,
3263 };
3264
3265 @override
3266 List<UnlinkedPublicName> get names { 3536 List<UnlinkedPublicName> get names {
3267 _names ??= const fb.ListReader<UnlinkedPublicName>(const _UnlinkedPublicName Reader()).vTableGet(_bp, 0, const <UnlinkedPublicName>[]); 3537 _names ??= const fb.ListReader<UnlinkedPublicName>(const _UnlinkedPublicName Reader()).vTableGet(_bp, 0, const <UnlinkedPublicName>[]);
3268 return _names; 3538 return _names;
3269 } 3539 }
3270 3540
3271 @override 3541 @override
3272 List<UnlinkedExportPublic> get exports { 3542 List<UnlinkedExportPublic> get exports {
3273 _exports ??= const fb.ListReader<UnlinkedExportPublic>(const _UnlinkedExport PublicReader()).vTableGet(_bp, 1, const <UnlinkedExportPublic>[]); 3543 _exports ??= const fb.ListReader<UnlinkedExportPublic>(const _UnlinkedExport PublicReader()).vTableGet(_bp, 1, const <UnlinkedExportPublic>[]);
3274 return _exports; 3544 return _exports;
3275 } 3545 }
3276 3546
3277 @override 3547 @override
3278 List<String> get parts { 3548 List<String> get parts {
3279 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 2, const <String>[]); 3549 _parts ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet(_b p, 2, const <String>[]);
3280 return _parts; 3550 return _parts;
3281 } 3551 }
3282 } 3552 }
3283 3553
3284 class UnlinkedReferenceBuilder { 3554 abstract class _UnlinkedPublicNamespaceMixin implements UnlinkedPublicNamespace {
3555 @override
3556 Map<String, Object> toMap() => {
3557 "names": names,
3558 "exports": exports,
3559 "parts": parts,
3560 };
3561 }
3562
3563 class UnlinkedReferenceBuilder extends Object with _UnlinkedReferenceMixin imple ments UnlinkedReference {
3285 bool _finished = false; 3564 bool _finished = false;
3286 3565
3287 String _name; 3566 String _name;
3288 int _prefixReference; 3567 int _prefixReference;
3289 3568
3290 UnlinkedReferenceBuilder(); 3569 UnlinkedReferenceBuilder();
3291 3570
3571 @override
3572 String get name => _name ?? '';
3573
3292 /** 3574 /**
3293 * Name of the entity being referred to. The empty string refers to the 3575 * Name of the entity being referred to. The empty string refers to the
3294 * pseudo-type `dynamic`. 3576 * pseudo-type `dynamic`.
3295 */ 3577 */
3296 void set name(String _value) { 3578 void set name(String _value) {
3297 assert(!_finished); 3579 assert(!_finished);
3298 _name = _value; 3580 _name = _value;
3299 } 3581 }
3300 3582
3583 @override
3584 int get prefixReference => _prefixReference ?? 0;
3585
3301 /** 3586 /**
3302 * Prefix used to refer to the entity, or zero if no prefix is used. This is 3587 * Prefix used to refer to the entity, or zero if no prefix is used. This is
3303 * an index into [UnlinkedUnit.references]. 3588 * an index into [UnlinkedUnit.references].
3304 * 3589 *
3305 * Prefix references must always point backward; that is, for all i, if 3590 * Prefix references must always point backward; that is, for all i, if
3306 * UnlinkedUnit.references[i].prefixReference != 0, then 3591 * UnlinkedUnit.references[i].prefixReference != 0, then
3307 * UnlinkedUnit.references[i].prefixReference < i. 3592 * UnlinkedUnit.references[i].prefixReference < i.
3308 */ 3593 */
3309 void set prefixReference(int _value) { 3594 void set prefixReference(int _value) {
3310 assert(!_finished); 3595 assert(!_finished);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3359 int get prefixReference; 3644 int get prefixReference;
3360 } 3645 }
3361 3646
3362 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> { 3647 class _UnlinkedReferenceReader extends fb.TableReader<_UnlinkedReferenceImpl> {
3363 const _UnlinkedReferenceReader(); 3648 const _UnlinkedReferenceReader();
3364 3649
3365 @override 3650 @override
3366 _UnlinkedReferenceImpl createObject(fb.BufferPointer bp) => new _UnlinkedRefer enceImpl(bp); 3651 _UnlinkedReferenceImpl createObject(fb.BufferPointer bp) => new _UnlinkedRefer enceImpl(bp);
3367 } 3652 }
3368 3653
3369 class _UnlinkedReferenceImpl implements UnlinkedReference { 3654 class _UnlinkedReferenceImpl extends Object with _UnlinkedReferenceMixin impleme nts UnlinkedReference {
3370 final fb.BufferPointer _bp; 3655 final fb.BufferPointer _bp;
3371 3656
3372 _UnlinkedReferenceImpl(this._bp); 3657 _UnlinkedReferenceImpl(this._bp);
3373 3658
3374 String _name; 3659 String _name;
3375 int _prefixReference; 3660 int _prefixReference;
3376 3661
3377 @override 3662 @override
3378 Map<String, Object> toMap() => {
3379 "name": name,
3380 "prefixReference": prefixReference,
3381 };
3382
3383 @override
3384 String get name { 3663 String get name {
3385 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 3664 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3386 return _name; 3665 return _name;
3387 } 3666 }
3388 3667
3389 @override 3668 @override
3390 int get prefixReference { 3669 int get prefixReference {
3391 _prefixReference ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 3670 _prefixReference ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
3392 return _prefixReference; 3671 return _prefixReference;
3393 } 3672 }
3394 } 3673 }
3395 3674
3396 class UnlinkedTypedefBuilder { 3675 abstract class _UnlinkedReferenceMixin implements UnlinkedReference {
3676 @override
3677 Map<String, Object> toMap() => {
3678 "name": name,
3679 "prefixReference": prefixReference,
3680 };
3681 }
3682
3683 class UnlinkedTypedefBuilder extends Object with _UnlinkedTypedefMixin implement s UnlinkedTypedef {
3397 bool _finished = false; 3684 bool _finished = false;
3398 3685
3399 String _name; 3686 String _name;
3400 int _nameOffset; 3687 int _nameOffset;
3401 UnlinkedDocumentationCommentBuilder _documentationComment; 3688 UnlinkedDocumentationCommentBuilder _documentationComment;
3402 List<UnlinkedTypeParamBuilder> _typeParameters; 3689 List<UnlinkedTypeParamBuilder> _typeParameters;
3403 UnlinkedTypeRefBuilder _returnType; 3690 UnlinkedTypeRefBuilder _returnType;
3404 List<UnlinkedParamBuilder> _parameters; 3691 List<UnlinkedParamBuilder> _parameters;
3405 3692
3406 UnlinkedTypedefBuilder(); 3693 UnlinkedTypedefBuilder();
3407 3694
3695 @override
3696 String get name => _name ?? '';
3697
3408 /** 3698 /**
3409 * Name of the typedef. 3699 * Name of the typedef.
3410 */ 3700 */
3411 void set name(String _value) { 3701 void set name(String _value) {
3412 assert(!_finished); 3702 assert(!_finished);
3413 _name = _value; 3703 _name = _value;
3414 } 3704 }
3415 3705
3706 @override
3707 int get nameOffset => _nameOffset ?? 0;
3708
3416 /** 3709 /**
3417 * Offset of the typedef name relative to the beginning of the file. 3710 * Offset of the typedef name relative to the beginning of the file.
3418 */ 3711 */
3419 void set nameOffset(int _value) { 3712 void set nameOffset(int _value) {
3420 assert(!_finished); 3713 assert(!_finished);
3421 _nameOffset = _value; 3714 _nameOffset = _value;
3422 } 3715 }
3423 3716
3717 @override
3718 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
3719
3424 /** 3720 /**
3425 * Documentation comment for the typedef, or `null` if there is no 3721 * Documentation comment for the typedef, or `null` if there is no
3426 * documentation comment. 3722 * documentation comment.
3427 */ 3723 */
3428 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 3724 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
3429 assert(!_finished); 3725 assert(!_finished);
3430 _documentationComment = _value; 3726 _documentationComment = _value;
3431 } 3727 }
3432 3728
3729 @override
3730 List<UnlinkedTypeParam> get typeParameters => _typeParameters ?? const <Unlink edTypeParam>[];
3731
3433 /** 3732 /**
3434 * Type parameters of the typedef, if any. 3733 * Type parameters of the typedef, if any.
3435 */ 3734 */
3436 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { 3735 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) {
3437 assert(!_finished); 3736 assert(!_finished);
3438 _typeParameters = _value; 3737 _typeParameters = _value;
3439 } 3738 }
3440 3739
3740 @override
3741 UnlinkedTypeRef get returnType => _returnType;
3742
3441 /** 3743 /**
3442 * Return type of the typedef. Absent if the return type is `void`. 3744 * Return type of the typedef. Absent if the return type is `void`.
3443 */ 3745 */
3444 void set returnType(UnlinkedTypeRefBuilder _value) { 3746 void set returnType(UnlinkedTypeRefBuilder _value) {
3445 assert(!_finished); 3747 assert(!_finished);
3446 _returnType = _value; 3748 _returnType = _value;
3447 } 3749 }
3448 3750
3751 @override
3752 List<UnlinkedParam> get parameters => _parameters ?? const <UnlinkedParam>[];
3753
3449 /** 3754 /**
3450 * Parameters of the executable, if any. 3755 * Parameters of the executable, if any.
3451 */ 3756 */
3452 void set parameters(List<UnlinkedParamBuilder> _value) { 3757 void set parameters(List<UnlinkedParamBuilder> _value) {
3453 assert(!_finished); 3758 assert(!_finished);
3454 _parameters = _value; 3759 _parameters = _value;
3455 } 3760 }
3456 3761
3457 fb.Offset finish(fb.Builder fbBuilder) { 3762 fb.Offset finish(fb.Builder fbBuilder) {
3458 assert(!_finished); 3763 assert(!_finished);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
3548 List<UnlinkedParam> get parameters; 3853 List<UnlinkedParam> get parameters;
3549 } 3854 }
3550 3855
3551 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> { 3856 class _UnlinkedTypedefReader extends fb.TableReader<_UnlinkedTypedefImpl> {
3552 const _UnlinkedTypedefReader(); 3857 const _UnlinkedTypedefReader();
3553 3858
3554 @override 3859 @override
3555 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef Impl(bp); 3860 _UnlinkedTypedefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypedef Impl(bp);
3556 } 3861 }
3557 3862
3558 class _UnlinkedTypedefImpl implements UnlinkedTypedef { 3863 class _UnlinkedTypedefImpl extends Object with _UnlinkedTypedefMixin implements UnlinkedTypedef {
3559 final fb.BufferPointer _bp; 3864 final fb.BufferPointer _bp;
3560 3865
3561 _UnlinkedTypedefImpl(this._bp); 3866 _UnlinkedTypedefImpl(this._bp);
3562 3867
3563 String _name; 3868 String _name;
3564 int _nameOffset; 3869 int _nameOffset;
3565 UnlinkedDocumentationComment _documentationComment; 3870 UnlinkedDocumentationComment _documentationComment;
3566 List<UnlinkedTypeParam> _typeParameters; 3871 List<UnlinkedTypeParam> _typeParameters;
3567 UnlinkedTypeRef _returnType; 3872 UnlinkedTypeRef _returnType;
3568 List<UnlinkedParam> _parameters; 3873 List<UnlinkedParam> _parameters;
3569 3874
3570 @override 3875 @override
3571 Map<String, Object> toMap() => {
3572 "name": name,
3573 "nameOffset": nameOffset,
3574 "documentationComment": documentationComment,
3575 "typeParameters": typeParameters,
3576 "returnType": returnType,
3577 "parameters": parameters,
3578 };
3579
3580 @override
3581 String get name { 3876 String get name {
3582 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 3877 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3583 return _name; 3878 return _name;
3584 } 3879 }
3585 3880
3586 @override 3881 @override
3587 int get nameOffset { 3882 int get nameOffset {
3588 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 3883 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
3589 return _nameOffset; 3884 return _nameOffset;
3590 } 3885 }
(...skipping 16 matching lines...) Expand all
3607 return _returnType; 3902 return _returnType;
3608 } 3903 }
3609 3904
3610 @override 3905 @override
3611 List<UnlinkedParam> get parameters { 3906 List<UnlinkedParam> get parameters {
3612 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade r()).vTableGet(_bp, 5, const <UnlinkedParam>[]); 3907 _parameters ??= const fb.ListReader<UnlinkedParam>(const _UnlinkedParamReade r()).vTableGet(_bp, 5, const <UnlinkedParam>[]);
3613 return _parameters; 3908 return _parameters;
3614 } 3909 }
3615 } 3910 }
3616 3911
3617 class UnlinkedTypeParamBuilder { 3912 abstract class _UnlinkedTypedefMixin implements UnlinkedTypedef {
3913 @override
3914 Map<String, Object> toMap() => {
3915 "name": name,
3916 "nameOffset": nameOffset,
3917 "documentationComment": documentationComment,
3918 "typeParameters": typeParameters,
3919 "returnType": returnType,
3920 "parameters": parameters,
3921 };
3922 }
3923
3924 class UnlinkedTypeParamBuilder extends Object with _UnlinkedTypeParamMixin imple ments UnlinkedTypeParam {
3618 bool _finished = false; 3925 bool _finished = false;
3619 3926
3620 String _name; 3927 String _name;
3621 int _nameOffset; 3928 int _nameOffset;
3622 UnlinkedTypeRefBuilder _bound; 3929 UnlinkedTypeRefBuilder _bound;
3623 3930
3624 UnlinkedTypeParamBuilder(); 3931 UnlinkedTypeParamBuilder();
3625 3932
3933 @override
3934 String get name => _name ?? '';
3935
3626 /** 3936 /**
3627 * Name of the type parameter. 3937 * Name of the type parameter.
3628 */ 3938 */
3629 void set name(String _value) { 3939 void set name(String _value) {
3630 assert(!_finished); 3940 assert(!_finished);
3631 _name = _value; 3941 _name = _value;
3632 } 3942 }
3633 3943
3944 @override
3945 int get nameOffset => _nameOffset ?? 0;
3946
3634 /** 3947 /**
3635 * Offset of the type parameter name relative to the beginning of the file. 3948 * Offset of the type parameter name relative to the beginning of the file.
3636 */ 3949 */
3637 void set nameOffset(int _value) { 3950 void set nameOffset(int _value) {
3638 assert(!_finished); 3951 assert(!_finished);
3639 _nameOffset = _value; 3952 _nameOffset = _value;
3640 } 3953 }
3641 3954
3955 @override
3956 UnlinkedTypeRef get bound => _bound;
3957
3642 /** 3958 /**
3643 * Bound of the type parameter, if a bound is explicitly declared. Otherwise 3959 * Bound of the type parameter, if a bound is explicitly declared. Otherwise
3644 * null. 3960 * null.
3645 */ 3961 */
3646 void set bound(UnlinkedTypeRefBuilder _value) { 3962 void set bound(UnlinkedTypeRefBuilder _value) {
3647 assert(!_finished); 3963 assert(!_finished);
3648 _bound = _value; 3964 _bound = _value;
3649 } 3965 }
3650 3966
3651 fb.Offset finish(fb.Builder fbBuilder) { 3967 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3703 UnlinkedTypeRef get bound; 4019 UnlinkedTypeRef get bound;
3704 } 4020 }
3705 4021
3706 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> { 4022 class _UnlinkedTypeParamReader extends fb.TableReader<_UnlinkedTypeParamImpl> {
3707 const _UnlinkedTypeParamReader(); 4023 const _UnlinkedTypeParamReader();
3708 4024
3709 @override 4025 @override
3710 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP aramImpl(bp); 4026 _UnlinkedTypeParamImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeP aramImpl(bp);
3711 } 4027 }
3712 4028
3713 class _UnlinkedTypeParamImpl implements UnlinkedTypeParam { 4029 class _UnlinkedTypeParamImpl extends Object with _UnlinkedTypeParamMixin impleme nts UnlinkedTypeParam {
3714 final fb.BufferPointer _bp; 4030 final fb.BufferPointer _bp;
3715 4031
3716 _UnlinkedTypeParamImpl(this._bp); 4032 _UnlinkedTypeParamImpl(this._bp);
3717 4033
3718 String _name; 4034 String _name;
3719 int _nameOffset; 4035 int _nameOffset;
3720 UnlinkedTypeRef _bound; 4036 UnlinkedTypeRef _bound;
3721 4037
3722 @override 4038 @override
3723 Map<String, Object> toMap() => {
3724 "name": name,
3725 "nameOffset": nameOffset,
3726 "bound": bound,
3727 };
3728
3729 @override
3730 String get name { 4039 String get name {
3731 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 4040 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
3732 return _name; 4041 return _name;
3733 } 4042 }
3734 4043
3735 @override 4044 @override
3736 int get nameOffset { 4045 int get nameOffset {
3737 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 4046 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
3738 return _nameOffset; 4047 return _nameOffset;
3739 } 4048 }
3740 4049
3741 @override 4050 @override
3742 UnlinkedTypeRef get bound { 4051 UnlinkedTypeRef get bound {
3743 _bound ??= const _UnlinkedTypeRefReader().vTableGet(_bp, 2, null); 4052 _bound ??= const _UnlinkedTypeRefReader().vTableGet(_bp, 2, null);
3744 return _bound; 4053 return _bound;
3745 } 4054 }
3746 } 4055 }
3747 4056
3748 class UnlinkedTypeRefBuilder { 4057 abstract class _UnlinkedTypeParamMixin implements UnlinkedTypeParam {
4058 @override
4059 Map<String, Object> toMap() => {
4060 "name": name,
4061 "nameOffset": nameOffset,
4062 "bound": bound,
4063 };
4064 }
4065
4066 class UnlinkedTypeRefBuilder extends Object with _UnlinkedTypeRefMixin implement s UnlinkedTypeRef {
3749 bool _finished = false; 4067 bool _finished = false;
3750 4068
3751 int _reference; 4069 int _reference;
3752 int _paramReference; 4070 int _paramReference;
3753 List<UnlinkedTypeRefBuilder> _typeArguments; 4071 List<UnlinkedTypeRefBuilder> _typeArguments;
3754 4072
3755 UnlinkedTypeRefBuilder(); 4073 UnlinkedTypeRefBuilder();
3756 4074
4075 @override
4076 int get reference => _reference ?? 0;
4077
3757 /** 4078 /**
3758 * Index into [UnlinkedUnit.references] for the type being referred to, or 4079 * Index into [UnlinkedUnit.references] for the type being referred to, or
3759 * zero if this is a reference to a type parameter. 4080 * zero if this is a reference to a type parameter.
3760 * 4081 *
3761 * Note that since zero is also a valid index into 4082 * Note that since zero is also a valid index into
3762 * [UnlinkedUnit.references], we cannot distinguish between references to 4083 * [UnlinkedUnit.references], we cannot distinguish between references to
3763 * type parameters and references to types by checking [reference] against 4084 * type parameters and references to types by checking [reference] against
3764 * zero. To distinguish between references to type parameters and references 4085 * zero. To distinguish between references to type parameters and references
3765 * to types, check whether [paramReference] is zero. 4086 * to types, check whether [paramReference] is zero.
3766 */ 4087 */
3767 void set reference(int _value) { 4088 void set reference(int _value) {
3768 assert(!_finished); 4089 assert(!_finished);
3769 _reference = _value; 4090 _reference = _value;
3770 } 4091 }
3771 4092
4093 @override
4094 int get paramReference => _paramReference ?? 0;
4095
3772 /** 4096 /**
3773 * If this is a reference to a type parameter, one-based index into the list 4097 * If this is a reference to a type parameter, one-based index into the list
3774 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De 4098 * of [UnlinkedTypeParam]s currently in effect. Indexing is done using De
3775 * Bruijn index conventions; that is, innermost parameters come first, and 4099 * Bruijn index conventions; that is, innermost parameters come first, and
3776 * if a class or method has multiple parameters, they are indexed from right 4100 * if a class or method has multiple parameters, they are indexed from right
3777 * to left. So for instance, if the enclosing declaration is 4101 * to left. So for instance, if the enclosing declaration is
3778 * 4102 *
3779 * class C<T,U> { 4103 * class C<T,U> {
3780 * m<V,W> { 4104 * m<V,W> {
3781 * ... 4105 * ...
3782 * } 4106 * }
3783 * } 4107 * }
3784 * 4108 *
3785 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T, 4109 * Then [paramReference] values of 1, 2, 3, and 4 represent W, V, U, and T,
3786 * respectively. 4110 * respectively.
3787 * 4111 *
3788 * If the type being referred to is not a type parameter, [paramReference] is 4112 * If the type being referred to is not a type parameter, [paramReference] is
3789 * zero. 4113 * zero.
3790 */ 4114 */
3791 void set paramReference(int _value) { 4115 void set paramReference(int _value) {
3792 assert(!_finished); 4116 assert(!_finished);
3793 _paramReference = _value; 4117 _paramReference = _value;
3794 } 4118 }
3795 4119
4120 @override
4121 List<UnlinkedTypeRef> get typeArguments => _typeArguments ?? const <UnlinkedTy peRef>[];
4122
3796 /** 4123 /**
3797 * If this is an instantiation of a generic type, the type arguments used to 4124 * If this is an instantiation of a generic type, the type arguments used to
3798 * instantiate it. Trailing type arguments of type `dynamic` are omitted. 4125 * instantiate it. Trailing type arguments of type `dynamic` are omitted.
3799 */ 4126 */
3800 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) { 4127 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) {
3801 assert(!_finished); 4128 assert(!_finished);
3802 _typeArguments = _value; 4129 _typeArguments = _value;
3803 } 4130 }
3804 4131
3805 fb.Offset finish(fb.Builder fbBuilder) { 4132 fb.Offset finish(fb.Builder fbBuilder) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
3876 List<UnlinkedTypeRef> get typeArguments; 4203 List<UnlinkedTypeRef> get typeArguments;
3877 } 4204 }
3878 4205
3879 class _UnlinkedTypeRefReader extends fb.TableReader<_UnlinkedTypeRefImpl> { 4206 class _UnlinkedTypeRefReader extends fb.TableReader<_UnlinkedTypeRefImpl> {
3880 const _UnlinkedTypeRefReader(); 4207 const _UnlinkedTypeRefReader();
3881 4208
3882 @override 4209 @override
3883 _UnlinkedTypeRefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeRef Impl(bp); 4210 _UnlinkedTypeRefImpl createObject(fb.BufferPointer bp) => new _UnlinkedTypeRef Impl(bp);
3884 } 4211 }
3885 4212
3886 class _UnlinkedTypeRefImpl implements UnlinkedTypeRef { 4213 class _UnlinkedTypeRefImpl extends Object with _UnlinkedTypeRefMixin implements UnlinkedTypeRef {
3887 final fb.BufferPointer _bp; 4214 final fb.BufferPointer _bp;
3888 4215
3889 _UnlinkedTypeRefImpl(this._bp); 4216 _UnlinkedTypeRefImpl(this._bp);
3890 4217
3891 int _reference; 4218 int _reference;
3892 int _paramReference; 4219 int _paramReference;
3893 List<UnlinkedTypeRef> _typeArguments; 4220 List<UnlinkedTypeRef> _typeArguments;
3894 4221
3895 @override 4222 @override
3896 Map<String, Object> toMap() => {
3897 "reference": reference,
3898 "paramReference": paramReference,
3899 "typeArguments": typeArguments,
3900 };
3901
3902 @override
3903 int get reference { 4223 int get reference {
3904 _reference ??= const fb.Int32Reader().vTableGet(_bp, 0, 0); 4224 _reference ??= const fb.Int32Reader().vTableGet(_bp, 0, 0);
3905 return _reference; 4225 return _reference;
3906 } 4226 }
3907 4227
3908 @override 4228 @override
3909 int get paramReference { 4229 int get paramReference {
3910 _paramReference ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 4230 _paramReference ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
3911 return _paramReference; 4231 return _paramReference;
3912 } 4232 }
3913 4233
3914 @override 4234 @override
3915 List<UnlinkedTypeRef> get typeArguments { 4235 List<UnlinkedTypeRef> get typeArguments {
3916 _typeArguments ??= const fb.ListReader<UnlinkedTypeRef>(const _UnlinkedTypeR efReader()).vTableGet(_bp, 2, const <UnlinkedTypeRef>[]); 4236 _typeArguments ??= const fb.ListReader<UnlinkedTypeRef>(const _UnlinkedTypeR efReader()).vTableGet(_bp, 2, const <UnlinkedTypeRef>[]);
3917 return _typeArguments; 4237 return _typeArguments;
3918 } 4238 }
3919 } 4239 }
3920 4240
3921 class UnlinkedUnitBuilder { 4241 abstract class _UnlinkedTypeRefMixin implements UnlinkedTypeRef {
4242 @override
4243 Map<String, Object> toMap() => {
4244 "reference": reference,
4245 "paramReference": paramReference,
4246 "typeArguments": typeArguments,
4247 };
4248 }
4249
4250 class UnlinkedUnitBuilder extends Object with _UnlinkedUnitMixin implements Unli nkedUnit {
3922 bool _finished = false; 4251 bool _finished = false;
3923 4252
3924 String _libraryName; 4253 String _libraryName;
3925 int _libraryNameOffset; 4254 int _libraryNameOffset;
3926 int _libraryNameLength; 4255 int _libraryNameLength;
3927 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment; 4256 UnlinkedDocumentationCommentBuilder _libraryDocumentationComment;
3928 UnlinkedPublicNamespaceBuilder _publicNamespace; 4257 UnlinkedPublicNamespaceBuilder _publicNamespace;
3929 List<UnlinkedReferenceBuilder> _references; 4258 List<UnlinkedReferenceBuilder> _references;
3930 List<UnlinkedClassBuilder> _classes; 4259 List<UnlinkedClassBuilder> _classes;
3931 List<UnlinkedEnumBuilder> _enums; 4260 List<UnlinkedEnumBuilder> _enums;
3932 List<UnlinkedExecutableBuilder> _executables; 4261 List<UnlinkedExecutableBuilder> _executables;
3933 List<UnlinkedExportNonPublicBuilder> _exports; 4262 List<UnlinkedExportNonPublicBuilder> _exports;
3934 List<UnlinkedImportBuilder> _imports; 4263 List<UnlinkedImportBuilder> _imports;
3935 List<UnlinkedPartBuilder> _parts; 4264 List<UnlinkedPartBuilder> _parts;
3936 List<UnlinkedTypedefBuilder> _typedefs; 4265 List<UnlinkedTypedefBuilder> _typedefs;
3937 List<UnlinkedVariableBuilder> _variables; 4266 List<UnlinkedVariableBuilder> _variables;
3938 4267
3939 UnlinkedUnitBuilder(); 4268 UnlinkedUnitBuilder();
3940 4269
4270 @override
4271 String get libraryName => _libraryName ?? '';
4272
3941 /** 4273 /**
3942 * Name of the library (from a "library" declaration, if present). 4274 * Name of the library (from a "library" declaration, if present).
3943 */ 4275 */
3944 void set libraryName(String _value) { 4276 void set libraryName(String _value) {
3945 assert(!_finished); 4277 assert(!_finished);
3946 _libraryName = _value; 4278 _libraryName = _value;
3947 } 4279 }
3948 4280
4281 @override
4282 int get libraryNameOffset => _libraryNameOffset ?? 0;
4283
3949 /** 4284 /**
3950 * Offset of the library name relative to the beginning of the file (or 0 if 4285 * Offset of the library name relative to the beginning of the file (or 0 if
3951 * the library has no name). 4286 * the library has no name).
3952 */ 4287 */
3953 void set libraryNameOffset(int _value) { 4288 void set libraryNameOffset(int _value) {
3954 assert(!_finished); 4289 assert(!_finished);
3955 _libraryNameOffset = _value; 4290 _libraryNameOffset = _value;
3956 } 4291 }
3957 4292
4293 @override
4294 int get libraryNameLength => _libraryNameLength ?? 0;
4295
3958 /** 4296 /**
3959 * Length of the library name as it appears in the source code (or 0 if the 4297 * Length of the library name as it appears in the source code (or 0 if the
3960 * library has no name). 4298 * library has no name).
3961 */ 4299 */
3962 void set libraryNameLength(int _value) { 4300 void set libraryNameLength(int _value) {
3963 assert(!_finished); 4301 assert(!_finished);
3964 _libraryNameLength = _value; 4302 _libraryNameLength = _value;
3965 } 4303 }
3966 4304
4305 @override
4306 UnlinkedDocumentationComment get libraryDocumentationComment => _libraryDocume ntationComment;
4307
3967 /** 4308 /**
3968 * Documentation comment for the library, or `null` if there is no 4309 * Documentation comment for the library, or `null` if there is no
3969 * documentation comment. 4310 * documentation comment.
3970 */ 4311 */
3971 void set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder _valu e) { 4312 void set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder _valu e) {
3972 assert(!_finished); 4313 assert(!_finished);
3973 _libraryDocumentationComment = _value; 4314 _libraryDocumentationComment = _value;
3974 } 4315 }
3975 4316
4317 @override
4318 UnlinkedPublicNamespace get publicNamespace => _publicNamespace;
4319
3976 /** 4320 /**
3977 * Unlinked public namespace of this compilation unit. 4321 * Unlinked public namespace of this compilation unit.
3978 */ 4322 */
3979 void set publicNamespace(UnlinkedPublicNamespaceBuilder _value) { 4323 void set publicNamespace(UnlinkedPublicNamespaceBuilder _value) {
3980 assert(!_finished); 4324 assert(!_finished);
3981 _publicNamespace = _value; 4325 _publicNamespace = _value;
3982 } 4326 }
3983 4327
4328 @override
4329 List<UnlinkedReference> get references => _references ?? const <UnlinkedRefere nce>[];
4330
3984 /** 4331 /**
3985 * Top level and prefixed names referred to by this compilation unit. The 4332 * Top level and prefixed names referred to by this compilation unit. The
3986 * zeroth element of this array is always populated and always represents a 4333 * zeroth element of this array is always populated and always represents a
3987 * reference to the pseudo-type "dynamic". 4334 * reference to the pseudo-type "dynamic".
3988 */ 4335 */
3989 void set references(List<UnlinkedReferenceBuilder> _value) { 4336 void set references(List<UnlinkedReferenceBuilder> _value) {
3990 assert(!_finished); 4337 assert(!_finished);
3991 _references = _value; 4338 _references = _value;
3992 } 4339 }
3993 4340
4341 @override
4342 List<UnlinkedClass> get classes => _classes ?? const <UnlinkedClass>[];
4343
3994 /** 4344 /**
3995 * Classes declared in the compilation unit. 4345 * Classes declared in the compilation unit.
3996 */ 4346 */
3997 void set classes(List<UnlinkedClassBuilder> _value) { 4347 void set classes(List<UnlinkedClassBuilder> _value) {
3998 assert(!_finished); 4348 assert(!_finished);
3999 _classes = _value; 4349 _classes = _value;
4000 } 4350 }
4001 4351
4352 @override
4353 List<UnlinkedEnum> get enums => _enums ?? const <UnlinkedEnum>[];
4354
4002 /** 4355 /**
4003 * Enums declared in the compilation unit. 4356 * Enums declared in the compilation unit.
4004 */ 4357 */
4005 void set enums(List<UnlinkedEnumBuilder> _value) { 4358 void set enums(List<UnlinkedEnumBuilder> _value) {
4006 assert(!_finished); 4359 assert(!_finished);
4007 _enums = _value; 4360 _enums = _value;
4008 } 4361 }
4009 4362
4363 @override
4364 List<UnlinkedExecutable> get executables => _executables ?? const <UnlinkedExe cutable>[];
4365
4010 /** 4366 /**
4011 * Top level executable objects (functions, getters, and setters) declared in 4367 * Top level executable objects (functions, getters, and setters) declared in
4012 * the compilation unit. 4368 * the compilation unit.
4013 */ 4369 */
4014 void set executables(List<UnlinkedExecutableBuilder> _value) { 4370 void set executables(List<UnlinkedExecutableBuilder> _value) {
4015 assert(!_finished); 4371 assert(!_finished);
4016 _executables = _value; 4372 _executables = _value;
4017 } 4373 }
4018 4374
4375 @override
4376 List<UnlinkedExportNonPublic> get exports => _exports ?? const <UnlinkedExport NonPublic>[];
4377
4019 /** 4378 /**
4020 * Export declarations in the compilation unit. 4379 * Export declarations in the compilation unit.
4021 */ 4380 */
4022 void set exports(List<UnlinkedExportNonPublicBuilder> _value) { 4381 void set exports(List<UnlinkedExportNonPublicBuilder> _value) {
4023 assert(!_finished); 4382 assert(!_finished);
4024 _exports = _value; 4383 _exports = _value;
4025 } 4384 }
4026 4385
4386 @override
4387 List<UnlinkedImport> get imports => _imports ?? const <UnlinkedImport>[];
4388
4027 /** 4389 /**
4028 * Import declarations in the compilation unit. 4390 * Import declarations in the compilation unit.
4029 */ 4391 */
4030 void set imports(List<UnlinkedImportBuilder> _value) { 4392 void set imports(List<UnlinkedImportBuilder> _value) {
4031 assert(!_finished); 4393 assert(!_finished);
4032 _imports = _value; 4394 _imports = _value;
4033 } 4395 }
4034 4396
4397 @override
4398 List<UnlinkedPart> get parts => _parts ?? const <UnlinkedPart>[];
4399
4035 /** 4400 /**
4036 * Part declarations in the compilation unit. 4401 * Part declarations in the compilation unit.
4037 */ 4402 */
4038 void set parts(List<UnlinkedPartBuilder> _value) { 4403 void set parts(List<UnlinkedPartBuilder> _value) {
4039 assert(!_finished); 4404 assert(!_finished);
4040 _parts = _value; 4405 _parts = _value;
4041 } 4406 }
4042 4407
4408 @override
4409 List<UnlinkedTypedef> get typedefs => _typedefs ?? const <UnlinkedTypedef>[];
4410
4043 /** 4411 /**
4044 * Typedefs declared in the compilation unit. 4412 * Typedefs declared in the compilation unit.
4045 */ 4413 */
4046 void set typedefs(List<UnlinkedTypedefBuilder> _value) { 4414 void set typedefs(List<UnlinkedTypedefBuilder> _value) {
4047 assert(!_finished); 4415 assert(!_finished);
4048 _typedefs = _value; 4416 _typedefs = _value;
4049 } 4417 }
4050 4418
4419 @override
4420 List<UnlinkedVariable> get variables => _variables ?? const <UnlinkedVariable> [];
4421
4051 /** 4422 /**
4052 * Top level variables declared in the compilation unit. 4423 * Top level variables declared in the compilation unit.
4053 */ 4424 */
4054 void set variables(List<UnlinkedVariableBuilder> _value) { 4425 void set variables(List<UnlinkedVariableBuilder> _value) {
4055 assert(!_finished); 4426 assert(!_finished);
4056 _variables = _value; 4427 _variables = _value;
4057 } 4428 }
4058 4429
4059 List<int> toBuffer() { 4430 List<int> toBuffer() {
4060 fb.Builder fbBuilder = new fb.Builder(); 4431 fb.Builder fbBuilder = new fb.Builder();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
4264 List<UnlinkedVariable> get variables; 4635 List<UnlinkedVariable> get variables;
4265 } 4636 }
4266 4637
4267 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> { 4638 class _UnlinkedUnitReader extends fb.TableReader<_UnlinkedUnitImpl> {
4268 const _UnlinkedUnitReader(); 4639 const _UnlinkedUnitReader();
4269 4640
4270 @override 4641 @override
4271 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p); 4642 _UnlinkedUnitImpl createObject(fb.BufferPointer bp) => new _UnlinkedUnitImpl(b p);
4272 } 4643 }
4273 4644
4274 class _UnlinkedUnitImpl implements UnlinkedUnit { 4645 class _UnlinkedUnitImpl extends Object with _UnlinkedUnitMixin implements Unlink edUnit {
4275 final fb.BufferPointer _bp; 4646 final fb.BufferPointer _bp;
4276 4647
4277 _UnlinkedUnitImpl(this._bp); 4648 _UnlinkedUnitImpl(this._bp);
4278 4649
4279 String _libraryName; 4650 String _libraryName;
4280 int _libraryNameOffset; 4651 int _libraryNameOffset;
4281 int _libraryNameLength; 4652 int _libraryNameLength;
4282 UnlinkedDocumentationComment _libraryDocumentationComment; 4653 UnlinkedDocumentationComment _libraryDocumentationComment;
4283 UnlinkedPublicNamespace _publicNamespace; 4654 UnlinkedPublicNamespace _publicNamespace;
4284 List<UnlinkedReference> _references; 4655 List<UnlinkedReference> _references;
4285 List<UnlinkedClass> _classes; 4656 List<UnlinkedClass> _classes;
4286 List<UnlinkedEnum> _enums; 4657 List<UnlinkedEnum> _enums;
4287 List<UnlinkedExecutable> _executables; 4658 List<UnlinkedExecutable> _executables;
4288 List<UnlinkedExportNonPublic> _exports; 4659 List<UnlinkedExportNonPublic> _exports;
4289 List<UnlinkedImport> _imports; 4660 List<UnlinkedImport> _imports;
4290 List<UnlinkedPart> _parts; 4661 List<UnlinkedPart> _parts;
4291 List<UnlinkedTypedef> _typedefs; 4662 List<UnlinkedTypedef> _typedefs;
4292 List<UnlinkedVariable> _variables; 4663 List<UnlinkedVariable> _variables;
4293 4664
4294 @override 4665 @override
4295 Map<String, Object> toMap() => {
4296 "libraryName": libraryName,
4297 "libraryNameOffset": libraryNameOffset,
4298 "libraryNameLength": libraryNameLength,
4299 "libraryDocumentationComment": libraryDocumentationComment,
4300 "publicNamespace": publicNamespace,
4301 "references": references,
4302 "classes": classes,
4303 "enums": enums,
4304 "executables": executables,
4305 "exports": exports,
4306 "imports": imports,
4307 "parts": parts,
4308 "typedefs": typedefs,
4309 "variables": variables,
4310 };
4311
4312 @override
4313 String get libraryName { 4666 String get libraryName {
4314 _libraryName ??= const fb.StringReader().vTableGet(_bp, 0, ''); 4667 _libraryName ??= const fb.StringReader().vTableGet(_bp, 0, '');
4315 return _libraryName; 4668 return _libraryName;
4316 } 4669 }
4317 4670
4318 @override 4671 @override
4319 int get libraryNameOffset { 4672 int get libraryNameOffset {
4320 _libraryNameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 4673 _libraryNameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
4321 return _libraryNameOffset; 4674 return _libraryNameOffset;
4322 } 4675 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
4387 return _typedefs; 4740 return _typedefs;
4388 } 4741 }
4389 4742
4390 @override 4743 @override
4391 List<UnlinkedVariable> get variables { 4744 List<UnlinkedVariable> get variables {
4392 _variables ??= const fb.ListReader<UnlinkedVariable>(const _UnlinkedVariable Reader()).vTableGet(_bp, 13, const <UnlinkedVariable>[]); 4745 _variables ??= const fb.ListReader<UnlinkedVariable>(const _UnlinkedVariable Reader()).vTableGet(_bp, 13, const <UnlinkedVariable>[]);
4393 return _variables; 4746 return _variables;
4394 } 4747 }
4395 } 4748 }
4396 4749
4397 class UnlinkedVariableBuilder { 4750 abstract class _UnlinkedUnitMixin implements UnlinkedUnit {
4751 @override
4752 Map<String, Object> toMap() => {
4753 "libraryName": libraryName,
4754 "libraryNameOffset": libraryNameOffset,
4755 "libraryNameLength": libraryNameLength,
4756 "libraryDocumentationComment": libraryDocumentationComment,
4757 "publicNamespace": publicNamespace,
4758 "references": references,
4759 "classes": classes,
4760 "enums": enums,
4761 "executables": executables,
4762 "exports": exports,
4763 "imports": imports,
4764 "parts": parts,
4765 "typedefs": typedefs,
4766 "variables": variables,
4767 };
4768 }
4769
4770 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts UnlinkedVariable {
4398 bool _finished = false; 4771 bool _finished = false;
4399 4772
4400 String _name; 4773 String _name;
4401 int _nameOffset; 4774 int _nameOffset;
4402 UnlinkedDocumentationCommentBuilder _documentationComment; 4775 UnlinkedDocumentationCommentBuilder _documentationComment;
4403 UnlinkedTypeRefBuilder _type; 4776 UnlinkedTypeRefBuilder _type;
4404 bool _isStatic; 4777 bool _isStatic;
4405 bool _isFinal; 4778 bool _isFinal;
4406 bool _isConst; 4779 bool _isConst;
4407 bool _hasImplicitType; 4780 bool _hasImplicitType;
4408 4781
4409 UnlinkedVariableBuilder(); 4782 UnlinkedVariableBuilder();
4410 4783
4784 @override
4785 String get name => _name ?? '';
4786
4411 /** 4787 /**
4412 * Name of the variable. 4788 * Name of the variable.
4413 */ 4789 */
4414 void set name(String _value) { 4790 void set name(String _value) {
4415 assert(!_finished); 4791 assert(!_finished);
4416 _name = _value; 4792 _name = _value;
4417 } 4793 }
4418 4794
4795 @override
4796 int get nameOffset => _nameOffset ?? 0;
4797
4419 /** 4798 /**
4420 * Offset of the variable name relative to the beginning of the file. 4799 * Offset of the variable name relative to the beginning of the file.
4421 */ 4800 */
4422 void set nameOffset(int _value) { 4801 void set nameOffset(int _value) {
4423 assert(!_finished); 4802 assert(!_finished);
4424 _nameOffset = _value; 4803 _nameOffset = _value;
4425 } 4804 }
4426 4805
4806 @override
4807 UnlinkedDocumentationComment get documentationComment => _documentationComment ;
4808
4427 /** 4809 /**
4428 * Documentation comment for the variable, or `null` if there is no 4810 * Documentation comment for the variable, or `null` if there is no
4429 * documentation comment. 4811 * documentation comment.
4430 */ 4812 */
4431 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) { 4813 void set documentationComment(UnlinkedDocumentationCommentBuilder _value) {
4432 assert(!_finished); 4814 assert(!_finished);
4433 _documentationComment = _value; 4815 _documentationComment = _value;
4434 } 4816 }
4435 4817
4818 @override
4819 UnlinkedTypeRef get type => _type;
4820
4436 /** 4821 /**
4437 * Declared type of the variable. Note that when strong mode is enabled, the 4822 * Declared type of the variable. Note that when strong mode is enabled, the
4438 * actual type of the variable may be different due to type inference. 4823 * actual type of the variable may be different due to type inference.
4439 */ 4824 */
4440 void set type(UnlinkedTypeRefBuilder _value) { 4825 void set type(UnlinkedTypeRefBuilder _value) {
4441 assert(!_finished); 4826 assert(!_finished);
4442 _type = _value; 4827 _type = _value;
4443 } 4828 }
4444 4829
4830 @override
4831 bool get isStatic => _isStatic ?? false;
4832
4445 /** 4833 /**
4446 * Indicates whether the variable is declared using the `static` keyword. 4834 * Indicates whether the variable is declared using the `static` keyword.
4447 * 4835 *
4448 * Note that for top level variables, this flag is false, since they are not 4836 * Note that for top level variables, this flag is false, since they are not
4449 * declared using the `static` keyword (even though they are considered 4837 * declared using the `static` keyword (even though they are considered
4450 * static for semantic purposes). 4838 * static for semantic purposes).
4451 */ 4839 */
4452 void set isStatic(bool _value) { 4840 void set isStatic(bool _value) {
4453 assert(!_finished); 4841 assert(!_finished);
4454 _isStatic = _value; 4842 _isStatic = _value;
4455 } 4843 }
4456 4844
4845 @override
4846 bool get isFinal => _isFinal ?? false;
4847
4457 /** 4848 /**
4458 * Indicates whether the variable is declared using the `final` keyword. 4849 * Indicates whether the variable is declared using the `final` keyword.
4459 */ 4850 */
4460 void set isFinal(bool _value) { 4851 void set isFinal(bool _value) {
4461 assert(!_finished); 4852 assert(!_finished);
4462 _isFinal = _value; 4853 _isFinal = _value;
4463 } 4854 }
4464 4855
4856 @override
4857 bool get isConst => _isConst ?? false;
4858
4465 /** 4859 /**
4466 * Indicates whether the variable is declared using the `const` keyword. 4860 * Indicates whether the variable is declared using the `const` keyword.
4467 */ 4861 */
4468 void set isConst(bool _value) { 4862 void set isConst(bool _value) {
4469 assert(!_finished); 4863 assert(!_finished);
4470 _isConst = _value; 4864 _isConst = _value;
4471 } 4865 }
4472 4866
4867 @override
4868 bool get hasImplicitType => _hasImplicitType ?? false;
4869
4473 /** 4870 /**
4474 * Indicates whether this variable lacks an explicit type declaration. 4871 * Indicates whether this variable lacks an explicit type declaration.
4475 */ 4872 */
4476 void set hasImplicitType(bool _value) { 4873 void set hasImplicitType(bool _value) {
4477 assert(!_finished); 4874 assert(!_finished);
4478 _hasImplicitType = _value; 4875 _hasImplicitType = _value;
4479 } 4876 }
4480 4877
4481 fb.Offset finish(fb.Builder fbBuilder) { 4878 fb.Offset finish(fb.Builder fbBuilder) {
4482 assert(!_finished); 4879 assert(!_finished);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4588 bool get hasImplicitType; 4985 bool get hasImplicitType;
4589 } 4986 }
4590 4987
4591 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> { 4988 class _UnlinkedVariableReader extends fb.TableReader<_UnlinkedVariableImpl> {
4592 const _UnlinkedVariableReader(); 4989 const _UnlinkedVariableReader();
4593 4990
4594 @override 4991 @override
4595 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab leImpl(bp); 4992 _UnlinkedVariableImpl createObject(fb.BufferPointer bp) => new _UnlinkedVariab leImpl(bp);
4596 } 4993 }
4597 4994
4598 class _UnlinkedVariableImpl implements UnlinkedVariable { 4995 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s UnlinkedVariable {
4599 final fb.BufferPointer _bp; 4996 final fb.BufferPointer _bp;
4600 4997
4601 _UnlinkedVariableImpl(this._bp); 4998 _UnlinkedVariableImpl(this._bp);
4602 4999
4603 String _name; 5000 String _name;
4604 int _nameOffset; 5001 int _nameOffset;
4605 UnlinkedDocumentationComment _documentationComment; 5002 UnlinkedDocumentationComment _documentationComment;
4606 UnlinkedTypeRef _type; 5003 UnlinkedTypeRef _type;
4607 bool _isStatic; 5004 bool _isStatic;
4608 bool _isFinal; 5005 bool _isFinal;
4609 bool _isConst; 5006 bool _isConst;
4610 bool _hasImplicitType; 5007 bool _hasImplicitType;
4611 5008
4612 @override 5009 @override
4613 Map<String, Object> toMap() => {
4614 "name": name,
4615 "nameOffset": nameOffset,
4616 "documentationComment": documentationComment,
4617 "type": type,
4618 "isStatic": isStatic,
4619 "isFinal": isFinal,
4620 "isConst": isConst,
4621 "hasImplicitType": hasImplicitType,
4622 };
4623
4624 @override
4625 String get name { 5010 String get name {
4626 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 5011 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
4627 return _name; 5012 return _name;
4628 } 5013 }
4629 5014
4630 @override 5015 @override
4631 int get nameOffset { 5016 int get nameOffset {
4632 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0); 5017 _nameOffset ??= const fb.Int32Reader().vTableGet(_bp, 1, 0);
4633 return _nameOffset; 5018 return _nameOffset;
4634 } 5019 }
(...skipping 28 matching lines...) Expand all
4663 return _isConst; 5048 return _isConst;
4664 } 5049 }
4665 5050
4666 @override 5051 @override
4667 bool get hasImplicitType { 5052 bool get hasImplicitType {
4668 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 7, false); 5053 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 7, false);
4669 return _hasImplicitType; 5054 return _hasImplicitType;
4670 } 5055 }
4671 } 5056 }
4672 5057
5058 abstract class _UnlinkedVariableMixin implements UnlinkedVariable {
5059 @override
5060 Map<String, Object> toMap() => {
5061 "name": name,
5062 "nameOffset": nameOffset,
5063 "documentationComment": documentationComment,
5064 "type": type,
5065 "isStatic": isStatic,
5066 "isFinal": isFinal,
5067 "isConst": isConst,
5068 "hasImplicitType": hasImplicitType,
5069 };
5070 }
5071
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/name_filter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698