OLD | NEW |
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 library linter.src.sdk; | 5 library linter.src.sdk; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart' as resource; | 7 import 'package:analyzer/file_system/file_system.dart' as resource; |
8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; | 8 import 'package:analyzer/file_system/memory_file_system.dart' as resource; |
9 import 'package:analyzer/src/context/cache.dart' | 9 import 'package:analyzer/src/context/cache.dart' |
10 show AnalysisCache, CachePartition; | 10 show AnalysisCache, CachePartition; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const Object deprecated = const Deprecated("next release"); | 85 const Object deprecated = const Deprecated("next release"); |
86 | 86 |
87 class Iterator<E> { | 87 class Iterator<E> { |
88 bool moveNext(); | 88 bool moveNext(); |
89 E get current; | 89 E get current; |
90 } | 90 } |
91 | 91 |
92 abstract class Iterable<E> { | 92 abstract class Iterable<E> { |
93 Iterator<E> get iterator; | 93 Iterator<E> get iterator; |
94 bool get isEmpty; | 94 bool get isEmpty; |
| 95 bool get isNotEmpty; |
95 } | 96 } |
96 | 97 |
97 abstract class List<E> implements Iterable<E> { | 98 abstract class List<E> implements Iterable<E> { |
98 void add(E value); | 99 void add(E value); |
99 E operator [](int index); | 100 E operator [](int index); |
100 void operator []=(int index, E value); | 101 void operator []=(int index, E value); |
101 Iterator<E> get iterator => null; | 102 Iterator<E> get iterator => null; |
102 void clear(); | 103 void clear(); |
| 104 bool get isEmpty; |
| 105 bool get isNotEmpty; |
103 } | 106 } |
104 | 107 |
105 abstract class Map<K, V> extends Object { | 108 abstract class Map<K, V> extends Object { |
106 Iterable<K> get keys; | 109 Iterable<K> get keys; |
| 110 bool get isEmpty; |
| 111 bool get isNotEmpty; |
107 } | 112 } |
108 | 113 |
109 external bool identical(Object a, Object b); | 114 external bool identical(Object a, Object b); |
110 | 115 |
111 void print(Object object) {} | 116 void print(Object object) {} |
112 | 117 |
113 class _Override { | 118 class _Override { |
114 const _Override(); | 119 const _Override(); |
115 } | 120 } |
116 const Object override = const _Override(); | 121 const Object override = const _Override(); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 @override | 417 @override |
413 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { | 418 AnalysisCache createCacheFromSourceFactory(SourceFactory factory) { |
414 if (factory == null) { | 419 if (factory == null) { |
415 return super.createCacheFromSourceFactory(factory); | 420 return super.createCacheFromSourceFactory(factory); |
416 } | 421 } |
417 return new AnalysisCache(<CachePartition>[ | 422 return new AnalysisCache(<CachePartition>[ |
418 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) | 423 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) |
419 ]); | 424 ]); |
420 } | 425 } |
421 } | 426 } |
OLD | NEW |