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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/source.dart

Issue 17932005: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Disable resolver tests Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/src/generated/source.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/source.dart b/pkg/analyzer_experimental/lib/src/generated/source.dart
index d149b4bf0b38dddbb90ef5ceffda9ec30eb8eb95..f1452e00b0b3edad2140edf7724005a4fe83ab3e 100644
--- a/pkg/analyzer_experimental/lib/src/generated/source.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/source.dart
@@ -5,7 +5,9 @@ import 'java_core.dart';
import 'sdk.dart' show DartSdk;
import 'engine.dart' show AnalysisContext;
/**
- * Instances of the class `SourceFactory` resolve possibly relative URI's against an existing[Source source].
+ * Instances of the class `SourceFactory` resolve possibly relative URI's against an existing
+ * [Source].
+ *
* @coverage dart.engine.source
*/
class SourceFactory {
@@ -27,6 +29,7 @@ class SourceFactory {
/**
* Initialize a newly created source factory.
+ *
* @param contentCache the cache holding content used to override the default content of a source
* @param resolvers the resolvers used to resolve absolute URI's
*/
@@ -40,6 +43,7 @@ class SourceFactory {
/**
* Initialize a newly created source factory.
+ *
* @param resolvers the resolvers used to resolve absolute URI's
*/
SourceFactory.con2(List<UriResolver> resolvers) {
@@ -52,6 +56,7 @@ class SourceFactory {
/**
* Return a source object representing the given absolute URI, or `null` if the URI is not a
* valid URI or if it is not an absolute URI.
+ *
* @param absoluteUri the absolute URI to be resolved
* @return a source object representing the absolute URI
*/
@@ -68,6 +73,7 @@ class SourceFactory {
/**
* Return a source object that is equal to the source object used to obtain the given encoding.
+ *
* @param encoding the encoding of a source object
* @return a source object that is described by the given encoding
* @throws IllegalArgumentException if the argument is not a valid encoding
@@ -97,12 +103,14 @@ class SourceFactory {
/**
* Return a cache of content used to override the default content of a source.
+ *
* @return a cache of content used to override the default content of a source
*/
ContentCache get contentCache => _contentCache;
/**
* Return the analysis context that this source factory is associated with.
+ *
* @return the analysis context that this source factory is associated with
*/
AnalysisContext get context => _context;
@@ -110,8 +118,9 @@ class SourceFactory {
/**
* Return the [DartSdk] associated with this [SourceFactory], or `null` if there
* is no such SDK.
+ *
* @return the [DartSdk] associated with this [SourceFactory], or `null` if
- * there is no such SDK
+ * there is no such SDK
*/
DartSdk get dartSdk {
for (UriResolver resolver in _resolvers) {
@@ -125,8 +134,10 @@ class SourceFactory {
/**
* Return a source object representing the URI that results from resolving the given (possibly
- * relative) contained URI against the URI associated with an existing source object, or`null` if either the contained URI is invalid or if it cannot be resolved against the
+ * relative) contained URI against the URI associated with an existing source object, or
+ * `null` if either the contained URI is invalid or if it cannot be resolved against the
* source object's URI.
+ *
* @param containingSource the source containing the given URI
* @param containedUri the (possibly relative) URI to be resolved against the containing source
* @return the source representing the contained URI
@@ -141,6 +152,7 @@ class SourceFactory {
/**
* Return an absolute URI that represents the given source.
+ *
* @param source the source to get URI for
* @return the absolute URI representing the given source, may be `null`
*/
@@ -158,6 +170,7 @@ class SourceFactory {
* Set the contents of the given source to the given contents. This has the effect of overriding
* the default contents of the source. If the contents are `null` the override is removed so
* that the default contents will be returned.
+ *
* @param source the source whose contents are being overridden
* @param contents the new contents of the source
*/
@@ -168,8 +181,10 @@ class SourceFactory {
/**
* Set the analysis context that this source factory is associated with to the given context.
*
- * <b>Note:</b> This method should only be invoked by[AnalysisContextImpl#setSourceFactory] and is only public out of
+ * <b>Note:</b> This method should only be invoked by
+ * [AnalysisContextImpl#setSourceFactory] and is only public out of
* necessity.
+ *
* @param context the analysis context that this source factory is associated with
*/
void set context(AnalysisContext context2) {
@@ -180,7 +195,9 @@ class SourceFactory {
* Return the contents of the given source, or `null` if this factory does not override the
* contents of the source.
*
- * <b>Note:</b> This method is not intended to be used except by[FileBasedSource#getContents].
+ * <b>Note:</b> This method is not intended to be used except by
+ * [FileBasedSource#getContents].
+ *
* @param source the source whose content is to be returned
* @return the contents of the given source
*/
@@ -190,7 +207,9 @@ class SourceFactory {
* Return the modification stamp of the given source, or `null` if this factory does not
* override the contents of the source.
*
- * <b>Note:</b> This method is not intended to be used except by[FileBasedSource#getModificationStamp].
+ * <b>Note:</b> This method is not intended to be used except by
+ * [FileBasedSource#getModificationStamp].
+ *
* @param source the source whose modification stamp is to be returned
* @return the modification stamp of the given source
*/
@@ -198,8 +217,10 @@ class SourceFactory {
/**
* Return a source object representing the URI that results from resolving the given (possibly
- * relative) contained URI against the URI associated with an existing source object, or`null` if either the contained URI is invalid or if it cannot be resolved against the
+ * relative) contained URI against the URI associated with an existing source object, or
+ * `null` if either the contained URI is invalid or if it cannot be resolved against the
* source object's URI.
+ *
* @param containingSource the source containing the given URI
* @param containedUri the (possibly relative) URI to be resolved against the containing source
* @return the source representing the contained URI
@@ -222,33 +243,38 @@ class SourceFactory {
* The abstract class `UriResolver` defines the behavior of objects that are used to resolve
* URI's for a source factory. Subclasses of this class are expected to resolve a single scheme of
* absolute URI.
+ *
* @coverage dart.engine.source
*/
abstract class UriResolver {
/**
* If this resolver should be used for URI's of the given kind, resolve the given absolute URI.
- * The URI does not need to have the scheme handled by this resolver if the kind matches. Return a[Source source] representing the file to which it was resolved, or `null` if it
+ * The URI does not need to have the scheme handled by this resolver if the kind matches. Return a
+ * [Source] representing the file to which it was resolved, or `null` if it
* could not be resolved.
+ *
* @param contentCache the content cache used to access the contents of the returned source
* @param kind the kind of URI that was originally resolved in order to produce an encoding with
- * the given URI
+ * the given URI
* @param uri the URI to be resolved
- * @return a [Source source] representing the file to which given URI was resolved
+ * @return a [Source] representing the file to which given URI was resolved
*/
Source fromEncoding(ContentCache contentCache, UriKind kind, Uri uri);
/**
- * Resolve the given absolute URI. Return a [Source source] representing the file to which
+ * Resolve the given absolute URI. Return a [Source] representing the file to which
* it was resolved, or `null` if it could not be resolved.
+ *
* @param contentCache the content cache used to access the contents of the returned source
* @param uri the URI to be resolved
- * @return a [Source source] representing the file to which given URI was resolved
+ * @return a [Source] representing the file to which given URI was resolved
*/
Source resolveAbsolute(ContentCache contentCache, Uri uri);
/**
* Return an absolute URI that represents the given source.
+ *
* @param source the source to get URI for
* @return the absolute URI representing the given source, may be `null`
*/
@@ -257,6 +283,7 @@ abstract class UriResolver {
/**
* The interface `Source` defines the behavior of objects representing source code that can be
* compiled.
+ *
* @coverage dart.engine.source
*/
abstract class Source {
@@ -269,15 +296,17 @@ abstract class Source {
/**
* Return `true` if the given object is a source that represents the same source code as
* this source.
+ *
* @param object the object to be compared with this object
* @return `true` if the given object is a source that represents the same source code as
- * this source
+ * this source
* @see Object#equals(Object)
*/
bool operator ==(Object object);
/**
* Return `true` if this source exists.
+ *
* @return `true` if this source exists
*/
bool exists();
@@ -287,6 +316,7 @@ abstract class Source {
* defined on the receiver will be invoked unless an exception is thrown. The method that will be
* invoked depends on which of the possible representations of the contents is the most efficient.
* Whichever method is invoked, it will be invoked before this method returns.
+ *
* @param receiver the content receiver to which the content of this source will be passed
* @throws Exception if the contents of this source could not be accessed
*/
@@ -295,6 +325,7 @@ abstract class Source {
/**
* Return an encoded representation of this source that can be used to create a source that is
* equal to this source.
+ *
* @return an encoded representation of this source
* @see SourceFactory#fromEncoding(String)
*/
@@ -304,6 +335,7 @@ abstract class Source {
* Return the full (long) version of the name that can be displayed to the user to denote this
* source. For example, for a source representing a file this would typically be the absolute path
* of the file.
+ *
* @return a name that can be displayed to the user to denote this source
*/
String get fullName;
@@ -314,6 +346,7 @@ abstract class Source {
* the modification stamp was accessed then the same value will be returned, but if the contents
* of the source have been modified one or more times (even if the net change is zero) the stamps
* will be different.
+ *
* @return the modification stamp for this source
*/
int get modificationStamp;
@@ -321,6 +354,7 @@ abstract class Source {
/**
* Return a short version of the name that can be displayed to the user to denote this source. For
* example, for a source representing a file this would typically be the name of the file.
+ *
* @return a name that can be displayed to the user to denote this source
*/
String get shortName;
@@ -330,12 +364,14 @@ abstract class Source {
* created from an absolute URI, then the returned kind will reflect the scheme of the absolute
* URI. If it was created from a relative URI, then the returned kind will be the same as the kind
* of the source against which the relative URI was resolved.
+ *
* @return the kind of URI from which this source was originally derived
*/
UriKind get uriKind;
/**
* Return a hash code for this source.
+ *
* @return a hash code for this source
* @see Object#hashCode()
*/
@@ -343,21 +379,24 @@ abstract class Source {
/**
* Return `true` if this source is in one of the system libraries.
+ *
* @return `true` if this is in a system library
*/
bool get isInSystemLibrary;
/**
- * Resolve the relative URI against the URI associated with this source object. Return a[Source source] representing the URI to which it was resolved, or `null` if it
+ * Resolve the relative URI against the URI associated with this source object. Return a
+ * [Source] representing the URI to which it was resolved, or `null` if it
* could not be resolved.
*
* Note: This method is not intended for public use, it is only visible out of necessity. It is
- * only intended to be invoked by a [SourceFactory source factory]. Source factories will
+ * only intended to be invoked by a [SourceFactory]. Source factories will
* only invoke this method if the URI is relative, so implementations of this method are not
* required to, and generally do not, verify the argument. The result of invoking this method with
* an absolute URI is intentionally left unspecified.
+ *
* @param relativeUri the relative URI to be resolved against the containing source
- * @return a [Source source] representing the URI to which given URI was resolved
+ * @return a [Source] representing the URI to which given URI was resolved
*/
Source resolveRelative(Uri relativeUri);
}
@@ -369,6 +408,7 @@ abstract class Source_ContentReceiver {
/**
* Accept the contents of a source represented as a character buffer.
+ *
* @param contents the contents of the source
* @param modificationTime the time at which the contents were last set
*/
@@ -376,6 +416,7 @@ abstract class Source_ContentReceiver {
/**
* Accept the contents of a source represented as a string.
+ *
* @param contents the contents of the source
* @param modificationTime the time at which the contents were last set
*/
@@ -384,6 +425,7 @@ abstract class Source_ContentReceiver {
/**
* The enumeration `SourceKind` defines the different kinds of sources that are known to the
* analysis engine.
+ *
* @coverage dart.engine.source
*/
class SourceKind implements Comparable<SourceKind> {
@@ -426,6 +468,7 @@ class SourceKind implements Comparable<SourceKind> {
/**
* The enumeration `UriKind` defines the different kinds of URI's that are known to the
* analysis engine. These are used to keep track of the kind of URI associated with a given source.
+ *
* @coverage dart.engine.source
*/
class UriKind implements Comparable<UriKind> {
@@ -459,6 +502,7 @@ class UriKind implements Comparable<UriKind> {
/**
* Initialize a newly created URI kind to have the given encoding.
+ *
* @param encoding the single character encoding used to identify this kind of URI.
*/
UriKind(this.name, this.ordinal, int encoding) {
@@ -468,6 +512,7 @@ class UriKind implements Comparable<UriKind> {
/**
* Return the URI kind represented by the given encoding, or `null` if there is no kind with
* the given encoding.
+ *
* @param encoding the single character encoding used to identify the URI kind to be returned
* @return the URI kind represented by the given encoding
*/
@@ -487,6 +532,7 @@ class UriKind implements Comparable<UriKind> {
/**
* Return the single character encoding used to identify this kind of URI.
+ *
* @return the single character encoding used to identify this kind of URI
*/
int get encoding => _encoding;
@@ -496,6 +542,7 @@ class UriKind implements Comparable<UriKind> {
}
/**
* A source range defines an [Element]'s source coordinates relative to its [Source].
+ *
* @coverage dart.engine.utilities
*/
class SourceRange {
@@ -514,6 +561,7 @@ class SourceRange {
/**
* Initialize a newly created source range using the given offset and the given length.
+ *
* @param offset the given offset
* @param length the given length
*/
@@ -523,7 +571,7 @@ class SourceRange {
}
/**
- * @return `true` if <code>x</code> is in \[offset, offset + length) interval.
+ * @return `true` if <code>x</code> is in [offset, offset + length) interval.
*/
bool contains(int x) => _offset <= x && x < _offset + _length;
@@ -559,7 +607,7 @@ class SourceRange {
/**
* @return the 0-based index of the after-last character of the source code for this element,
- * relative to the source buffer in which this element is contained.
+ * relative to the source buffer in which this element is contained.
*/
int get end => _offset + _length;
@@ -571,8 +619,9 @@ class SourceRange {
/**
* Returns the number of characters of the source code for this element, relative to the source
* buffer in which this element is contained.
+ *
* @return the number of characters of the source code for this element, relative to the source
- * buffer in which this element is contained
+ * buffer in which this element is contained
*/
int get length => _length;
@@ -584,8 +633,9 @@ class SourceRange {
/**
* Returns the 0-based index of the first character of the source code for this element, relative
* to the source buffer in which this element is contained.
+ *
* @return the 0-based index of the first character of the source code for this element, relative
- * to the source buffer in which this element is contained
+ * to the source buffer in which this element is contained
*/
int get offset => _offset;
@@ -632,12 +682,14 @@ class SourceRange {
* sources for the purposes of accessing composite dependency information. For example, the Eclipse
* client uses source containers to represent Eclipse projects, which allows it to easily compute
* project-level dependencies.
+ *
* @coverage dart.engine.source
*/
abstract class SourceContainer {
/**
* Determine if the specified source is part of the receiver's collection of sources.
+ *
* @param source the source in question
* @return `true` if the receiver contains the source, else `false`
*/
@@ -645,6 +697,7 @@ abstract class SourceContainer {
}
/**
* Instances of the class `DartUriResolver` resolve `dart` URI's.
+ *
* @coverage dart.engine.source
*/
class DartUriResolver extends UriResolver {
@@ -661,6 +714,7 @@ class DartUriResolver extends UriResolver {
/**
* Return `true` if the given URI is a `dart:` URI.
+ *
* @param uri the URI being tested
* @return `true` if the given URI is a `dart:` URI
*/
@@ -669,6 +723,7 @@ class DartUriResolver extends UriResolver {
/**
* Initialize a newly created resolver to resolve Dart URI's against the given platform within the
* given Dart SDK.
+ *
* @param sdk the Dart SDK against which URI's are to be resolved
*/
DartUriResolver(DartSdk sdk) {
@@ -683,6 +738,7 @@ class DartUriResolver extends UriResolver {
/**
* Return the [DartSdk] against which URIs are to be resolved.
+ *
* @return the [DartSdk] against which URIs are to be resolved.
*/
DartSdk get dartSdk => _sdk;
@@ -696,6 +752,7 @@ class DartUriResolver extends UriResolver {
/**
* Instances of the class `LineInfo` encapsulate information about line and column information
* within a source file.
+ *
* @coverage dart.engine.utilities
*/
class LineInfo {
@@ -708,6 +765,7 @@ class LineInfo {
/**
* Initialize a newly created set of line information to represent the data encoded in the given
* array.
+ *
* @param lineStarts the offsets of the first character of each line in the source code
*/
LineInfo(List<int> lineStarts) {
@@ -721,6 +779,7 @@ class LineInfo {
/**
* Return the location information for the character at the given offset.
+ *
* @param offset the offset of the character for which location information is to be returned
* @return the location information for the character at the given offset
*/
@@ -753,6 +812,7 @@ class LineInfo_Location {
/**
* Initialize a newly created location to represent the location of the character at the given
* line and column position.
+ *
* @param lineNumber the one-based index of the line containing the character
* @param columnNumber the one-based index of the column containing the character
*/
@@ -763,18 +823,22 @@ class LineInfo_Location {
/**
* Return the one-based index of the column containing the character.
+ *
* @return the one-based index of the column containing the character
*/
int get columnNumber => _columnNumber;
/**
* Return the one-based index of the line containing the character.
+ *
* @return the one-based index of the line containing the character
*/
int get lineNumber => _lineNumber;
}
/**
- * Instances of class `ContentCache` hold content used to override the default content of a[Source].
+ * Instances of class `ContentCache` hold content used to override the default content of a
+ * [Source].
+ *
* @coverage dart.engine.source
*/
class ContentCache {
@@ -795,7 +859,9 @@ class ContentCache {
* Return the contents of the given source, or `null` if this cache does not override the
* contents of the source.
*
- * <b>Note:</b> This method is not intended to be used except by[SourceFactory#getContents].
+ * <b>Note:</b> This method is not intended to be used except by
+ * [SourceFactory#getContents].
+ *
* @param source the source whose content is to be returned
* @return the contents of the given source
*/
@@ -805,7 +871,9 @@ class ContentCache {
* Return the modification stamp of the given source, or `null` if this cache does not
* override the contents of the source.
*
- * <b>Note:</b> This method is not intended to be used except by[SourceFactory#getModificationStamp].
+ * <b>Note:</b> This method is not intended to be used except by
+ * [SourceFactory#getModificationStamp].
+ *
* @param source the source whose modification stamp is to be returned
* @return the modification stamp of the given source
*/
@@ -815,6 +883,7 @@ class ContentCache {
* Set the contents of the given source to the given contents. This has the effect of overriding
* the default contents of the source. If the contents are `null` the override is removed so
* that the default contents will be returned.
+ *
* @param source the source whose contents are being overridden
* @param contents the new contents of the source
*/
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer_experimental/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698