| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 |
| 3 library engine.sdk; | 4 library engine.sdk; |
| 5 |
| 4 import 'source.dart' show ContentCache, Source, UriKind; | 6 import 'source.dart' show ContentCache, Source, UriKind; |
| 5 import 'engine.dart' show AnalysisContext; | 7 import 'engine.dart' show AnalysisContext; |
| 8 |
| 6 /** | 9 /** |
| 7 * Represents a single library in the SDK | 10 * Represents a single library in the SDK |
| 8 */ | 11 */ |
| 9 abstract class SdkLibrary { | 12 abstract class SdkLibrary { |
| 10 | |
| 11 /** | 13 /** |
| 12 * Return the name of the category containing the library. | 14 * Return the name of the category containing the library. |
| 13 * | 15 * |
| 14 * @return the name of the category containing the library | 16 * @return the name of the category containing the library |
| 15 */ | 17 */ |
| 16 String get category; | 18 String get category; |
| 17 | 19 |
| 18 /** | 20 /** |
| 19 * Return the path to the file defining the library. The path is relative to t
he `lib` | 21 * Return the path to the file defining the library. The path is relative to t
he `lib` |
| 20 * directory within the SDK. | 22 * directory within the SDK. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 */ | 67 */ |
| 66 bool get isShared; | 68 bool get isShared; |
| 67 | 69 |
| 68 /** | 70 /** |
| 69 * Return `true` if this library can be run on the VM. | 71 * Return `true` if this library can be run on the VM. |
| 70 * | 72 * |
| 71 * @return `true` if this library can be run on the VM | 73 * @return `true` if this library can be run on the VM |
| 72 */ | 74 */ |
| 73 bool get isVmLibrary; | 75 bool get isVmLibrary; |
| 74 } | 76 } |
| 77 |
| 75 /** | 78 /** |
| 76 * Instances of the class `SdkLibrary` represent the information known about a s
ingle library | 79 * Instances of the class `SdkLibrary` represent the information known about a s
ingle library |
| 77 * within the SDK. | 80 * within the SDK. |
| 78 * | 81 * |
| 79 * @coverage dart.engine.sdk | 82 * @coverage dart.engine.sdk |
| 80 */ | 83 */ |
| 81 class SdkLibraryImpl implements SdkLibrary { | 84 class SdkLibraryImpl implements SdkLibrary { |
| 82 | |
| 83 /** | 85 /** |
| 84 * The short name of the library. This is the name used after `dart:` in a URI
. | 86 * The short name of the library. This is the name used after `dart:` in a URI
. |
| 85 */ | 87 */ |
| 86 String _shortName = null; | 88 String _shortName = null; |
| 87 | 89 |
| 88 /** | 90 /** |
| 89 * The path to the file defining the library. The path is relative to the `lib
` directory | 91 * The path to the file defining the library. The path is relative to the `lib
` directory |
| 90 * within the SDK. | 92 * within the SDK. |
| 91 */ | 93 */ |
| 92 String _path = null; | 94 String _path = null; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 static int VM_PLATFORM = 2; | 127 static int VM_PLATFORM = 2; |
| 126 | 128 |
| 127 /** | 129 /** |
| 128 * Initialize a newly created library to represent the library with the given
name. | 130 * Initialize a newly created library to represent the library with the given
name. |
| 129 * | 131 * |
| 130 * @param name the short name of the library | 132 * @param name the short name of the library |
| 131 */ | 133 */ |
| 132 SdkLibraryImpl(String name) { | 134 SdkLibraryImpl(String name) { |
| 133 this._shortName = name; | 135 this._shortName = name; |
| 134 } | 136 } |
| 137 |
| 135 String get category => _category; | 138 String get category => _category; |
| 139 |
| 136 String get path => _path; | 140 String get path => _path; |
| 141 |
| 137 String get shortName => _shortName; | 142 String get shortName => _shortName; |
| 143 |
| 138 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; | 144 bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0; |
| 145 |
| 139 bool get isDocumented => _documented; | 146 bool get isDocumented => _documented; |
| 147 |
| 140 bool get isImplementation => _implementation; | 148 bool get isImplementation => _implementation; |
| 149 |
| 141 bool get isInternal => "Internal" == _category; | 150 bool get isInternal => "Internal" == _category; |
| 142 | 151 |
| 143 /** | 152 /** |
| 144 * Return `true` if library can be used for both client and server | 153 * Return `true` if library can be used for both client and server |
| 145 */ | 154 */ |
| 146 bool get isShared => _category == "Shared"; | 155 bool get isShared => _category == "Shared"; |
| 147 | 156 |
| 148 /** | 157 /** |
| 149 * Return `true` if this library can be run on the VM. | 158 * Return `true` if this library can be run on the VM. |
| 150 * | 159 * |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 this._path = path; | 205 this._path = path; |
| 197 } | 206 } |
| 198 | 207 |
| 199 /** | 208 /** |
| 200 * Record that this library can be run on the VM. | 209 * Record that this library can be run on the VM. |
| 201 */ | 210 */ |
| 202 void setVmLibrary() { | 211 void setVmLibrary() { |
| 203 _platforms |= VM_PLATFORM; | 212 _platforms |= VM_PLATFORM; |
| 204 } | 213 } |
| 205 } | 214 } |
| 215 |
| 206 /** | 216 /** |
| 207 * Instances of the class `LibraryMap` map Dart library URI's to the [SdkLibrary
Impl | 217 * Instances of the class `LibraryMap` map Dart library URI's to the [SdkLibrary
Impl |
| 208 ]. | 218 ]. |
| 209 * | 219 * |
| 210 * @coverage dart.engine.sdk | 220 * @coverage dart.engine.sdk |
| 211 */ | 221 */ |
| 212 class LibraryMap { | 222 class LibraryMap { |
| 213 | |
| 214 /** | 223 /** |
| 215 * A table mapping Dart library URI's to the library. | 224 * A table mapping Dart library URI's to the library. |
| 216 */ | 225 */ |
| 217 Map<String, SdkLibraryImpl> _libraryMap = new Map<String, SdkLibraryImpl>(); | 226 Map<String, SdkLibraryImpl> _libraryMap = new Map<String, SdkLibraryImpl>(); |
| 218 | 227 |
| 219 /** | 228 /** |
| 220 * Return the library with the given URI, or `null` if the URI does not map to
a library. | 229 * Return the library with the given URI, or `null` if the URI does not map to
a library. |
| 221 * | 230 * |
| 222 * @param dartUri the URI of the library to be returned | 231 * @param dartUri the URI of the library to be returned |
| 223 * @return the library with the given URI | 232 * @return the library with the given URI |
| (...skipping 24 matching lines...) Expand all Loading... |
| 248 _libraryMap[dartUri] = library; | 257 _libraryMap[dartUri] = library; |
| 249 } | 258 } |
| 250 | 259 |
| 251 /** | 260 /** |
| 252 * Return the number of library URI's for which a mapping is available. | 261 * Return the number of library URI's for which a mapping is available. |
| 253 * | 262 * |
| 254 * @return the number of library URI's for which a mapping is available | 263 * @return the number of library URI's for which a mapping is available |
| 255 */ | 264 */ |
| 256 int size() => _libraryMap.length; | 265 int size() => _libraryMap.length; |
| 257 } | 266 } |
| 267 |
| 258 /** | 268 /** |
| 259 * Instances of the class `DartSdk` represent a Dart SDK installed in a specifie
d location. | 269 * Instances of the class `DartSdk` represent a Dart SDK installed in a specifie
d location. |
| 260 * | 270 * |
| 261 * @coverage dart.engine.sdk | 271 * @coverage dart.engine.sdk |
| 262 */ | 272 */ |
| 263 abstract class DartSdk { | 273 abstract class DartSdk { |
| 264 | |
| 265 /** | 274 /** |
| 266 * The short name of the dart SDK core library. | 275 * The short name of the dart SDK core library. |
| 267 */ | 276 */ |
| 268 static final String DART_CORE = "dart:core"; | 277 static final String DART_CORE = "dart:core"; |
| 269 | 278 |
| 270 /** | 279 /** |
| 271 * The short name of the dart SDK html library. | 280 * The short name of the dart SDK html library. |
| 272 */ | 281 */ |
| 273 static final String DART_HTML = "dart:html"; | 282 static final String DART_HTML = "dart:html"; |
| 274 | 283 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 337 |
| 329 /** | 338 /** |
| 330 * Return the source representing the library with the given `dart:` URI, or `
null` if | 339 * Return the source representing the library with the given `dart:` URI, or `
null` if |
| 331 * the given URI does not denote a library in this SDK. | 340 * the given URI does not denote a library in this SDK. |
| 332 * | 341 * |
| 333 * @param dartUri the URI of the library to be returned | 342 * @param dartUri the URI of the library to be returned |
| 334 * @return the source representing the specified library | 343 * @return the source representing the specified library |
| 335 */ | 344 */ |
| 336 Source mapDartUri(String dartUri); | 345 Source mapDartUri(String dartUri); |
| 337 } | 346 } |
| OLD | NEW |