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 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". | 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". |
7 | 7 |
8 library analyzer.src.summary.format; | 8 library analyzer.src.summary.format; |
9 | 9 |
10 import 'flat_buffers.dart' as fb; | 10 import 'flat_buffers.dart' as fb; |
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 "references": references, | 2092 "references": references, |
2093 "types": types, | 2093 "types": types, |
2094 }; | 2094 }; |
2095 | 2095 |
2096 @override | 2096 @override |
2097 String toString() => convert.JSON.encode(toJson()); | 2097 String toString() => convert.JSON.encode(toJson()); |
2098 } | 2098 } |
2099 | 2099 |
2100 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { | 2100 class PackageBundleBuilder extends Object with _PackageBundleMixin implements id
l.PackageBundle { |
2101 String _apiSignature; | 2101 String _apiSignature; |
| 2102 List<PackageDependencyInfoBuilder> _dependencies; |
2102 List<LinkedLibraryBuilder> _linkedLibraries; | 2103 List<LinkedLibraryBuilder> _linkedLibraries; |
2103 List<String> _linkedLibraryUris; | 2104 List<String> _linkedLibraryUris; |
2104 int _majorVersion; | 2105 int _majorVersion; |
2105 int _minorVersion; | 2106 int _minorVersion; |
2106 List<String> _unlinkedUnitHashes; | 2107 List<String> _unlinkedUnitHashes; |
2107 List<UnlinkedUnitBuilder> _unlinkedUnits; | 2108 List<UnlinkedUnitBuilder> _unlinkedUnits; |
2108 List<String> _unlinkedUnitUris; | 2109 List<String> _unlinkedUnitUris; |
2109 | 2110 |
2110 @override | 2111 @override |
2111 String get apiSignature => _apiSignature ??= ''; | 2112 String get apiSignature => _apiSignature ??= ''; |
2112 | 2113 |
2113 /** | 2114 /** |
2114 * MD5 hash of the non-informative fields of the [PackageBundle] (not | 2115 * MD5 hash of the non-informative fields of the [PackageBundle] (not |
2115 * including this one). This can be used to identify when the API of a | 2116 * including this one). This can be used to identify when the API of a |
2116 * package may have changed. | 2117 * package may have changed. |
2117 */ | 2118 */ |
2118 void set apiSignature(String _value) { | 2119 void set apiSignature(String _value) { |
2119 _apiSignature = _value; | 2120 _apiSignature = _value; |
2120 } | 2121 } |
2121 | 2122 |
2122 @override | 2123 @override |
| 2124 List<PackageDependencyInfoBuilder> get dependencies => _dependencies ??= <Pack
ageDependencyInfoBuilder>[]; |
| 2125 |
| 2126 /** |
| 2127 * Information about the packages this package depends on, if known. |
| 2128 */ |
| 2129 void set dependencies(List<PackageDependencyInfoBuilder> _value) { |
| 2130 _dependencies = _value; |
| 2131 } |
| 2132 |
| 2133 @override |
2123 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; | 2134 List<LinkedLibraryBuilder> get linkedLibraries => _linkedLibraries ??= <Linked
LibraryBuilder>[]; |
2124 | 2135 |
2125 /** | 2136 /** |
2126 * Linked libraries. | 2137 * Linked libraries. |
2127 */ | 2138 */ |
2128 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { | 2139 void set linkedLibraries(List<LinkedLibraryBuilder> _value) { |
2129 _linkedLibraries = _value; | 2140 _linkedLibraries = _value; |
2130 } | 2141 } |
2131 | 2142 |
2132 @override | 2143 @override |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2188 @override | 2199 @override |
2189 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; | 2200 List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[]; |
2190 | 2201 |
2191 /** | 2202 /** |
2192 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. | 2203 * The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`. |
2193 */ | 2204 */ |
2194 void set unlinkedUnitUris(List<String> _value) { | 2205 void set unlinkedUnitUris(List<String> _value) { |
2195 _unlinkedUnitUris = _value; | 2206 _unlinkedUnitUris = _value; |
2196 } | 2207 } |
2197 | 2208 |
2198 PackageBundleBuilder({String apiSignature, List<LinkedLibraryBuilder> linkedLi
braries, List<String> linkedLibraryUris, int majorVersion, int minorVersion, Lis
t<String> unlinkedUnitHashes, List<UnlinkedUnitBuilder> unlinkedUnits, List<Stri
ng> unlinkedUnitUris}) | 2209 PackageBundleBuilder({String apiSignature, List<PackageDependencyInfoBuilder>
dependencies, List<LinkedLibraryBuilder> linkedLibraries, List<String> linkedLib
raryUris, int majorVersion, int minorVersion, List<String> unlinkedUnitHashes, L
ist<UnlinkedUnitBuilder> unlinkedUnits, List<String> unlinkedUnitUris}) |
2199 : _apiSignature = apiSignature, | 2210 : _apiSignature = apiSignature, |
| 2211 _dependencies = dependencies, |
2200 _linkedLibraries = linkedLibraries, | 2212 _linkedLibraries = linkedLibraries, |
2201 _linkedLibraryUris = linkedLibraryUris, | 2213 _linkedLibraryUris = linkedLibraryUris, |
2202 _majorVersion = majorVersion, | 2214 _majorVersion = majorVersion, |
2203 _minorVersion = minorVersion, | 2215 _minorVersion = minorVersion, |
2204 _unlinkedUnitHashes = unlinkedUnitHashes, | 2216 _unlinkedUnitHashes = unlinkedUnitHashes, |
2205 _unlinkedUnits = unlinkedUnits, | 2217 _unlinkedUnits = unlinkedUnits, |
2206 _unlinkedUnitUris = unlinkedUnitUris; | 2218 _unlinkedUnitUris = unlinkedUnitUris; |
2207 | 2219 |
2208 /** | 2220 /** |
2209 * Flush [informative] data recursively. | 2221 * Flush [informative] data recursively. |
2210 */ | 2222 */ |
2211 void flushInformative() { | 2223 void flushInformative() { |
| 2224 _dependencies = null; |
2212 _linkedLibraries?.forEach((b) => b.flushInformative()); | 2225 _linkedLibraries?.forEach((b) => b.flushInformative()); |
2213 _unlinkedUnitHashes = null; | 2226 _unlinkedUnitHashes = null; |
2214 _unlinkedUnits?.forEach((b) => b.flushInformative()); | 2227 _unlinkedUnits?.forEach((b) => b.flushInformative()); |
2215 } | 2228 } |
2216 | 2229 |
2217 /** | 2230 /** |
2218 * Accumulate non-[informative] data into [signature]. | 2231 * Accumulate non-[informative] data into [signature]. |
2219 */ | 2232 */ |
2220 void collectApiSignature(api_sig.ApiSignature signature) { | 2233 void collectApiSignature(api_sig.ApiSignature signature) { |
2221 if (this._linkedLibraries == null) { | 2234 if (this._linkedLibraries == null) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 signature.addString(this._apiSignature ?? ''); | 2268 signature.addString(this._apiSignature ?? ''); |
2256 } | 2269 } |
2257 | 2270 |
2258 List<int> toBuffer() { | 2271 List<int> toBuffer() { |
2259 fb.Builder fbBuilder = new fb.Builder(); | 2272 fb.Builder fbBuilder = new fb.Builder(); |
2260 return fbBuilder.finish(finish(fbBuilder), "PBdl"); | 2273 return fbBuilder.finish(finish(fbBuilder), "PBdl"); |
2261 } | 2274 } |
2262 | 2275 |
2263 fb.Offset finish(fb.Builder fbBuilder) { | 2276 fb.Offset finish(fb.Builder fbBuilder) { |
2264 fb.Offset offset_apiSignature; | 2277 fb.Offset offset_apiSignature; |
| 2278 fb.Offset offset_dependencies; |
2265 fb.Offset offset_linkedLibraries; | 2279 fb.Offset offset_linkedLibraries; |
2266 fb.Offset offset_linkedLibraryUris; | 2280 fb.Offset offset_linkedLibraryUris; |
2267 fb.Offset offset_unlinkedUnitHashes; | 2281 fb.Offset offset_unlinkedUnitHashes; |
2268 fb.Offset offset_unlinkedUnits; | 2282 fb.Offset offset_unlinkedUnits; |
2269 fb.Offset offset_unlinkedUnitUris; | 2283 fb.Offset offset_unlinkedUnitUris; |
2270 if (_apiSignature != null) { | 2284 if (_apiSignature != null) { |
2271 offset_apiSignature = fbBuilder.writeString(_apiSignature); | 2285 offset_apiSignature = fbBuilder.writeString(_apiSignature); |
2272 } | 2286 } |
| 2287 if (!(_dependencies == null || _dependencies.isEmpty)) { |
| 2288 offset_dependencies = fbBuilder.writeList(_dependencies.map((b) => b.finis
h(fbBuilder)).toList()); |
| 2289 } |
2273 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { | 2290 if (!(_linkedLibraries == null || _linkedLibraries.isEmpty)) { |
2274 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); | 2291 offset_linkedLibraries = fbBuilder.writeList(_linkedLibraries.map((b) => b
.finish(fbBuilder)).toList()); |
2275 } | 2292 } |
2276 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { | 2293 if (!(_linkedLibraryUris == null || _linkedLibraryUris.isEmpty)) { |
2277 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b)
=> fbBuilder.writeString(b)).toList()); | 2294 offset_linkedLibraryUris = fbBuilder.writeList(_linkedLibraryUris.map((b)
=> fbBuilder.writeString(b)).toList()); |
2278 } | 2295 } |
2279 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) { | 2296 if (!(_unlinkedUnitHashes == null || _unlinkedUnitHashes.isEmpty)) { |
2280 offset_unlinkedUnitHashes = fbBuilder.writeList(_unlinkedUnitHashes.map((b
) => fbBuilder.writeString(b)).toList()); | 2297 offset_unlinkedUnitHashes = fbBuilder.writeList(_unlinkedUnitHashes.map((b
) => fbBuilder.writeString(b)).toList()); |
2281 } | 2298 } |
2282 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { | 2299 if (!(_unlinkedUnits == null || _unlinkedUnits.isEmpty)) { |
2283 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin
ish(fbBuilder)).toList()); | 2300 offset_unlinkedUnits = fbBuilder.writeList(_unlinkedUnits.map((b) => b.fin
ish(fbBuilder)).toList()); |
2284 } | 2301 } |
2285 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { | 2302 if (!(_unlinkedUnitUris == null || _unlinkedUnitUris.isEmpty)) { |
2286 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) =>
fbBuilder.writeString(b)).toList()); | 2303 offset_unlinkedUnitUris = fbBuilder.writeList(_unlinkedUnitUris.map((b) =>
fbBuilder.writeString(b)).toList()); |
2287 } | 2304 } |
2288 fbBuilder.startTable(); | 2305 fbBuilder.startTable(); |
2289 if (offset_apiSignature != null) { | 2306 if (offset_apiSignature != null) { |
2290 fbBuilder.addOffset(7, offset_apiSignature); | 2307 fbBuilder.addOffset(7, offset_apiSignature); |
2291 } | 2308 } |
| 2309 if (offset_dependencies != null) { |
| 2310 fbBuilder.addOffset(8, offset_dependencies); |
| 2311 } |
2292 if (offset_linkedLibraries != null) { | 2312 if (offset_linkedLibraries != null) { |
2293 fbBuilder.addOffset(0, offset_linkedLibraries); | 2313 fbBuilder.addOffset(0, offset_linkedLibraries); |
2294 } | 2314 } |
2295 if (offset_linkedLibraryUris != null) { | 2315 if (offset_linkedLibraryUris != null) { |
2296 fbBuilder.addOffset(1, offset_linkedLibraryUris); | 2316 fbBuilder.addOffset(1, offset_linkedLibraryUris); |
2297 } | 2317 } |
2298 if (_majorVersion != null && _majorVersion != 0) { | 2318 if (_majorVersion != null && _majorVersion != 0) { |
2299 fbBuilder.addUint32(5, _majorVersion); | 2319 fbBuilder.addUint32(5, _majorVersion); |
2300 } | 2320 } |
2301 if (_minorVersion != null && _minorVersion != 0) { | 2321 if (_minorVersion != null && _minorVersion != 0) { |
(...skipping 24 matching lines...) Expand all Loading... |
2326 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => new _Packa
geBundleImpl(bc, offset); | 2346 _PackageBundleImpl createObject(fb.BufferContext bc, int offset) => new _Packa
geBundleImpl(bc, offset); |
2327 } | 2347 } |
2328 | 2348 |
2329 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl.
PackageBundle { | 2349 class _PackageBundleImpl extends Object with _PackageBundleMixin implements idl.
PackageBundle { |
2330 final fb.BufferContext _bc; | 2350 final fb.BufferContext _bc; |
2331 final int _bcOffset; | 2351 final int _bcOffset; |
2332 | 2352 |
2333 _PackageBundleImpl(this._bc, this._bcOffset); | 2353 _PackageBundleImpl(this._bc, this._bcOffset); |
2334 | 2354 |
2335 String _apiSignature; | 2355 String _apiSignature; |
| 2356 List<idl.PackageDependencyInfo> _dependencies; |
2336 List<idl.LinkedLibrary> _linkedLibraries; | 2357 List<idl.LinkedLibrary> _linkedLibraries; |
2337 List<String> _linkedLibraryUris; | 2358 List<String> _linkedLibraryUris; |
2338 int _majorVersion; | 2359 int _majorVersion; |
2339 int _minorVersion; | 2360 int _minorVersion; |
2340 List<String> _unlinkedUnitHashes; | 2361 List<String> _unlinkedUnitHashes; |
2341 List<idl.UnlinkedUnit> _unlinkedUnits; | 2362 List<idl.UnlinkedUnit> _unlinkedUnits; |
2342 List<String> _unlinkedUnitUris; | 2363 List<String> _unlinkedUnitUris; |
2343 | 2364 |
2344 @override | 2365 @override |
2345 String get apiSignature { | 2366 String get apiSignature { |
2346 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, ''); | 2367 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 7, ''); |
2347 return _apiSignature; | 2368 return _apiSignature; |
2348 } | 2369 } |
2349 | 2370 |
2350 @override | 2371 @override |
| 2372 List<idl.PackageDependencyInfo> get dependencies { |
| 2373 _dependencies ??= const fb.ListReader<idl.PackageDependencyInfo>(const _Pack
ageDependencyInfoReader()).vTableGet(_bc, _bcOffset, 8, const <idl.PackageDepend
encyInfo>[]); |
| 2374 return _dependencies; |
| 2375 } |
| 2376 |
| 2377 @override |
2351 List<idl.LinkedLibrary> get linkedLibraries { | 2378 List<idl.LinkedLibrary> get linkedLibraries { |
2352 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib
raryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]); | 2379 _linkedLibraries ??= const fb.ListReader<idl.LinkedLibrary>(const _LinkedLib
raryReader()).vTableGet(_bc, _bcOffset, 0, const <idl.LinkedLibrary>[]); |
2353 return _linkedLibraries; | 2380 return _linkedLibraries; |
2354 } | 2381 } |
2355 | 2382 |
2356 @override | 2383 @override |
2357 List<String> get linkedLibraryUris { | 2384 List<String> get linkedLibraryUris { |
2358 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bc, _bcOffset, 1, const <String>[]); | 2385 _linkedLibraryUris ??= const fb.ListReader<String>(const fb.StringReader()).
vTableGet(_bc, _bcOffset, 1, const <String>[]); |
2359 return _linkedLibraryUris; | 2386 return _linkedLibraryUris; |
2360 } | 2387 } |
(...skipping 27 matching lines...) Expand all Loading... |
2388 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v
TableGet(_bc, _bcOffset, 3, const <String>[]); | 2415 _unlinkedUnitUris ??= const fb.ListReader<String>(const fb.StringReader()).v
TableGet(_bc, _bcOffset, 3, const <String>[]); |
2389 return _unlinkedUnitUris; | 2416 return _unlinkedUnitUris; |
2390 } | 2417 } |
2391 } | 2418 } |
2392 | 2419 |
2393 abstract class _PackageBundleMixin implements idl.PackageBundle { | 2420 abstract class _PackageBundleMixin implements idl.PackageBundle { |
2394 @override | 2421 @override |
2395 Map<String, Object> toJson() { | 2422 Map<String, Object> toJson() { |
2396 Map<String, Object> _result = <String, Object>{}; | 2423 Map<String, Object> _result = <String, Object>{}; |
2397 if (apiSignature != '') _result["apiSignature"] = apiSignature; | 2424 if (apiSignature != '') _result["apiSignature"] = apiSignature; |
| 2425 if (dependencies.isNotEmpty) _result["dependencies"] = dependencies.map((_va
lue) => _value.toJson()).toList(); |
2398 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries
.map((_value) => _value.toJson()).toList(); | 2426 if (linkedLibraries.isNotEmpty) _result["linkedLibraries"] = linkedLibraries
.map((_value) => _value.toJson()).toList(); |
2399 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra
ryUris; | 2427 if (linkedLibraryUris.isNotEmpty) _result["linkedLibraryUris"] = linkedLibra
ryUris; |
2400 if (majorVersion != 0) _result["majorVersion"] = majorVersion; | 2428 if (majorVersion != 0) _result["majorVersion"] = majorVersion; |
2401 if (minorVersion != 0) _result["minorVersion"] = minorVersion; | 2429 if (minorVersion != 0) _result["minorVersion"] = minorVersion; |
2402 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU
nitHashes; | 2430 if (unlinkedUnitHashes.isNotEmpty) _result["unlinkedUnitHashes"] = unlinkedU
nitHashes; |
2403 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map((
_value) => _value.toJson()).toList(); | 2431 if (unlinkedUnits.isNotEmpty) _result["unlinkedUnits"] = unlinkedUnits.map((
_value) => _value.toJson()).toList(); |
2404 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU
ris; | 2432 if (unlinkedUnitUris.isNotEmpty) _result["unlinkedUnitUris"] = unlinkedUnitU
ris; |
2405 return _result; | 2433 return _result; |
2406 } | 2434 } |
2407 | 2435 |
2408 @override | 2436 @override |
2409 Map<String, Object> toMap() => { | 2437 Map<String, Object> toMap() => { |
2410 "apiSignature": apiSignature, | 2438 "apiSignature": apiSignature, |
| 2439 "dependencies": dependencies, |
2411 "linkedLibraries": linkedLibraries, | 2440 "linkedLibraries": linkedLibraries, |
2412 "linkedLibraryUris": linkedLibraryUris, | 2441 "linkedLibraryUris": linkedLibraryUris, |
2413 "majorVersion": majorVersion, | 2442 "majorVersion": majorVersion, |
2414 "minorVersion": minorVersion, | 2443 "minorVersion": minorVersion, |
2415 "unlinkedUnitHashes": unlinkedUnitHashes, | 2444 "unlinkedUnitHashes": unlinkedUnitHashes, |
2416 "unlinkedUnits": unlinkedUnits, | 2445 "unlinkedUnits": unlinkedUnits, |
2417 "unlinkedUnitUris": unlinkedUnitUris, | 2446 "unlinkedUnitUris": unlinkedUnitUris, |
2418 }; | 2447 }; |
2419 | 2448 |
2420 @override | 2449 @override |
2421 String toString() => convert.JSON.encode(toJson()); | 2450 String toString() => convert.JSON.encode(toJson()); |
2422 } | 2451 } |
2423 | 2452 |
| 2453 class PackageDependencyInfoBuilder extends Object with _PackageDependencyInfoMix
in implements idl.PackageDependencyInfo { |
| 2454 String _apiSignature; |
| 2455 List<String> _includedPackageNames; |
| 2456 bool _includesDartUris; |
| 2457 bool _includesFileUris; |
| 2458 String _summaryPath; |
| 2459 |
| 2460 @override |
| 2461 String get apiSignature => _apiSignature ??= ''; |
| 2462 |
| 2463 /** |
| 2464 * API signature of this dependency. |
| 2465 */ |
| 2466 void set apiSignature(String _value) { |
| 2467 _apiSignature = _value; |
| 2468 } |
| 2469 |
| 2470 @override |
| 2471 List<String> get includedPackageNames => _includedPackageNames ??= <String>[]; |
| 2472 |
| 2473 /** |
| 2474 * If this dependency summarizes any files whose URI takes the form |
| 2475 * "package:<package_name>/...", a list of all such package names, sorted |
| 2476 * lexicographically. Otherwise empty. |
| 2477 */ |
| 2478 void set includedPackageNames(List<String> _value) { |
| 2479 _includedPackageNames = _value; |
| 2480 } |
| 2481 |
| 2482 @override |
| 2483 bool get includesDartUris => _includesDartUris ??= false; |
| 2484 |
| 2485 /** |
| 2486 * Indicates whether this dependency summarizes any files whose URI takes the |
| 2487 * form "dart:...". |
| 2488 */ |
| 2489 void set includesDartUris(bool _value) { |
| 2490 _includesDartUris = _value; |
| 2491 } |
| 2492 |
| 2493 @override |
| 2494 bool get includesFileUris => _includesFileUris ??= false; |
| 2495 |
| 2496 /** |
| 2497 * Indicates whether this dependency summarizes any files whose URI takes the |
| 2498 * form "file:...". |
| 2499 */ |
| 2500 void set includesFileUris(bool _value) { |
| 2501 _includesFileUris = _value; |
| 2502 } |
| 2503 |
| 2504 @override |
| 2505 String get summaryPath => _summaryPath ??= ''; |
| 2506 |
| 2507 /** |
| 2508 * Relative path to the summary file for this dependency. This is intended as |
| 2509 * a hint to help the analysis server locate summaries of dependencies. We |
| 2510 * don't specify precisely what this path is relative to, but we expect it to |
| 2511 * be relative to a directory the analysis server can find (e.g. for projects |
| 2512 * built using Bazel, it would be relative to the "bazel-bin" directory). |
| 2513 * |
| 2514 * Absent if the path is not known. |
| 2515 */ |
| 2516 void set summaryPath(String _value) { |
| 2517 _summaryPath = _value; |
| 2518 } |
| 2519 |
| 2520 PackageDependencyInfoBuilder({String apiSignature, List<String> includedPackag
eNames, bool includesDartUris, bool includesFileUris, String summaryPath}) |
| 2521 : _apiSignature = apiSignature, |
| 2522 _includedPackageNames = includedPackageNames, |
| 2523 _includesDartUris = includesDartUris, |
| 2524 _includesFileUris = includesFileUris, |
| 2525 _summaryPath = summaryPath; |
| 2526 |
| 2527 /** |
| 2528 * Flush [informative] data recursively. |
| 2529 */ |
| 2530 void flushInformative() { |
| 2531 } |
| 2532 |
| 2533 /** |
| 2534 * Accumulate non-[informative] data into [signature]. |
| 2535 */ |
| 2536 void collectApiSignature(api_sig.ApiSignature signature) { |
| 2537 signature.addString(this._apiSignature ?? ''); |
| 2538 signature.addString(this._summaryPath ?? ''); |
| 2539 if (this._includedPackageNames == null) { |
| 2540 signature.addInt(0); |
| 2541 } else { |
| 2542 signature.addInt(this._includedPackageNames.length); |
| 2543 for (var x in this._includedPackageNames) { |
| 2544 signature.addString(x); |
| 2545 } |
| 2546 } |
| 2547 signature.addBool(this._includesFileUris == true); |
| 2548 signature.addBool(this._includesDartUris == true); |
| 2549 } |
| 2550 |
| 2551 fb.Offset finish(fb.Builder fbBuilder) { |
| 2552 fb.Offset offset_apiSignature; |
| 2553 fb.Offset offset_includedPackageNames; |
| 2554 fb.Offset offset_summaryPath; |
| 2555 if (_apiSignature != null) { |
| 2556 offset_apiSignature = fbBuilder.writeString(_apiSignature); |
| 2557 } |
| 2558 if (!(_includedPackageNames == null || _includedPackageNames.isEmpty)) { |
| 2559 offset_includedPackageNames = fbBuilder.writeList(_includedPackageNames.ma
p((b) => fbBuilder.writeString(b)).toList()); |
| 2560 } |
| 2561 if (_summaryPath != null) { |
| 2562 offset_summaryPath = fbBuilder.writeString(_summaryPath); |
| 2563 } |
| 2564 fbBuilder.startTable(); |
| 2565 if (offset_apiSignature != null) { |
| 2566 fbBuilder.addOffset(0, offset_apiSignature); |
| 2567 } |
| 2568 if (offset_includedPackageNames != null) { |
| 2569 fbBuilder.addOffset(2, offset_includedPackageNames); |
| 2570 } |
| 2571 if (_includesDartUris == true) { |
| 2572 fbBuilder.addBool(4, true); |
| 2573 } |
| 2574 if (_includesFileUris == true) { |
| 2575 fbBuilder.addBool(3, true); |
| 2576 } |
| 2577 if (offset_summaryPath != null) { |
| 2578 fbBuilder.addOffset(1, offset_summaryPath); |
| 2579 } |
| 2580 return fbBuilder.endTable(); |
| 2581 } |
| 2582 } |
| 2583 |
| 2584 class _PackageDependencyInfoReader extends fb.TableReader<_PackageDependencyInfo
Impl> { |
| 2585 const _PackageDependencyInfoReader(); |
| 2586 |
| 2587 @override |
| 2588 _PackageDependencyInfoImpl createObject(fb.BufferContext bc, int offset) => ne
w _PackageDependencyInfoImpl(bc, offset); |
| 2589 } |
| 2590 |
| 2591 class _PackageDependencyInfoImpl extends Object with _PackageDependencyInfoMixin
implements idl.PackageDependencyInfo { |
| 2592 final fb.BufferContext _bc; |
| 2593 final int _bcOffset; |
| 2594 |
| 2595 _PackageDependencyInfoImpl(this._bc, this._bcOffset); |
| 2596 |
| 2597 String _apiSignature; |
| 2598 List<String> _includedPackageNames; |
| 2599 bool _includesDartUris; |
| 2600 bool _includesFileUris; |
| 2601 String _summaryPath; |
| 2602 |
| 2603 @override |
| 2604 String get apiSignature { |
| 2605 _apiSignature ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, ''); |
| 2606 return _apiSignature; |
| 2607 } |
| 2608 |
| 2609 @override |
| 2610 List<String> get includedPackageNames { |
| 2611 _includedPackageNames ??= const fb.ListReader<String>(const fb.StringReader(
)).vTableGet(_bc, _bcOffset, 2, const <String>[]); |
| 2612 return _includedPackageNames; |
| 2613 } |
| 2614 |
| 2615 @override |
| 2616 bool get includesDartUris { |
| 2617 _includesDartUris ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, fal
se); |
| 2618 return _includesDartUris; |
| 2619 } |
| 2620 |
| 2621 @override |
| 2622 bool get includesFileUris { |
| 2623 _includesFileUris ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, fal
se); |
| 2624 return _includesFileUris; |
| 2625 } |
| 2626 |
| 2627 @override |
| 2628 String get summaryPath { |
| 2629 _summaryPath ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, ''); |
| 2630 return _summaryPath; |
| 2631 } |
| 2632 } |
| 2633 |
| 2634 abstract class _PackageDependencyInfoMixin implements idl.PackageDependencyInfo
{ |
| 2635 @override |
| 2636 Map<String, Object> toJson() { |
| 2637 Map<String, Object> _result = <String, Object>{}; |
| 2638 if (apiSignature != '') _result["apiSignature"] = apiSignature; |
| 2639 if (includedPackageNames.isNotEmpty) _result["includedPackageNames"] = inclu
dedPackageNames; |
| 2640 if (includesDartUris != false) _result["includesDartUris"] = includesDartUri
s; |
| 2641 if (includesFileUris != false) _result["includesFileUris"] = includesFileUri
s; |
| 2642 if (summaryPath != '') _result["summaryPath"] = summaryPath; |
| 2643 return _result; |
| 2644 } |
| 2645 |
| 2646 @override |
| 2647 Map<String, Object> toMap() => { |
| 2648 "apiSignature": apiSignature, |
| 2649 "includedPackageNames": includedPackageNames, |
| 2650 "includesDartUris": includesDartUris, |
| 2651 "includesFileUris": includesFileUris, |
| 2652 "summaryPath": summaryPath, |
| 2653 }; |
| 2654 |
| 2655 @override |
| 2656 String toString() => convert.JSON.encode(toJson()); |
| 2657 } |
| 2658 |
2424 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { | 2659 class PackageIndexBuilder extends Object with _PackageIndexMixin implements idl.
PackageIndex { |
2425 List<idl.IndexSyntheticElementKind> _elementKinds; | 2660 List<idl.IndexSyntheticElementKind> _elementKinds; |
2426 List<int> _elementNameClassMemberIds; | 2661 List<int> _elementNameClassMemberIds; |
2427 List<int> _elementNameParameterIds; | 2662 List<int> _elementNameParameterIds; |
2428 List<int> _elementNameUnitMemberIds; | 2663 List<int> _elementNameUnitMemberIds; |
2429 List<int> _elementUnits; | 2664 List<int> _elementUnits; |
2430 List<String> _strings; | 2665 List<String> _strings; |
2431 List<int> _unitLibraryUris; | 2666 List<int> _unitLibraryUris; |
2432 List<UnitIndexBuilder> _units; | 2667 List<UnitIndexBuilder> _units; |
2433 List<int> _unitUnitUris; | 2668 List<int> _unitUnitUris; |
(...skipping 7083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9517 "propagatedTypeSlot": propagatedTypeSlot, | 9752 "propagatedTypeSlot": propagatedTypeSlot, |
9518 "type": type, | 9753 "type": type, |
9519 "visibleLength": visibleLength, | 9754 "visibleLength": visibleLength, |
9520 "visibleOffset": visibleOffset, | 9755 "visibleOffset": visibleOffset, |
9521 }; | 9756 }; |
9522 | 9757 |
9523 @override | 9758 @override |
9524 String toString() => convert.JSON.encode(toJson()); | 9759 String toString() => convert.JSON.encode(toJson()); |
9525 } | 9760 } |
9526 | 9761 |
OLD | NEW |