OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.src.generated.source; | 5 library analyzer.src.generated.source; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import "dart:math" as math; | 8 import "dart:math" as math; |
9 | 9 |
10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 */ | 434 */ |
435 abstract class Source implements AnalysisTarget { | 435 abstract class Source implements AnalysisTarget { |
436 /** | 436 /** |
437 * An empty list of sources. | 437 * An empty list of sources. |
438 */ | 438 */ |
439 static const List<Source> EMPTY_LIST = const <Source>[]; | 439 static const List<Source> EMPTY_LIST = const <Source>[]; |
440 | 440 |
441 /** | 441 /** |
442 * Get the contents and timestamp of this source. | 442 * Get the contents and timestamp of this source. |
443 * | 443 * |
444 * Clients should consider using the the method [AnalysisContext.getContents] | 444 * Clients should consider using the method [AnalysisContext.getContents] |
445 * because contexts can have local overrides of the content of a source that t
he source is not | 445 * because contexts can have local overrides of the content of a source that t
he source is not |
446 * aware of. | 446 * aware of. |
447 * | 447 * |
448 * @return the contents and timestamp of the source | 448 * @return the contents and timestamp of the source |
449 * @throws Exception if the contents of this source could not be accessed | 449 * @throws Exception if the contents of this source could not be accessed |
450 */ | 450 */ |
451 TimestampedData<String> get contents; | 451 TimestampedData<String> get contents; |
452 | 452 |
453 /** | 453 /** |
454 * Return an encoded representation of this source that can be used to create
a source that is | 454 * Return an encoded representation of this source that can be used to create
a source that is |
(...skipping 30 matching lines...) Expand all Loading... |
485 bool get isInSystemLibrary; | 485 bool get isInSystemLibrary; |
486 | 486 |
487 /** | 487 /** |
488 * Return the modification stamp for this source, or a negative value if the | 488 * Return the modification stamp for this source, or a negative value if the |
489 * source does not exist. A modification stamp is a non-negative integer with | 489 * source does not exist. A modification stamp is a non-negative integer with |
490 * the property that if the contents of the source have not been modified | 490 * the property that if the contents of the source have not been modified |
491 * since the last time the modification stamp was accessed then the same value | 491 * since the last time the modification stamp was accessed then the same value |
492 * will be returned, but if the contents of the source have been modified one | 492 * will be returned, but if the contents of the source have been modified one |
493 * or more times (even if the net change is zero) the stamps will be different
. | 493 * or more times (even if the net change is zero) the stamps will be different
. |
494 * | 494 * |
495 * Clients should consider using the the method | 495 * Clients should consider using the method |
496 * [AnalysisContext.getModificationStamp] because contexts can have local | 496 * [AnalysisContext.getModificationStamp] because contexts can have local |
497 * overrides of the content of a source that the source is not aware of. | 497 * overrides of the content of a source that the source is not aware of. |
498 */ | 498 */ |
499 int get modificationStamp; | 499 int get modificationStamp; |
500 | 500 |
501 /** | 501 /** |
502 * Return a short version of the name that can be displayed to the user to den
ote this source. For | 502 * Return a short version of the name that can be displayed to the user to den
ote this source. For |
503 * example, for a source representing a file this would typically be the name
of the file. | 503 * example, for a source representing a file this would typically be the name
of the file. |
504 * | 504 * |
505 * @return a name that can be displayed to the user to denote this source | 505 * @return a name that can be displayed to the user to denote this source |
(...skipping 28 matching lines...) Expand all Loading... |
534 * @return `true` if the given object is a source that represents the same sou
rce code as | 534 * @return `true` if the given object is a source that represents the same sou
rce code as |
535 * this source | 535 * this source |
536 * See [Object.==]. | 536 * See [Object.==]. |
537 */ | 537 */ |
538 @override | 538 @override |
539 bool operator ==(Object object); | 539 bool operator ==(Object object); |
540 | 540 |
541 /** | 541 /** |
542 * Return `true` if this source exists. | 542 * Return `true` if this source exists. |
543 * | 543 * |
544 * Clients should consider using the the method [AnalysisContext.exists] becau
se | 544 * Clients should consider using the method [AnalysisContext.exists] because |
545 * contexts can have local overrides of the content of a source that the sourc
e is not aware of | 545 * contexts can have local overrides of the content of a source that the sourc
e is not aware of |
546 * and a source with local content is considered to exist even if there is no
file on disk. | 546 * and a source with local content is considered to exist even if there is no
file on disk. |
547 * | 547 * |
548 * @return `true` if this source exists | 548 * @return `true` if this source exists |
549 */ | 549 */ |
550 bool exists(); | 550 bool exists(); |
551 } | 551 } |
552 | 552 |
553 /** | 553 /** |
554 * The interface `ContentReceiver` defines the behavior of objects that can rece
ive the | 554 * The interface `ContentReceiver` defines the behavior of objects that can rece
ive the |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 Source resolveAbsolute(Uri uri, [Uri actualUri]); | 930 Source resolveAbsolute(Uri uri, [Uri actualUri]); |
931 | 931 |
932 /** | 932 /** |
933 * Return an absolute URI that represents the given [source], or `null` if a | 933 * Return an absolute URI that represents the given [source], or `null` if a |
934 * valid URI cannot be computed. | 934 * valid URI cannot be computed. |
935 * | 935 * |
936 * The computation should be based solely on [source.fullName]. | 936 * The computation should be based solely on [source.fullName]. |
937 */ | 937 */ |
938 Uri restoreAbsolute(Source source) => null; | 938 Uri restoreAbsolute(Source source) => null; |
939 } | 939 } |
OLD | NEW |