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

Side by Side Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 351283003: Move Tokenfactory, AstFactory and ElementFactory from tests to the testing/ Folder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.source; 8 library engine.source;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 @override 251 @override
252 bool isLocal(Source source) => source.uriKind != UriKind.DART_URI; 252 bool isLocal(Source source) => source.uriKind != UriKind.DART_URI;
253 } 253 }
254 254
255 class LocalSourcePredicate_TRUE implements LocalSourcePredicate { 255 class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
256 @override 256 @override
257 bool isLocal(Source source) => true; 257 bool isLocal(Source source) => true;
258 } 258 }
259 259
260 /** 260 /**
261 * An implementation of an non-existing [Source].
262 */
263 class NonExistingSource implements Source {
264 final String _name;
265
266 final UriKind uriKind;
267
268 NonExistingSource(this._name, this.uriKind);
269
270 @override
271 bool operator ==(Object obj) {
272 if (obj is NonExistingSource) {
273 NonExistingSource other = obj;
274 return other.uriKind == uriKind && (other._name == _name);
275 }
276 return false;
277 }
278
279 @override
280 bool exists() => false;
281
282 @override
283 TimestampedData<String> get contents {
284 throw new UnsupportedOperationException("${_name}does not exist.");
285 }
286
287 @override
288 String get encoding {
289 throw new UnsupportedOperationException("${_name}does not exist.");
290 }
291
292 @override
293 String get fullName => _name;
294
295 @override
296 int get modificationStamp => 0;
297
298 @override
299 String get shortName => _name;
300
301 @override
302 int get hashCode => _name.hashCode;
303
304 @override
305 bool get isInSystemLibrary => false;
306
307 @override
308 Source resolveRelative(Uri relativeUri) {
309 throw new UnsupportedOperationException("${_name}does not exist.");
310 }
311 }
312
313 /**
261 * The interface `Source` defines the behavior of objects representing source co de that can be 314 * The interface `Source` defines the behavior of objects representing source co de that can be
262 * analyzed by the analysis engine. 315 * analyzed by the analysis engine.
263 * 316 *
264 * Implementations of this interface need to be aware of some assumptions made b y the analysis 317 * Implementations of this interface need to be aware of some assumptions made b y the analysis
265 * engine concerning sources: 318 * engine concerning sources:
266 * * Sources are not required to be unique. That is, there can be multiple insta nces representing 319 * * Sources are not required to be unique. That is, there can be multiple insta nces representing
267 * the same source. 320 * the same source.
268 * * Sources are long lived. That is, the engine is allowed to hold on to a sour ce for an extended 321 * * Sources are long lived. That is, the engine is allowed to hold on to a sour ce for an extended
269 * period of time and that source must continue to report accurate and up-to-dat e information. 322 * period of time and that source must continue to report accurate and up-to-dat e information.
270 * Because of these assumptions, most implementations will not maintain any stat e but will delegate 323 * Because of these assumptions, most implementations will not maintain any stat e but will delegate
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 913
861 /** 914 /**
862 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot 915 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot
863 * be computed. 916 * be computed.
864 * 917 *
865 * @param source the source to get URI for 918 * @param source the source to get URI for
866 * @return the absolute URI representing the given source 919 * @return the absolute URI representing the given source
867 */ 920 */
868 Uri restoreAbsolute(Source source) => null; 921 Uri restoreAbsolute(Source source) => null;
869 } 922 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698