| 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 'dart:convert'; | 10 import 'dart:convert'; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 PrelinkedDependencyBuilder(builder.BuilderContext context); | 45 PrelinkedDependencyBuilder(builder.BuilderContext context); |
| 46 | 46 |
| 47 void set uri(String _value) { | 47 void set uri(String _value) { |
| 48 assert(!_json.containsKey("uri")); | 48 assert(!_json.containsKey("uri")); |
| 49 if (_value != null) { | 49 if (_value != null) { |
| 50 _json["uri"] = _value; | 50 _json["uri"] = _value; |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 Object finish() => _json; | 54 Map finish() => _json; |
| 55 } | 55 } |
| 56 | 56 |
| 57 Object encodePrelinkedDependency(builder.BuilderContext builderContext, {String
uri}) { | 57 PrelinkedDependencyBuilder encodePrelinkedDependency(builder.BuilderContext buil
derContext, {String uri}) { |
| 58 PrelinkedDependencyBuilder builder = new PrelinkedDependencyBuilder(builderCon
text); | 58 PrelinkedDependencyBuilder builder = new PrelinkedDependencyBuilder(builderCon
text); |
| 59 builder.uri = uri; | 59 builder.uri = uri; |
| 60 return builder.finish(); | 60 return builder; |
| 61 } | 61 } |
| 62 | 62 |
| 63 class PrelinkedLibrary { | 63 class PrelinkedLibrary { |
| 64 UnlinkedLibrary _unlinked; | 64 UnlinkedLibrary _unlinked; |
| 65 List<PrelinkedDependency> _dependencies; | 65 List<PrelinkedDependency> _dependencies; |
| 66 List<int> _importDependencies; | 66 List<int> _importDependencies; |
| 67 List<PrelinkedReference> _references; | 67 List<PrelinkedReference> _references; |
| 68 | 68 |
| 69 PrelinkedLibrary.fromJson(Map json) | 69 PrelinkedLibrary.fromJson(Map json) |
| 70 : _unlinked = json["unlinked"] == null ? null : new UnlinkedLibrary.fromJson
(json["unlinked"]), | 70 : _unlinked = json["unlinked"] == null ? null : new UnlinkedLibrary.fromJson
(json["unlinked"]), |
| 71 _dependencies = json["dependencies"]?.map((x) => new PrelinkedDependency.f
romJson(x))?.toList(), | 71 _dependencies = json["dependencies"]?.map((x) => new PrelinkedDependency.f
romJson(x))?.toList(), |
| 72 _importDependencies = json["importDependencies"], | 72 _importDependencies = json["importDependencies"], |
| 73 _references = json["references"]?.map((x) => new PrelinkedReference.fromJs
on(x))?.toList(); | 73 _references = json["references"]?.map((x) => new PrelinkedReference.fromJs
on(x))?.toList(); |
| 74 | 74 |
| 75 PrelinkedLibrary.fromBuffer(List<int> buffer) : this.fromJson(JSON.decode(UTF8
.decode(buffer))); | 75 PrelinkedLibrary.fromBuffer(List<int> buffer) : this.fromJson(JSON.decode(UTF8
.decode(buffer))); |
| 76 | 76 |
| 77 UnlinkedLibrary get unlinked => _unlinked; | 77 UnlinkedLibrary get unlinked => _unlinked; |
| 78 List<PrelinkedDependency> get dependencies => _dependencies ?? const <Prelinke
dDependency>[]; | 78 List<PrelinkedDependency> get dependencies => _dependencies ?? const <Prelinke
dDependency>[]; |
| 79 List<int> get importDependencies => _importDependencies ?? const <int>[]; | 79 List<int> get importDependencies => _importDependencies ?? const <int>[]; |
| 80 List<PrelinkedReference> get references => _references ?? const <PrelinkedRefe
rence>[]; | 80 List<PrelinkedReference> get references => _references ?? const <PrelinkedRefe
rence>[]; |
| 81 } | 81 } |
| 82 | 82 |
| 83 class PrelinkedLibraryBuilder { | 83 class PrelinkedLibraryBuilder { |
| 84 final Map _json = {}; | 84 final Map _json = {}; |
| 85 | 85 |
| 86 PrelinkedLibraryBuilder(builder.BuilderContext context); | 86 PrelinkedLibraryBuilder(builder.BuilderContext context); |
| 87 | 87 |
| 88 void set unlinked(Object _value) { | 88 void set unlinked(UnlinkedLibraryBuilder _value) { |
| 89 assert(!_json.containsKey("unlinked")); | 89 assert(!_json.containsKey("unlinked")); |
| 90 if (_value != null) { | 90 if (_value != null) { |
| 91 _json["unlinked"] = _value; | 91 _json["unlinked"] = _value.finish(); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void set dependencies(List<Object> _value) { | 95 void set dependencies(List<PrelinkedDependencyBuilder> _value) { |
| 96 assert(!_json.containsKey("dependencies")); | 96 assert(!_json.containsKey("dependencies")); |
| 97 if (_value != null || _value.isEmpty) { | 97 if (_value != null || _value.isEmpty) { |
| 98 _json["dependencies"] = _value.toList(); | 98 _json["dependencies"] = _value.map((b) => b.finish()).toList(); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 void set importDependencies(List<int> _value) { | 102 void set importDependencies(List<int> _value) { |
| 103 assert(!_json.containsKey("importDependencies")); | 103 assert(!_json.containsKey("importDependencies")); |
| 104 if (_value != null || _value.isEmpty) { | 104 if (_value != null || _value.isEmpty) { |
| 105 _json["importDependencies"] = _value.toList(); | 105 _json["importDependencies"] = _value.toList(); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 void set references(List<Object> _value) { | 109 void set references(List<PrelinkedReferenceBuilder> _value) { |
| 110 assert(!_json.containsKey("references")); | 110 assert(!_json.containsKey("references")); |
| 111 if (_value != null || _value.isEmpty) { | 111 if (_value != null || _value.isEmpty) { |
| 112 _json["references"] = _value.toList(); | 112 _json["references"] = _value.map((b) => b.finish()).toList(); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 Object finish() => _json; | 116 List<int> toBuffer() => UTF8.encode(JSON.encode(finish())); |
| 117 |
| 118 Map finish() => _json; |
| 117 } | 119 } |
| 118 | 120 |
| 119 Object encodePrelinkedLibrary(builder.BuilderContext builderContext, {Object unl
inked, List<Object> dependencies, List<int> importDependencies, List<Object> ref
erences}) { | 121 PrelinkedLibraryBuilder encodePrelinkedLibrary(builder.BuilderContext builderCon
text, {UnlinkedLibraryBuilder unlinked, List<PrelinkedDependencyBuilder> depende
ncies, List<int> importDependencies, List<PrelinkedReferenceBuilder> references}
) { |
| 120 PrelinkedLibraryBuilder builder = new PrelinkedLibraryBuilder(builderContext); | 122 PrelinkedLibraryBuilder builder = new PrelinkedLibraryBuilder(builderContext); |
| 121 builder.unlinked = unlinked; | 123 builder.unlinked = unlinked; |
| 122 builder.dependencies = dependencies; | 124 builder.dependencies = dependencies; |
| 123 builder.importDependencies = importDependencies; | 125 builder.importDependencies = importDependencies; |
| 124 builder.references = references; | 126 builder.references = references; |
| 125 return builder.finish(); | 127 return builder; |
| 126 } | 128 } |
| 127 | 129 |
| 128 class PrelinkedReference { | 130 class PrelinkedReference { |
| 129 int _dependency; | 131 int _dependency; |
| 130 PrelinkedReferenceKind _kind; | 132 PrelinkedReferenceKind _kind; |
| 131 | 133 |
| 132 PrelinkedReference.fromJson(Map json) | 134 PrelinkedReference.fromJson(Map json) |
| 133 : _dependency = json["dependency"], | 135 : _dependency = json["dependency"], |
| 134 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json["
kind"]]; | 136 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json["
kind"]]; |
| 135 | 137 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 149 } | 151 } |
| 150 } | 152 } |
| 151 | 153 |
| 152 void set kind(PrelinkedReferenceKind _value) { | 154 void set kind(PrelinkedReferenceKind _value) { |
| 153 assert(!_json.containsKey("kind")); | 155 assert(!_json.containsKey("kind")); |
| 154 if (_value != null || _value == PrelinkedReferenceKind.classOrEnum) { | 156 if (_value != null || _value == PrelinkedReferenceKind.classOrEnum) { |
| 155 _json["kind"] = _value.index; | 157 _json["kind"] = _value.index; |
| 156 } | 158 } |
| 157 } | 159 } |
| 158 | 160 |
| 159 Object finish() => _json; | 161 Map finish() => _json; |
| 160 } | 162 } |
| 161 | 163 |
| 162 Object encodePrelinkedReference(builder.BuilderContext builderContext, {int depe
ndency, PrelinkedReferenceKind kind}) { | 164 PrelinkedReferenceBuilder encodePrelinkedReference(builder.BuilderContext builde
rContext, {int dependency, PrelinkedReferenceKind kind}) { |
| 163 PrelinkedReferenceBuilder builder = new PrelinkedReferenceBuilder(builderConte
xt); | 165 PrelinkedReferenceBuilder builder = new PrelinkedReferenceBuilder(builderConte
xt); |
| 164 builder.dependency = dependency; | 166 builder.dependency = dependency; |
| 165 builder.kind = kind; | 167 builder.kind = kind; |
| 166 return builder.finish(); | 168 return builder; |
| 167 } | 169 } |
| 168 | 170 |
| 169 class UnlinkedClass { | 171 class UnlinkedClass { |
| 170 String _name; | 172 String _name; |
| 171 int _unit; | 173 int _unit; |
| 172 List<UnlinkedTypeParam> _typeParameters; | 174 List<UnlinkedTypeParam> _typeParameters; |
| 173 UnlinkedTypeRef _supertype; | 175 UnlinkedTypeRef _supertype; |
| 174 List<UnlinkedTypeRef> _mixins; | 176 List<UnlinkedTypeRef> _mixins; |
| 175 List<UnlinkedTypeRef> _interfaces; | 177 List<UnlinkedTypeRef> _interfaces; |
| 176 List<UnlinkedVariable> _fields; | 178 List<UnlinkedVariable> _fields; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 216 } |
| 215 } | 217 } |
| 216 | 218 |
| 217 void set unit(int _value) { | 219 void set unit(int _value) { |
| 218 assert(!_json.containsKey("unit")); | 220 assert(!_json.containsKey("unit")); |
| 219 if (_value != null) { | 221 if (_value != null) { |
| 220 _json["unit"] = _value; | 222 _json["unit"] = _value; |
| 221 } | 223 } |
| 222 } | 224 } |
| 223 | 225 |
| 224 void set typeParameters(List<Object> _value) { | 226 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 225 assert(!_json.containsKey("typeParameters")); | 227 assert(!_json.containsKey("typeParameters")); |
| 226 if (_value != null || _value.isEmpty) { | 228 if (_value != null || _value.isEmpty) { |
| 227 _json["typeParameters"] = _value.toList(); | 229 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); |
| 228 } | 230 } |
| 229 } | 231 } |
| 230 | 232 |
| 231 void set supertype(Object _value) { | 233 void set supertype(UnlinkedTypeRefBuilder _value) { |
| 232 assert(!_json.containsKey("supertype")); | 234 assert(!_json.containsKey("supertype")); |
| 233 if (_value != null) { | 235 if (_value != null) { |
| 234 _json["supertype"] = _value; | 236 _json["supertype"] = _value.finish(); |
| 235 } | 237 } |
| 236 } | 238 } |
| 237 | 239 |
| 238 void set mixins(List<Object> _value) { | 240 void set mixins(List<UnlinkedTypeRefBuilder> _value) { |
| 239 assert(!_json.containsKey("mixins")); | 241 assert(!_json.containsKey("mixins")); |
| 240 if (_value != null || _value.isEmpty) { | 242 if (_value != null || _value.isEmpty) { |
| 241 _json["mixins"] = _value.toList(); | 243 _json["mixins"] = _value.map((b) => b.finish()).toList(); |
| 242 } | 244 } |
| 243 } | 245 } |
| 244 | 246 |
| 245 void set interfaces(List<Object> _value) { | 247 void set interfaces(List<UnlinkedTypeRefBuilder> _value) { |
| 246 assert(!_json.containsKey("interfaces")); | 248 assert(!_json.containsKey("interfaces")); |
| 247 if (_value != null || _value.isEmpty) { | 249 if (_value != null || _value.isEmpty) { |
| 248 _json["interfaces"] = _value.toList(); | 250 _json["interfaces"] = _value.map((b) => b.finish()).toList(); |
| 249 } | 251 } |
| 250 } | 252 } |
| 251 | 253 |
| 252 void set fields(List<Object> _value) { | 254 void set fields(List<UnlinkedVariableBuilder> _value) { |
| 253 assert(!_json.containsKey("fields")); | 255 assert(!_json.containsKey("fields")); |
| 254 if (_value != null || _value.isEmpty) { | 256 if (_value != null || _value.isEmpty) { |
| 255 _json["fields"] = _value.toList(); | 257 _json["fields"] = _value.map((b) => b.finish()).toList(); |
| 256 } | 258 } |
| 257 } | 259 } |
| 258 | 260 |
| 259 void set executables(List<Object> _value) { | 261 void set executables(List<UnlinkedExecutableBuilder> _value) { |
| 260 assert(!_json.containsKey("executables")); | 262 assert(!_json.containsKey("executables")); |
| 261 if (_value != null || _value.isEmpty) { | 263 if (_value != null || _value.isEmpty) { |
| 262 _json["executables"] = _value.toList(); | 264 _json["executables"] = _value.map((b) => b.finish()).toList(); |
| 263 } | 265 } |
| 264 } | 266 } |
| 265 | 267 |
| 266 void set isAbstract(bool _value) { | 268 void set isAbstract(bool _value) { |
| 267 assert(!_json.containsKey("isAbstract")); | 269 assert(!_json.containsKey("isAbstract")); |
| 268 if (_value != null) { | 270 if (_value != null) { |
| 269 _json["isAbstract"] = _value; | 271 _json["isAbstract"] = _value; |
| 270 } | 272 } |
| 271 } | 273 } |
| 272 | 274 |
| 273 void set isMixinApplication(bool _value) { | 275 void set isMixinApplication(bool _value) { |
| 274 assert(!_json.containsKey("isMixinApplication")); | 276 assert(!_json.containsKey("isMixinApplication")); |
| 275 if (_value != null) { | 277 if (_value != null) { |
| 276 _json["isMixinApplication"] = _value; | 278 _json["isMixinApplication"] = _value; |
| 277 } | 279 } |
| 278 } | 280 } |
| 279 | 281 |
| 280 Object finish() => _json; | 282 Map finish() => _json; |
| 281 } | 283 } |
| 282 | 284 |
| 283 Object encodeUnlinkedClass(builder.BuilderContext builderContext, {String name,
int unit, List<Object> typeParameters, Object supertype, List<Object> mixins, Li
st<Object> interfaces, List<Object> fields, List<Object> executables, bool isAbs
tract, bool isMixinApplication}) { | 285 UnlinkedClassBuilder encodeUnlinkedClass(builder.BuilderContext builderContext,
{String name, int unit, List<UnlinkedTypeParamBuilder> typeParameters, UnlinkedT
ypeRefBuilder supertype, List<UnlinkedTypeRefBuilder> mixins, List<UnlinkedTypeR
efBuilder> interfaces, List<UnlinkedVariableBuilder> fields, List<UnlinkedExecut
ableBuilder> executables, bool isAbstract, bool isMixinApplication}) { |
| 284 UnlinkedClassBuilder builder = new UnlinkedClassBuilder(builderContext); | 286 UnlinkedClassBuilder builder = new UnlinkedClassBuilder(builderContext); |
| 285 builder.name = name; | 287 builder.name = name; |
| 286 builder.unit = unit; | 288 builder.unit = unit; |
| 287 builder.typeParameters = typeParameters; | 289 builder.typeParameters = typeParameters; |
| 288 builder.supertype = supertype; | 290 builder.supertype = supertype; |
| 289 builder.mixins = mixins; | 291 builder.mixins = mixins; |
| 290 builder.interfaces = interfaces; | 292 builder.interfaces = interfaces; |
| 291 builder.fields = fields; | 293 builder.fields = fields; |
| 292 builder.executables = executables; | 294 builder.executables = executables; |
| 293 builder.isAbstract = isAbstract; | 295 builder.isAbstract = isAbstract; |
| 294 builder.isMixinApplication = isMixinApplication; | 296 builder.isMixinApplication = isMixinApplication; |
| 295 return builder.finish(); | 297 return builder; |
| 296 } | 298 } |
| 297 | 299 |
| 298 class UnlinkedCombinator { | 300 class UnlinkedCombinator { |
| 299 List<UnlinkedCombinatorName> _shows; | 301 List<UnlinkedCombinatorName> _shows; |
| 300 List<UnlinkedCombinatorName> _hides; | 302 List<UnlinkedCombinatorName> _hides; |
| 301 | 303 |
| 302 UnlinkedCombinator.fromJson(Map json) | 304 UnlinkedCombinator.fromJson(Map json) |
| 303 : _shows = json["shows"]?.map((x) => new UnlinkedCombinatorName.fromJson(x))
?.toList(), | 305 : _shows = json["shows"]?.map((x) => new UnlinkedCombinatorName.fromJson(x))
?.toList(), |
| 304 _hides = json["hides"]?.map((x) => new UnlinkedCombinatorName.fromJson(x))
?.toList(); | 306 _hides = json["hides"]?.map((x) => new UnlinkedCombinatorName.fromJson(x))
?.toList(); |
| 305 | 307 |
| 306 List<UnlinkedCombinatorName> get shows => _shows ?? const <UnlinkedCombinatorN
ame>[]; | 308 List<UnlinkedCombinatorName> get shows => _shows ?? const <UnlinkedCombinatorN
ame>[]; |
| 307 List<UnlinkedCombinatorName> get hides => _hides ?? const <UnlinkedCombinatorN
ame>[]; | 309 List<UnlinkedCombinatorName> get hides => _hides ?? const <UnlinkedCombinatorN
ame>[]; |
| 308 } | 310 } |
| 309 | 311 |
| 310 class UnlinkedCombinatorBuilder { | 312 class UnlinkedCombinatorBuilder { |
| 311 final Map _json = {}; | 313 final Map _json = {}; |
| 312 | 314 |
| 313 UnlinkedCombinatorBuilder(builder.BuilderContext context); | 315 UnlinkedCombinatorBuilder(builder.BuilderContext context); |
| 314 | 316 |
| 315 void set shows(List<Object> _value) { | 317 void set shows(List<UnlinkedCombinatorNameBuilder> _value) { |
| 316 assert(!_json.containsKey("shows")); | 318 assert(!_json.containsKey("shows")); |
| 317 if (_value != null || _value.isEmpty) { | 319 if (_value != null || _value.isEmpty) { |
| 318 _json["shows"] = _value.toList(); | 320 _json["shows"] = _value.map((b) => b.finish()).toList(); |
| 319 } | 321 } |
| 320 } | 322 } |
| 321 | 323 |
| 322 void set hides(List<Object> _value) { | 324 void set hides(List<UnlinkedCombinatorNameBuilder> _value) { |
| 323 assert(!_json.containsKey("hides")); | 325 assert(!_json.containsKey("hides")); |
| 324 if (_value != null || _value.isEmpty) { | 326 if (_value != null || _value.isEmpty) { |
| 325 _json["hides"] = _value.toList(); | 327 _json["hides"] = _value.map((b) => b.finish()).toList(); |
| 326 } | 328 } |
| 327 } | 329 } |
| 328 | 330 |
| 329 Object finish() => _json; | 331 Map finish() => _json; |
| 330 } | 332 } |
| 331 | 333 |
| 332 Object encodeUnlinkedCombinator(builder.BuilderContext builderContext, {List<Obj
ect> shows, List<Object> hides}) { | 334 UnlinkedCombinatorBuilder encodeUnlinkedCombinator(builder.BuilderContext builde
rContext, {List<UnlinkedCombinatorNameBuilder> shows, List<UnlinkedCombinatorNam
eBuilder> hides}) { |
| 333 UnlinkedCombinatorBuilder builder = new UnlinkedCombinatorBuilder(builderConte
xt); | 335 UnlinkedCombinatorBuilder builder = new UnlinkedCombinatorBuilder(builderConte
xt); |
| 334 builder.shows = shows; | 336 builder.shows = shows; |
| 335 builder.hides = hides; | 337 builder.hides = hides; |
| 336 return builder.finish(); | 338 return builder; |
| 337 } | 339 } |
| 338 | 340 |
| 339 class UnlinkedCombinatorName { | 341 class UnlinkedCombinatorName { |
| 340 String _name; | 342 String _name; |
| 341 | 343 |
| 342 UnlinkedCombinatorName.fromJson(Map json) | 344 UnlinkedCombinatorName.fromJson(Map json) |
| 343 : _name = json["name"]; | 345 : _name = json["name"]; |
| 344 | 346 |
| 345 String get name => _name ?? ''; | 347 String get name => _name ?? ''; |
| 346 } | 348 } |
| 347 | 349 |
| 348 class UnlinkedCombinatorNameBuilder { | 350 class UnlinkedCombinatorNameBuilder { |
| 349 final Map _json = {}; | 351 final Map _json = {}; |
| 350 | 352 |
| 351 UnlinkedCombinatorNameBuilder(builder.BuilderContext context); | 353 UnlinkedCombinatorNameBuilder(builder.BuilderContext context); |
| 352 | 354 |
| 353 void set name(String _value) { | 355 void set name(String _value) { |
| 354 assert(!_json.containsKey("name")); | 356 assert(!_json.containsKey("name")); |
| 355 if (_value != null) { | 357 if (_value != null) { |
| 356 _json["name"] = _value; | 358 _json["name"] = _value; |
| 357 } | 359 } |
| 358 } | 360 } |
| 359 | 361 |
| 360 Object finish() => _json; | 362 Map finish() => _json; |
| 361 } | 363 } |
| 362 | 364 |
| 363 Object encodeUnlinkedCombinatorName(builder.BuilderContext builderContext, {Stri
ng name}) { | 365 UnlinkedCombinatorNameBuilder encodeUnlinkedCombinatorName(builder.BuilderContex
t builderContext, {String name}) { |
| 364 UnlinkedCombinatorNameBuilder builder = new UnlinkedCombinatorNameBuilder(buil
derContext); | 366 UnlinkedCombinatorNameBuilder builder = new UnlinkedCombinatorNameBuilder(buil
derContext); |
| 365 builder.name = name; | 367 builder.name = name; |
| 366 return builder.finish(); | 368 return builder; |
| 367 } | 369 } |
| 368 | 370 |
| 369 class UnlinkedEnum { | 371 class UnlinkedEnum { |
| 370 String _name; | 372 String _name; |
| 371 List<UnlinkedEnumValue> _values; | 373 List<UnlinkedEnumValue> _values; |
| 372 int _unit; | 374 int _unit; |
| 373 | 375 |
| 374 UnlinkedEnum.fromJson(Map json) | 376 UnlinkedEnum.fromJson(Map json) |
| 375 : _name = json["name"], | 377 : _name = json["name"], |
| 376 _values = json["values"]?.map((x) => new UnlinkedEnumValue.fromJson(x))?.t
oList(), | 378 _values = json["values"]?.map((x) => new UnlinkedEnumValue.fromJson(x))?.t
oList(), |
| 377 _unit = json["unit"]; | 379 _unit = json["unit"]; |
| 378 | 380 |
| 379 String get name => _name ?? ''; | 381 String get name => _name ?? ''; |
| 380 List<UnlinkedEnumValue> get values => _values ?? const <UnlinkedEnumValue>[]; | 382 List<UnlinkedEnumValue> get values => _values ?? const <UnlinkedEnumValue>[]; |
| 381 int get unit => _unit ?? 0; | 383 int get unit => _unit ?? 0; |
| 382 } | 384 } |
| 383 | 385 |
| 384 class UnlinkedEnumBuilder { | 386 class UnlinkedEnumBuilder { |
| 385 final Map _json = {}; | 387 final Map _json = {}; |
| 386 | 388 |
| 387 UnlinkedEnumBuilder(builder.BuilderContext context); | 389 UnlinkedEnumBuilder(builder.BuilderContext context); |
| 388 | 390 |
| 389 void set name(String _value) { | 391 void set name(String _value) { |
| 390 assert(!_json.containsKey("name")); | 392 assert(!_json.containsKey("name")); |
| 391 if (_value != null) { | 393 if (_value != null) { |
| 392 _json["name"] = _value; | 394 _json["name"] = _value; |
| 393 } | 395 } |
| 394 } | 396 } |
| 395 | 397 |
| 396 void set values(List<Object> _value) { | 398 void set values(List<UnlinkedEnumValueBuilder> _value) { |
| 397 assert(!_json.containsKey("values")); | 399 assert(!_json.containsKey("values")); |
| 398 if (_value != null || _value.isEmpty) { | 400 if (_value != null || _value.isEmpty) { |
| 399 _json["values"] = _value.toList(); | 401 _json["values"] = _value.map((b) => b.finish()).toList(); |
| 400 } | 402 } |
| 401 } | 403 } |
| 402 | 404 |
| 403 void set unit(int _value) { | 405 void set unit(int _value) { |
| 404 assert(!_json.containsKey("unit")); | 406 assert(!_json.containsKey("unit")); |
| 405 if (_value != null) { | 407 if (_value != null) { |
| 406 _json["unit"] = _value; | 408 _json["unit"] = _value; |
| 407 } | 409 } |
| 408 } | 410 } |
| 409 | 411 |
| 410 Object finish() => _json; | 412 Map finish() => _json; |
| 411 } | 413 } |
| 412 | 414 |
| 413 Object encodeUnlinkedEnum(builder.BuilderContext builderContext, {String name, L
ist<Object> values, int unit}) { | 415 UnlinkedEnumBuilder encodeUnlinkedEnum(builder.BuilderContext builderContext, {S
tring name, List<UnlinkedEnumValueBuilder> values, int unit}) { |
| 414 UnlinkedEnumBuilder builder = new UnlinkedEnumBuilder(builderContext); | 416 UnlinkedEnumBuilder builder = new UnlinkedEnumBuilder(builderContext); |
| 415 builder.name = name; | 417 builder.name = name; |
| 416 builder.values = values; | 418 builder.values = values; |
| 417 builder.unit = unit; | 419 builder.unit = unit; |
| 418 return builder.finish(); | 420 return builder; |
| 419 } | 421 } |
| 420 | 422 |
| 421 class UnlinkedEnumValue { | 423 class UnlinkedEnumValue { |
| 422 String _name; | 424 String _name; |
| 423 | 425 |
| 424 UnlinkedEnumValue.fromJson(Map json) | 426 UnlinkedEnumValue.fromJson(Map json) |
| 425 : _name = json["name"]; | 427 : _name = json["name"]; |
| 426 | 428 |
| 427 String get name => _name ?? ''; | 429 String get name => _name ?? ''; |
| 428 } | 430 } |
| 429 | 431 |
| 430 class UnlinkedEnumValueBuilder { | 432 class UnlinkedEnumValueBuilder { |
| 431 final Map _json = {}; | 433 final Map _json = {}; |
| 432 | 434 |
| 433 UnlinkedEnumValueBuilder(builder.BuilderContext context); | 435 UnlinkedEnumValueBuilder(builder.BuilderContext context); |
| 434 | 436 |
| 435 void set name(String _value) { | 437 void set name(String _value) { |
| 436 assert(!_json.containsKey("name")); | 438 assert(!_json.containsKey("name")); |
| 437 if (_value != null) { | 439 if (_value != null) { |
| 438 _json["name"] = _value; | 440 _json["name"] = _value; |
| 439 } | 441 } |
| 440 } | 442 } |
| 441 | 443 |
| 442 Object finish() => _json; | 444 Map finish() => _json; |
| 443 } | 445 } |
| 444 | 446 |
| 445 Object encodeUnlinkedEnumValue(builder.BuilderContext builderContext, {String na
me}) { | 447 UnlinkedEnumValueBuilder encodeUnlinkedEnumValue(builder.BuilderContext builderC
ontext, {String name}) { |
| 446 UnlinkedEnumValueBuilder builder = new UnlinkedEnumValueBuilder(builderContext
); | 448 UnlinkedEnumValueBuilder builder = new UnlinkedEnumValueBuilder(builderContext
); |
| 447 builder.name = name; | 449 builder.name = name; |
| 448 return builder.finish(); | 450 return builder; |
| 449 } | 451 } |
| 450 | 452 |
| 451 class UnlinkedExecutable { | 453 class UnlinkedExecutable { |
| 452 String _name; | 454 String _name; |
| 453 int _unit; | 455 int _unit; |
| 454 List<UnlinkedTypeParam> _typeParameters; | 456 List<UnlinkedTypeParam> _typeParameters; |
| 455 UnlinkedTypeRef _returnType; | 457 UnlinkedTypeRef _returnType; |
| 456 List<UnlinkedParam> _parameters; | 458 List<UnlinkedParam> _parameters; |
| 457 UnlinkedExecutableKind _kind; | 459 UnlinkedExecutableKind _kind; |
| 458 bool _isAbstract; | 460 bool _isAbstract; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } | 498 } |
| 497 } | 499 } |
| 498 | 500 |
| 499 void set unit(int _value) { | 501 void set unit(int _value) { |
| 500 assert(!_json.containsKey("unit")); | 502 assert(!_json.containsKey("unit")); |
| 501 if (_value != null) { | 503 if (_value != null) { |
| 502 _json["unit"] = _value; | 504 _json["unit"] = _value; |
| 503 } | 505 } |
| 504 } | 506 } |
| 505 | 507 |
| 506 void set typeParameters(List<Object> _value) { | 508 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 507 assert(!_json.containsKey("typeParameters")); | 509 assert(!_json.containsKey("typeParameters")); |
| 508 if (_value != null || _value.isEmpty) { | 510 if (_value != null || _value.isEmpty) { |
| 509 _json["typeParameters"] = _value.toList(); | 511 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); |
| 510 } | 512 } |
| 511 } | 513 } |
| 512 | 514 |
| 513 void set returnType(Object _value) { | 515 void set returnType(UnlinkedTypeRefBuilder _value) { |
| 514 assert(!_json.containsKey("returnType")); | 516 assert(!_json.containsKey("returnType")); |
| 515 if (_value != null) { | 517 if (_value != null) { |
| 516 _json["returnType"] = _value; | 518 _json["returnType"] = _value.finish(); |
| 517 } | 519 } |
| 518 } | 520 } |
| 519 | 521 |
| 520 void set parameters(List<Object> _value) { | 522 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 521 assert(!_json.containsKey("parameters")); | 523 assert(!_json.containsKey("parameters")); |
| 522 if (_value != null || _value.isEmpty) { | 524 if (_value != null || _value.isEmpty) { |
| 523 _json["parameters"] = _value.toList(); | 525 _json["parameters"] = _value.map((b) => b.finish()).toList(); |
| 524 } | 526 } |
| 525 } | 527 } |
| 526 | 528 |
| 527 void set kind(UnlinkedExecutableKind _value) { | 529 void set kind(UnlinkedExecutableKind _value) { |
| 528 assert(!_json.containsKey("kind")); | 530 assert(!_json.containsKey("kind")); |
| 529 if (_value != null || _value == UnlinkedExecutableKind.functionOrMethod) { | 531 if (_value != null || _value == UnlinkedExecutableKind.functionOrMethod) { |
| 530 _json["kind"] = _value.index; | 532 _json["kind"] = _value.index; |
| 531 } | 533 } |
| 532 } | 534 } |
| 533 | 535 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 552 } | 554 } |
| 553 } | 555 } |
| 554 | 556 |
| 555 void set isFactory(bool _value) { | 557 void set isFactory(bool _value) { |
| 556 assert(!_json.containsKey("isFactory")); | 558 assert(!_json.containsKey("isFactory")); |
| 557 if (_value != null) { | 559 if (_value != null) { |
| 558 _json["isFactory"] = _value; | 560 _json["isFactory"] = _value; |
| 559 } | 561 } |
| 560 } | 562 } |
| 561 | 563 |
| 562 Object finish() => _json; | 564 Map finish() => _json; |
| 563 } | 565 } |
| 564 | 566 |
| 565 Object encodeUnlinkedExecutable(builder.BuilderContext builderContext, {String n
ame, int unit, List<Object> typeParameters, Object returnType, List<Object> para
meters, UnlinkedExecutableKind kind, bool isAbstract, bool isStatic, bool isCons
t, bool isFactory}) { | 567 UnlinkedExecutableBuilder encodeUnlinkedExecutable(builder.BuilderContext builde
rContext, {String name, int unit, List<UnlinkedTypeParamBuilder> typeParameters,
UnlinkedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters, Unlin
kedExecutableKind kind, bool isAbstract, bool isStatic, bool isConst, bool isFac
tory}) { |
| 566 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte
xt); | 568 UnlinkedExecutableBuilder builder = new UnlinkedExecutableBuilder(builderConte
xt); |
| 567 builder.name = name; | 569 builder.name = name; |
| 568 builder.unit = unit; | 570 builder.unit = unit; |
| 569 builder.typeParameters = typeParameters; | 571 builder.typeParameters = typeParameters; |
| 570 builder.returnType = returnType; | 572 builder.returnType = returnType; |
| 571 builder.parameters = parameters; | 573 builder.parameters = parameters; |
| 572 builder.kind = kind; | 574 builder.kind = kind; |
| 573 builder.isAbstract = isAbstract; | 575 builder.isAbstract = isAbstract; |
| 574 builder.isStatic = isStatic; | 576 builder.isStatic = isStatic; |
| 575 builder.isConst = isConst; | 577 builder.isConst = isConst; |
| 576 builder.isFactory = isFactory; | 578 builder.isFactory = isFactory; |
| 577 return builder.finish(); | 579 return builder; |
| 578 } | 580 } |
| 579 | 581 |
| 580 class UnlinkedExport { | 582 class UnlinkedExport { |
| 581 String _uri; | 583 String _uri; |
| 582 List<UnlinkedCombinator> _combinators; | 584 List<UnlinkedCombinator> _combinators; |
| 583 | 585 |
| 584 UnlinkedExport.fromJson(Map json) | 586 UnlinkedExport.fromJson(Map json) |
| 585 : _uri = json["uri"], | 587 : _uri = json["uri"], |
| 586 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from
Json(x))?.toList(); | 588 _combinators = json["combinators"]?.map((x) => new UnlinkedCombinator.from
Json(x))?.toList(); |
| 587 | 589 |
| 588 String get uri => _uri ?? ''; | 590 String get uri => _uri ?? ''; |
| 589 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom
binator>[]; | 591 List<UnlinkedCombinator> get combinators => _combinators ?? const <UnlinkedCom
binator>[]; |
| 590 } | 592 } |
| 591 | 593 |
| 592 class UnlinkedExportBuilder { | 594 class UnlinkedExportBuilder { |
| 593 final Map _json = {}; | 595 final Map _json = {}; |
| 594 | 596 |
| 595 UnlinkedExportBuilder(builder.BuilderContext context); | 597 UnlinkedExportBuilder(builder.BuilderContext context); |
| 596 | 598 |
| 597 void set uri(String _value) { | 599 void set uri(String _value) { |
| 598 assert(!_json.containsKey("uri")); | 600 assert(!_json.containsKey("uri")); |
| 599 if (_value != null) { | 601 if (_value != null) { |
| 600 _json["uri"] = _value; | 602 _json["uri"] = _value; |
| 601 } | 603 } |
| 602 } | 604 } |
| 603 | 605 |
| 604 void set combinators(List<Object> _value) { | 606 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
| 605 assert(!_json.containsKey("combinators")); | 607 assert(!_json.containsKey("combinators")); |
| 606 if (_value != null || _value.isEmpty) { | 608 if (_value != null || _value.isEmpty) { |
| 607 _json["combinators"] = _value.toList(); | 609 _json["combinators"] = _value.map((b) => b.finish()).toList(); |
| 608 } | 610 } |
| 609 } | 611 } |
| 610 | 612 |
| 611 Object finish() => _json; | 613 Map finish() => _json; |
| 612 } | 614 } |
| 613 | 615 |
| 614 Object encodeUnlinkedExport(builder.BuilderContext builderContext, {String uri,
List<Object> combinators}) { | 616 UnlinkedExportBuilder encodeUnlinkedExport(builder.BuilderContext builderContext
, {String uri, List<UnlinkedCombinatorBuilder> combinators}) { |
| 615 UnlinkedExportBuilder builder = new UnlinkedExportBuilder(builderContext); | 617 UnlinkedExportBuilder builder = new UnlinkedExportBuilder(builderContext); |
| 616 builder.uri = uri; | 618 builder.uri = uri; |
| 617 builder.combinators = combinators; | 619 builder.combinators = combinators; |
| 618 return builder.finish(); | 620 return builder; |
| 619 } | 621 } |
| 620 | 622 |
| 621 class UnlinkedImport { | 623 class UnlinkedImport { |
| 622 String _uri; | 624 String _uri; |
| 623 int _offset; | 625 int _offset; |
| 624 int _prefix; | 626 int _prefix; |
| 625 List<UnlinkedCombinator> _combinators; | 627 List<UnlinkedCombinator> _combinators; |
| 626 bool _isDeferred; | 628 bool _isDeferred; |
| 627 bool _isImplicit; | 629 bool _isImplicit; |
| 628 | 630 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 } | 663 } |
| 662 } | 664 } |
| 663 | 665 |
| 664 void set prefix(int _value) { | 666 void set prefix(int _value) { |
| 665 assert(!_json.containsKey("prefix")); | 667 assert(!_json.containsKey("prefix")); |
| 666 if (_value != null) { | 668 if (_value != null) { |
| 667 _json["prefix"] = _value; | 669 _json["prefix"] = _value; |
| 668 } | 670 } |
| 669 } | 671 } |
| 670 | 672 |
| 671 void set combinators(List<Object> _value) { | 673 void set combinators(List<UnlinkedCombinatorBuilder> _value) { |
| 672 assert(!_json.containsKey("combinators")); | 674 assert(!_json.containsKey("combinators")); |
| 673 if (_value != null || _value.isEmpty) { | 675 if (_value != null || _value.isEmpty) { |
| 674 _json["combinators"] = _value.toList(); | 676 _json["combinators"] = _value.map((b) => b.finish()).toList(); |
| 675 } | 677 } |
| 676 } | 678 } |
| 677 | 679 |
| 678 void set isDeferred(bool _value) { | 680 void set isDeferred(bool _value) { |
| 679 assert(!_json.containsKey("isDeferred")); | 681 assert(!_json.containsKey("isDeferred")); |
| 680 if (_value != null) { | 682 if (_value != null) { |
| 681 _json["isDeferred"] = _value; | 683 _json["isDeferred"] = _value; |
| 682 } | 684 } |
| 683 } | 685 } |
| 684 | 686 |
| 685 void set isImplicit(bool _value) { | 687 void set isImplicit(bool _value) { |
| 686 assert(!_json.containsKey("isImplicit")); | 688 assert(!_json.containsKey("isImplicit")); |
| 687 if (_value != null) { | 689 if (_value != null) { |
| 688 _json["isImplicit"] = _value; | 690 _json["isImplicit"] = _value; |
| 689 } | 691 } |
| 690 } | 692 } |
| 691 | 693 |
| 692 Object finish() => _json; | 694 Map finish() => _json; |
| 693 } | 695 } |
| 694 | 696 |
| 695 Object encodeUnlinkedImport(builder.BuilderContext builderContext, {String uri,
int offset, int prefix, List<Object> combinators, bool isDeferred, bool isImplic
it}) { | 697 UnlinkedImportBuilder encodeUnlinkedImport(builder.BuilderContext builderContext
, {String uri, int offset, int prefix, List<UnlinkedCombinatorBuilder> combinato
rs, bool isDeferred, bool isImplicit}) { |
| 696 UnlinkedImportBuilder builder = new UnlinkedImportBuilder(builderContext); | 698 UnlinkedImportBuilder builder = new UnlinkedImportBuilder(builderContext); |
| 697 builder.uri = uri; | 699 builder.uri = uri; |
| 698 builder.offset = offset; | 700 builder.offset = offset; |
| 699 builder.prefix = prefix; | 701 builder.prefix = prefix; |
| 700 builder.combinators = combinators; | 702 builder.combinators = combinators; |
| 701 builder.isDeferred = isDeferred; | 703 builder.isDeferred = isDeferred; |
| 702 builder.isImplicit = isImplicit; | 704 builder.isImplicit = isImplicit; |
| 703 return builder.finish(); | 705 return builder; |
| 704 } | 706 } |
| 705 | 707 |
| 706 class UnlinkedLibrary { | 708 class UnlinkedLibrary { |
| 707 List<UnlinkedReference> _references; | 709 List<UnlinkedReference> _references; |
| 708 List<UnlinkedUnit> _units; | 710 List<UnlinkedUnit> _units; |
| 709 String _name; | 711 String _name; |
| 710 List<UnlinkedClass> _classes; | 712 List<UnlinkedClass> _classes; |
| 711 List<UnlinkedEnum> _enums; | 713 List<UnlinkedEnum> _enums; |
| 712 List<UnlinkedExecutable> _executables; | 714 List<UnlinkedExecutable> _executables; |
| 713 List<UnlinkedExport> _exports; | 715 List<UnlinkedExport> _exports; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 740 List<UnlinkedTypedef> get typedefs => _typedefs ?? const <UnlinkedTypedef>[]; | 742 List<UnlinkedTypedef> get typedefs => _typedefs ?? const <UnlinkedTypedef>[]; |
| 741 List<UnlinkedVariable> get variables => _variables ?? const <UnlinkedVariable>
[]; | 743 List<UnlinkedVariable> get variables => _variables ?? const <UnlinkedVariable>
[]; |
| 742 List<UnlinkedPrefix> get prefixes => _prefixes ?? const <UnlinkedPrefix>[]; | 744 List<UnlinkedPrefix> get prefixes => _prefixes ?? const <UnlinkedPrefix>[]; |
| 743 } | 745 } |
| 744 | 746 |
| 745 class UnlinkedLibraryBuilder { | 747 class UnlinkedLibraryBuilder { |
| 746 final Map _json = {}; | 748 final Map _json = {}; |
| 747 | 749 |
| 748 UnlinkedLibraryBuilder(builder.BuilderContext context); | 750 UnlinkedLibraryBuilder(builder.BuilderContext context); |
| 749 | 751 |
| 750 void set references(List<Object> _value) { | 752 void set references(List<UnlinkedReferenceBuilder> _value) { |
| 751 assert(!_json.containsKey("references")); | 753 assert(!_json.containsKey("references")); |
| 752 if (_value != null || _value.isEmpty) { | 754 if (_value != null || _value.isEmpty) { |
| 753 _json["references"] = _value.toList(); | 755 _json["references"] = _value.map((b) => b.finish()).toList(); |
| 754 } | 756 } |
| 755 } | 757 } |
| 756 | 758 |
| 757 void set units(List<Object> _value) { | 759 void set units(List<UnlinkedUnitBuilder> _value) { |
| 758 assert(!_json.containsKey("units")); | 760 assert(!_json.containsKey("units")); |
| 759 if (_value != null || _value.isEmpty) { | 761 if (_value != null || _value.isEmpty) { |
| 760 _json["units"] = _value.toList(); | 762 _json["units"] = _value.map((b) => b.finish()).toList(); |
| 761 } | 763 } |
| 762 } | 764 } |
| 763 | 765 |
| 764 void set name(String _value) { | 766 void set name(String _value) { |
| 765 assert(!_json.containsKey("name")); | 767 assert(!_json.containsKey("name")); |
| 766 if (_value != null) { | 768 if (_value != null) { |
| 767 _json["name"] = _value; | 769 _json["name"] = _value; |
| 768 } | 770 } |
| 769 } | 771 } |
| 770 | 772 |
| 771 void set classes(List<Object> _value) { | 773 void set classes(List<UnlinkedClassBuilder> _value) { |
| 772 assert(!_json.containsKey("classes")); | 774 assert(!_json.containsKey("classes")); |
| 773 if (_value != null || _value.isEmpty) { | 775 if (_value != null || _value.isEmpty) { |
| 774 _json["classes"] = _value.toList(); | 776 _json["classes"] = _value.map((b) => b.finish()).toList(); |
| 775 } | 777 } |
| 776 } | 778 } |
| 777 | 779 |
| 778 void set enums(List<Object> _value) { | 780 void set enums(List<UnlinkedEnumBuilder> _value) { |
| 779 assert(!_json.containsKey("enums")); | 781 assert(!_json.containsKey("enums")); |
| 780 if (_value != null || _value.isEmpty) { | 782 if (_value != null || _value.isEmpty) { |
| 781 _json["enums"] = _value.toList(); | 783 _json["enums"] = _value.map((b) => b.finish()).toList(); |
| 782 } | 784 } |
| 783 } | 785 } |
| 784 | 786 |
| 785 void set executables(List<Object> _value) { | 787 void set executables(List<UnlinkedExecutableBuilder> _value) { |
| 786 assert(!_json.containsKey("executables")); | 788 assert(!_json.containsKey("executables")); |
| 787 if (_value != null || _value.isEmpty) { | 789 if (_value != null || _value.isEmpty) { |
| 788 _json["executables"] = _value.toList(); | 790 _json["executables"] = _value.map((b) => b.finish()).toList(); |
| 789 } | 791 } |
| 790 } | 792 } |
| 791 | 793 |
| 792 void set exports(List<Object> _value) { | 794 void set exports(List<UnlinkedExportBuilder> _value) { |
| 793 assert(!_json.containsKey("exports")); | 795 assert(!_json.containsKey("exports")); |
| 794 if (_value != null || _value.isEmpty) { | 796 if (_value != null || _value.isEmpty) { |
| 795 _json["exports"] = _value.toList(); | 797 _json["exports"] = _value.map((b) => b.finish()).toList(); |
| 796 } | 798 } |
| 797 } | 799 } |
| 798 | 800 |
| 799 void set imports(List<Object> _value) { | 801 void set imports(List<UnlinkedImportBuilder> _value) { |
| 800 assert(!_json.containsKey("imports")); | 802 assert(!_json.containsKey("imports")); |
| 801 if (_value != null || _value.isEmpty) { | 803 if (_value != null || _value.isEmpty) { |
| 802 _json["imports"] = _value.toList(); | 804 _json["imports"] = _value.map((b) => b.finish()).toList(); |
| 803 } | 805 } |
| 804 } | 806 } |
| 805 | 807 |
| 806 void set typedefs(List<Object> _value) { | 808 void set typedefs(List<UnlinkedTypedefBuilder> _value) { |
| 807 assert(!_json.containsKey("typedefs")); | 809 assert(!_json.containsKey("typedefs")); |
| 808 if (_value != null || _value.isEmpty) { | 810 if (_value != null || _value.isEmpty) { |
| 809 _json["typedefs"] = _value.toList(); | 811 _json["typedefs"] = _value.map((b) => b.finish()).toList(); |
| 810 } | 812 } |
| 811 } | 813 } |
| 812 | 814 |
| 813 void set variables(List<Object> _value) { | 815 void set variables(List<UnlinkedVariableBuilder> _value) { |
| 814 assert(!_json.containsKey("variables")); | 816 assert(!_json.containsKey("variables")); |
| 815 if (_value != null || _value.isEmpty) { | 817 if (_value != null || _value.isEmpty) { |
| 816 _json["variables"] = _value.toList(); | 818 _json["variables"] = _value.map((b) => b.finish()).toList(); |
| 817 } | 819 } |
| 818 } | 820 } |
| 819 | 821 |
| 820 void set prefixes(List<Object> _value) { | 822 void set prefixes(List<UnlinkedPrefixBuilder> _value) { |
| 821 assert(!_json.containsKey("prefixes")); | 823 assert(!_json.containsKey("prefixes")); |
| 822 if (_value != null || _value.isEmpty) { | 824 if (_value != null || _value.isEmpty) { |
| 823 _json["prefixes"] = _value.toList(); | 825 _json["prefixes"] = _value.map((b) => b.finish()).toList(); |
| 824 } | 826 } |
| 825 } | 827 } |
| 826 | 828 |
| 827 Object finish() => _json; | 829 Map finish() => _json; |
| 828 } | 830 } |
| 829 | 831 |
| 830 Object encodeUnlinkedLibrary(builder.BuilderContext builderContext, {List<Object
> references, List<Object> units, String name, List<Object> classes, List<Object
> enums, List<Object> executables, List<Object> exports, List<Object> imports, L
ist<Object> typedefs, List<Object> variables, List<Object> prefixes}) { | 832 UnlinkedLibraryBuilder encodeUnlinkedLibrary(builder.BuilderContext builderConte
xt, {List<UnlinkedReferenceBuilder> references, List<UnlinkedUnitBuilder> units,
String name, List<UnlinkedClassBuilder> classes, List<UnlinkedEnumBuilder> enum
s, List<UnlinkedExecutableBuilder> executables, List<UnlinkedExportBuilder> expo
rts, List<UnlinkedImportBuilder> imports, List<UnlinkedTypedefBuilder> typedefs,
List<UnlinkedVariableBuilder> variables, List<UnlinkedPrefixBuilder> prefixes})
{ |
| 831 UnlinkedLibraryBuilder builder = new UnlinkedLibraryBuilder(builderContext); | 833 UnlinkedLibraryBuilder builder = new UnlinkedLibraryBuilder(builderContext); |
| 832 builder.references = references; | 834 builder.references = references; |
| 833 builder.units = units; | 835 builder.units = units; |
| 834 builder.name = name; | 836 builder.name = name; |
| 835 builder.classes = classes; | 837 builder.classes = classes; |
| 836 builder.enums = enums; | 838 builder.enums = enums; |
| 837 builder.executables = executables; | 839 builder.executables = executables; |
| 838 builder.exports = exports; | 840 builder.exports = exports; |
| 839 builder.imports = imports; | 841 builder.imports = imports; |
| 840 builder.typedefs = typedefs; | 842 builder.typedefs = typedefs; |
| 841 builder.variables = variables; | 843 builder.variables = variables; |
| 842 builder.prefixes = prefixes; | 844 builder.prefixes = prefixes; |
| 843 return builder.finish(); | 845 return builder; |
| 844 } | 846 } |
| 845 | 847 |
| 846 class UnlinkedParam { | 848 class UnlinkedParam { |
| 847 String _name; | 849 String _name; |
| 848 UnlinkedTypeRef _type; | 850 UnlinkedTypeRef _type; |
| 849 List<UnlinkedParam> _parameters; | 851 List<UnlinkedParam> _parameters; |
| 850 UnlinkedParamKind _kind; | 852 UnlinkedParamKind _kind; |
| 851 bool _isFunctionTyped; | 853 bool _isFunctionTyped; |
| 852 bool _isInitializingFormal; | 854 bool _isInitializingFormal; |
| 853 | 855 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 872 | 874 |
| 873 UnlinkedParamBuilder(builder.BuilderContext context); | 875 UnlinkedParamBuilder(builder.BuilderContext context); |
| 874 | 876 |
| 875 void set name(String _value) { | 877 void set name(String _value) { |
| 876 assert(!_json.containsKey("name")); | 878 assert(!_json.containsKey("name")); |
| 877 if (_value != null) { | 879 if (_value != null) { |
| 878 _json["name"] = _value; | 880 _json["name"] = _value; |
| 879 } | 881 } |
| 880 } | 882 } |
| 881 | 883 |
| 882 void set type(Object _value) { | 884 void set type(UnlinkedTypeRefBuilder _value) { |
| 883 assert(!_json.containsKey("type")); | 885 assert(!_json.containsKey("type")); |
| 884 if (_value != null) { | 886 if (_value != null) { |
| 885 _json["type"] = _value; | 887 _json["type"] = _value.finish(); |
| 886 } | 888 } |
| 887 } | 889 } |
| 888 | 890 |
| 889 void set parameters(List<Object> _value) { | 891 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 890 assert(!_json.containsKey("parameters")); | 892 assert(!_json.containsKey("parameters")); |
| 891 if (_value != null || _value.isEmpty) { | 893 if (_value != null || _value.isEmpty) { |
| 892 _json["parameters"] = _value.toList(); | 894 _json["parameters"] = _value.map((b) => b.finish()).toList(); |
| 893 } | 895 } |
| 894 } | 896 } |
| 895 | 897 |
| 896 void set kind(UnlinkedParamKind _value) { | 898 void set kind(UnlinkedParamKind _value) { |
| 897 assert(!_json.containsKey("kind")); | 899 assert(!_json.containsKey("kind")); |
| 898 if (_value != null || _value == UnlinkedParamKind.required) { | 900 if (_value != null || _value == UnlinkedParamKind.required) { |
| 899 _json["kind"] = _value.index; | 901 _json["kind"] = _value.index; |
| 900 } | 902 } |
| 901 } | 903 } |
| 902 | 904 |
| 903 void set isFunctionTyped(bool _value) { | 905 void set isFunctionTyped(bool _value) { |
| 904 assert(!_json.containsKey("isFunctionTyped")); | 906 assert(!_json.containsKey("isFunctionTyped")); |
| 905 if (_value != null) { | 907 if (_value != null) { |
| 906 _json["isFunctionTyped"] = _value; | 908 _json["isFunctionTyped"] = _value; |
| 907 } | 909 } |
| 908 } | 910 } |
| 909 | 911 |
| 910 void set isInitializingFormal(bool _value) { | 912 void set isInitializingFormal(bool _value) { |
| 911 assert(!_json.containsKey("isInitializingFormal")); | 913 assert(!_json.containsKey("isInitializingFormal")); |
| 912 if (_value != null) { | 914 if (_value != null) { |
| 913 _json["isInitializingFormal"] = _value; | 915 _json["isInitializingFormal"] = _value; |
| 914 } | 916 } |
| 915 } | 917 } |
| 916 | 918 |
| 917 Object finish() => _json; | 919 Map finish() => _json; |
| 918 } | 920 } |
| 919 | 921 |
| 920 Object encodeUnlinkedParam(builder.BuilderContext builderContext, {String name,
Object type, List<Object> parameters, UnlinkedParamKind kind, bool isFunctionTyp
ed, bool isInitializingFormal}) { | 922 UnlinkedParamBuilder encodeUnlinkedParam(builder.BuilderContext builderContext,
{String name, UnlinkedTypeRefBuilder type, List<UnlinkedParamBuilder> parameters
, UnlinkedParamKind kind, bool isFunctionTyped, bool isInitializingFormal}) { |
| 921 UnlinkedParamBuilder builder = new UnlinkedParamBuilder(builderContext); | 923 UnlinkedParamBuilder builder = new UnlinkedParamBuilder(builderContext); |
| 922 builder.name = name; | 924 builder.name = name; |
| 923 builder.type = type; | 925 builder.type = type; |
| 924 builder.parameters = parameters; | 926 builder.parameters = parameters; |
| 925 builder.kind = kind; | 927 builder.kind = kind; |
| 926 builder.isFunctionTyped = isFunctionTyped; | 928 builder.isFunctionTyped = isFunctionTyped; |
| 927 builder.isInitializingFormal = isInitializingFormal; | 929 builder.isInitializingFormal = isInitializingFormal; |
| 928 return builder.finish(); | 930 return builder; |
| 929 } | 931 } |
| 930 | 932 |
| 931 class UnlinkedPrefix { | 933 class UnlinkedPrefix { |
| 932 String _name; | 934 String _name; |
| 933 | 935 |
| 934 UnlinkedPrefix.fromJson(Map json) | 936 UnlinkedPrefix.fromJson(Map json) |
| 935 : _name = json["name"]; | 937 : _name = json["name"]; |
| 936 | 938 |
| 937 String get name => _name ?? ''; | 939 String get name => _name ?? ''; |
| 938 } | 940 } |
| 939 | 941 |
| 940 class UnlinkedPrefixBuilder { | 942 class UnlinkedPrefixBuilder { |
| 941 final Map _json = {}; | 943 final Map _json = {}; |
| 942 | 944 |
| 943 UnlinkedPrefixBuilder(builder.BuilderContext context); | 945 UnlinkedPrefixBuilder(builder.BuilderContext context); |
| 944 | 946 |
| 945 void set name(String _value) { | 947 void set name(String _value) { |
| 946 assert(!_json.containsKey("name")); | 948 assert(!_json.containsKey("name")); |
| 947 if (_value != null) { | 949 if (_value != null) { |
| 948 _json["name"] = _value; | 950 _json["name"] = _value; |
| 949 } | 951 } |
| 950 } | 952 } |
| 951 | 953 |
| 952 Object finish() => _json; | 954 Map finish() => _json; |
| 953 } | 955 } |
| 954 | 956 |
| 955 Object encodeUnlinkedPrefix(builder.BuilderContext builderContext, {String name}
) { | 957 UnlinkedPrefixBuilder encodeUnlinkedPrefix(builder.BuilderContext builderContext
, {String name}) { |
| 956 UnlinkedPrefixBuilder builder = new UnlinkedPrefixBuilder(builderContext); | 958 UnlinkedPrefixBuilder builder = new UnlinkedPrefixBuilder(builderContext); |
| 957 builder.name = name; | 959 builder.name = name; |
| 958 return builder.finish(); | 960 return builder; |
| 959 } | 961 } |
| 960 | 962 |
| 961 class UnlinkedReference { | 963 class UnlinkedReference { |
| 962 String _name; | 964 String _name; |
| 963 int _prefix; | 965 int _prefix; |
| 964 | 966 |
| 965 UnlinkedReference.fromJson(Map json) | 967 UnlinkedReference.fromJson(Map json) |
| 966 : _name = json["name"], | 968 : _name = json["name"], |
| 967 _prefix = json["prefix"]; | 969 _prefix = json["prefix"]; |
| 968 | 970 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 982 } | 984 } |
| 983 } | 985 } |
| 984 | 986 |
| 985 void set prefix(int _value) { | 987 void set prefix(int _value) { |
| 986 assert(!_json.containsKey("prefix")); | 988 assert(!_json.containsKey("prefix")); |
| 987 if (_value != null) { | 989 if (_value != null) { |
| 988 _json["prefix"] = _value; | 990 _json["prefix"] = _value; |
| 989 } | 991 } |
| 990 } | 992 } |
| 991 | 993 |
| 992 Object finish() => _json; | 994 Map finish() => _json; |
| 993 } | 995 } |
| 994 | 996 |
| 995 Object encodeUnlinkedReference(builder.BuilderContext builderContext, {String na
me, int prefix}) { | 997 UnlinkedReferenceBuilder encodeUnlinkedReference(builder.BuilderContext builderC
ontext, {String name, int prefix}) { |
| 996 UnlinkedReferenceBuilder builder = new UnlinkedReferenceBuilder(builderContext
); | 998 UnlinkedReferenceBuilder builder = new UnlinkedReferenceBuilder(builderContext
); |
| 997 builder.name = name; | 999 builder.name = name; |
| 998 builder.prefix = prefix; | 1000 builder.prefix = prefix; |
| 999 return builder.finish(); | 1001 return builder; |
| 1000 } | 1002 } |
| 1001 | 1003 |
| 1002 class UnlinkedTypedef { | 1004 class UnlinkedTypedef { |
| 1003 String _name; | 1005 String _name; |
| 1004 int _unit; | 1006 int _unit; |
| 1005 List<UnlinkedTypeParam> _typeParameters; | 1007 List<UnlinkedTypeParam> _typeParameters; |
| 1006 UnlinkedTypeRef _returnType; | 1008 UnlinkedTypeRef _returnType; |
| 1007 List<UnlinkedParam> _parameters; | 1009 List<UnlinkedParam> _parameters; |
| 1008 | 1010 |
| 1009 UnlinkedTypedef.fromJson(Map json) | 1011 UnlinkedTypedef.fromJson(Map json) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1032 } | 1034 } |
| 1033 } | 1035 } |
| 1034 | 1036 |
| 1035 void set unit(int _value) { | 1037 void set unit(int _value) { |
| 1036 assert(!_json.containsKey("unit")); | 1038 assert(!_json.containsKey("unit")); |
| 1037 if (_value != null) { | 1039 if (_value != null) { |
| 1038 _json["unit"] = _value; | 1040 _json["unit"] = _value; |
| 1039 } | 1041 } |
| 1040 } | 1042 } |
| 1041 | 1043 |
| 1042 void set typeParameters(List<Object> _value) { | 1044 void set typeParameters(List<UnlinkedTypeParamBuilder> _value) { |
| 1043 assert(!_json.containsKey("typeParameters")); | 1045 assert(!_json.containsKey("typeParameters")); |
| 1044 if (_value != null || _value.isEmpty) { | 1046 if (_value != null || _value.isEmpty) { |
| 1045 _json["typeParameters"] = _value.toList(); | 1047 _json["typeParameters"] = _value.map((b) => b.finish()).toList(); |
| 1046 } | 1048 } |
| 1047 } | 1049 } |
| 1048 | 1050 |
| 1049 void set returnType(Object _value) { | 1051 void set returnType(UnlinkedTypeRefBuilder _value) { |
| 1050 assert(!_json.containsKey("returnType")); | 1052 assert(!_json.containsKey("returnType")); |
| 1051 if (_value != null) { | 1053 if (_value != null) { |
| 1052 _json["returnType"] = _value; | 1054 _json["returnType"] = _value.finish(); |
| 1053 } | 1055 } |
| 1054 } | 1056 } |
| 1055 | 1057 |
| 1056 void set parameters(List<Object> _value) { | 1058 void set parameters(List<UnlinkedParamBuilder> _value) { |
| 1057 assert(!_json.containsKey("parameters")); | 1059 assert(!_json.containsKey("parameters")); |
| 1058 if (_value != null || _value.isEmpty) { | 1060 if (_value != null || _value.isEmpty) { |
| 1059 _json["parameters"] = _value.toList(); | 1061 _json["parameters"] = _value.map((b) => b.finish()).toList(); |
| 1060 } | 1062 } |
| 1061 } | 1063 } |
| 1062 | 1064 |
| 1063 Object finish() => _json; | 1065 Map finish() => _json; |
| 1064 } | 1066 } |
| 1065 | 1067 |
| 1066 Object encodeUnlinkedTypedef(builder.BuilderContext builderContext, {String name
, int unit, List<Object> typeParameters, Object returnType, List<Object> paramet
ers}) { | 1068 UnlinkedTypedefBuilder encodeUnlinkedTypedef(builder.BuilderContext builderConte
xt, {String name, int unit, List<UnlinkedTypeParamBuilder> typeParameters, Unlin
kedTypeRefBuilder returnType, List<UnlinkedParamBuilder> parameters}) { |
| 1067 UnlinkedTypedefBuilder builder = new UnlinkedTypedefBuilder(builderContext); | 1069 UnlinkedTypedefBuilder builder = new UnlinkedTypedefBuilder(builderContext); |
| 1068 builder.name = name; | 1070 builder.name = name; |
| 1069 builder.unit = unit; | 1071 builder.unit = unit; |
| 1070 builder.typeParameters = typeParameters; | 1072 builder.typeParameters = typeParameters; |
| 1071 builder.returnType = returnType; | 1073 builder.returnType = returnType; |
| 1072 builder.parameters = parameters; | 1074 builder.parameters = parameters; |
| 1073 return builder.finish(); | 1075 return builder; |
| 1074 } | 1076 } |
| 1075 | 1077 |
| 1076 class UnlinkedTypeParam { | 1078 class UnlinkedTypeParam { |
| 1077 String _name; | 1079 String _name; |
| 1078 UnlinkedTypeRef _bound; | 1080 UnlinkedTypeRef _bound; |
| 1079 | 1081 |
| 1080 UnlinkedTypeParam.fromJson(Map json) | 1082 UnlinkedTypeParam.fromJson(Map json) |
| 1081 : _name = json["name"], | 1083 : _name = json["name"], |
| 1082 _bound = json["bound"] == null ? null : new UnlinkedTypeRef.fromJson(json[
"bound"]); | 1084 _bound = json["bound"] == null ? null : new UnlinkedTypeRef.fromJson(json[
"bound"]); |
| 1083 | 1085 |
| 1084 String get name => _name ?? ''; | 1086 String get name => _name ?? ''; |
| 1085 UnlinkedTypeRef get bound => _bound; | 1087 UnlinkedTypeRef get bound => _bound; |
| 1086 } | 1088 } |
| 1087 | 1089 |
| 1088 class UnlinkedTypeParamBuilder { | 1090 class UnlinkedTypeParamBuilder { |
| 1089 final Map _json = {}; | 1091 final Map _json = {}; |
| 1090 | 1092 |
| 1091 UnlinkedTypeParamBuilder(builder.BuilderContext context); | 1093 UnlinkedTypeParamBuilder(builder.BuilderContext context); |
| 1092 | 1094 |
| 1093 void set name(String _value) { | 1095 void set name(String _value) { |
| 1094 assert(!_json.containsKey("name")); | 1096 assert(!_json.containsKey("name")); |
| 1095 if (_value != null) { | 1097 if (_value != null) { |
| 1096 _json["name"] = _value; | 1098 _json["name"] = _value; |
| 1097 } | 1099 } |
| 1098 } | 1100 } |
| 1099 | 1101 |
| 1100 void set bound(Object _value) { | 1102 void set bound(UnlinkedTypeRefBuilder _value) { |
| 1101 assert(!_json.containsKey("bound")); | 1103 assert(!_json.containsKey("bound")); |
| 1102 if (_value != null) { | 1104 if (_value != null) { |
| 1103 _json["bound"] = _value; | 1105 _json["bound"] = _value.finish(); |
| 1104 } | 1106 } |
| 1105 } | 1107 } |
| 1106 | 1108 |
| 1107 Object finish() => _json; | 1109 Map finish() => _json; |
| 1108 } | 1110 } |
| 1109 | 1111 |
| 1110 Object encodeUnlinkedTypeParam(builder.BuilderContext builderContext, {String na
me, Object bound}) { | 1112 UnlinkedTypeParamBuilder encodeUnlinkedTypeParam(builder.BuilderContext builderC
ontext, {String name, UnlinkedTypeRefBuilder bound}) { |
| 1111 UnlinkedTypeParamBuilder builder = new UnlinkedTypeParamBuilder(builderContext
); | 1113 UnlinkedTypeParamBuilder builder = new UnlinkedTypeParamBuilder(builderContext
); |
| 1112 builder.name = name; | 1114 builder.name = name; |
| 1113 builder.bound = bound; | 1115 builder.bound = bound; |
| 1114 return builder.finish(); | 1116 return builder; |
| 1115 } | 1117 } |
| 1116 | 1118 |
| 1117 class UnlinkedTypeRef { | 1119 class UnlinkedTypeRef { |
| 1118 int _reference; | 1120 int _reference; |
| 1119 int _paramReference; | 1121 int _paramReference; |
| 1120 List<UnlinkedTypeRef> _typeArguments; | 1122 List<UnlinkedTypeRef> _typeArguments; |
| 1121 | 1123 |
| 1122 UnlinkedTypeRef.fromJson(Map json) | 1124 UnlinkedTypeRef.fromJson(Map json) |
| 1123 : _reference = json["reference"], | 1125 : _reference = json["reference"], |
| 1124 _paramReference = json["paramReference"], | 1126 _paramReference = json["paramReference"], |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1141 } | 1143 } |
| 1142 } | 1144 } |
| 1143 | 1145 |
| 1144 void set paramReference(int _value) { | 1146 void set paramReference(int _value) { |
| 1145 assert(!_json.containsKey("paramReference")); | 1147 assert(!_json.containsKey("paramReference")); |
| 1146 if (_value != null) { | 1148 if (_value != null) { |
| 1147 _json["paramReference"] = _value; | 1149 _json["paramReference"] = _value; |
| 1148 } | 1150 } |
| 1149 } | 1151 } |
| 1150 | 1152 |
| 1151 void set typeArguments(List<Object> _value) { | 1153 void set typeArguments(List<UnlinkedTypeRefBuilder> _value) { |
| 1152 assert(!_json.containsKey("typeArguments")); | 1154 assert(!_json.containsKey("typeArguments")); |
| 1153 if (_value != null || _value.isEmpty) { | 1155 if (_value != null || _value.isEmpty) { |
| 1154 _json["typeArguments"] = _value.toList(); | 1156 _json["typeArguments"] = _value.map((b) => b.finish()).toList(); |
| 1155 } | 1157 } |
| 1156 } | 1158 } |
| 1157 | 1159 |
| 1158 Object finish() => _json; | 1160 Map finish() => _json; |
| 1159 } | 1161 } |
| 1160 | 1162 |
| 1161 Object encodeUnlinkedTypeRef(builder.BuilderContext builderContext, {int referen
ce, int paramReference, List<Object> typeArguments}) { | 1163 UnlinkedTypeRefBuilder encodeUnlinkedTypeRef(builder.BuilderContext builderConte
xt, {int reference, int paramReference, List<UnlinkedTypeRefBuilder> typeArgumen
ts}) { |
| 1162 UnlinkedTypeRefBuilder builder = new UnlinkedTypeRefBuilder(builderContext); | 1164 UnlinkedTypeRefBuilder builder = new UnlinkedTypeRefBuilder(builderContext); |
| 1163 builder.reference = reference; | 1165 builder.reference = reference; |
| 1164 builder.paramReference = paramReference; | 1166 builder.paramReference = paramReference; |
| 1165 builder.typeArguments = typeArguments; | 1167 builder.typeArguments = typeArguments; |
| 1166 return builder.finish(); | 1168 return builder; |
| 1167 } | 1169 } |
| 1168 | 1170 |
| 1169 class UnlinkedUnit { | 1171 class UnlinkedUnit { |
| 1170 String _uri; | 1172 String _uri; |
| 1171 | 1173 |
| 1172 UnlinkedUnit.fromJson(Map json) | 1174 UnlinkedUnit.fromJson(Map json) |
| 1173 : _uri = json["uri"]; | 1175 : _uri = json["uri"]; |
| 1174 | 1176 |
| 1175 String get uri => _uri ?? ''; | 1177 String get uri => _uri ?? ''; |
| 1176 } | 1178 } |
| 1177 | 1179 |
| 1178 class UnlinkedUnitBuilder { | 1180 class UnlinkedUnitBuilder { |
| 1179 final Map _json = {}; | 1181 final Map _json = {}; |
| 1180 | 1182 |
| 1181 UnlinkedUnitBuilder(builder.BuilderContext context); | 1183 UnlinkedUnitBuilder(builder.BuilderContext context); |
| 1182 | 1184 |
| 1183 void set uri(String _value) { | 1185 void set uri(String _value) { |
| 1184 assert(!_json.containsKey("uri")); | 1186 assert(!_json.containsKey("uri")); |
| 1185 if (_value != null) { | 1187 if (_value != null) { |
| 1186 _json["uri"] = _value; | 1188 _json["uri"] = _value; |
| 1187 } | 1189 } |
| 1188 } | 1190 } |
| 1189 | 1191 |
| 1190 Object finish() => _json; | 1192 Map finish() => _json; |
| 1191 } | 1193 } |
| 1192 | 1194 |
| 1193 Object encodeUnlinkedUnit(builder.BuilderContext builderContext, {String uri}) { | 1195 UnlinkedUnitBuilder encodeUnlinkedUnit(builder.BuilderContext builderContext, {S
tring uri}) { |
| 1194 UnlinkedUnitBuilder builder = new UnlinkedUnitBuilder(builderContext); | 1196 UnlinkedUnitBuilder builder = new UnlinkedUnitBuilder(builderContext); |
| 1195 builder.uri = uri; | 1197 builder.uri = uri; |
| 1196 return builder.finish(); | 1198 return builder; |
| 1197 } | 1199 } |
| 1198 | 1200 |
| 1199 class UnlinkedVariable { | 1201 class UnlinkedVariable { |
| 1200 String _name; | 1202 String _name; |
| 1201 int _unit; | 1203 int _unit; |
| 1202 UnlinkedTypeRef _type; | 1204 UnlinkedTypeRef _type; |
| 1203 bool _isStatic; | 1205 bool _isStatic; |
| 1204 bool _isFinal; | 1206 bool _isFinal; |
| 1205 bool _isConst; | 1207 bool _isConst; |
| 1206 | 1208 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1232 } | 1234 } |
| 1233 } | 1235 } |
| 1234 | 1236 |
| 1235 void set unit(int _value) { | 1237 void set unit(int _value) { |
| 1236 assert(!_json.containsKey("unit")); | 1238 assert(!_json.containsKey("unit")); |
| 1237 if (_value != null) { | 1239 if (_value != null) { |
| 1238 _json["unit"] = _value; | 1240 _json["unit"] = _value; |
| 1239 } | 1241 } |
| 1240 } | 1242 } |
| 1241 | 1243 |
| 1242 void set type(Object _value) { | 1244 void set type(UnlinkedTypeRefBuilder _value) { |
| 1243 assert(!_json.containsKey("type")); | 1245 assert(!_json.containsKey("type")); |
| 1244 if (_value != null) { | 1246 if (_value != null) { |
| 1245 _json["type"] = _value; | 1247 _json["type"] = _value.finish(); |
| 1246 } | 1248 } |
| 1247 } | 1249 } |
| 1248 | 1250 |
| 1249 void set isStatic(bool _value) { | 1251 void set isStatic(bool _value) { |
| 1250 assert(!_json.containsKey("isStatic")); | 1252 assert(!_json.containsKey("isStatic")); |
| 1251 if (_value != null) { | 1253 if (_value != null) { |
| 1252 _json["isStatic"] = _value; | 1254 _json["isStatic"] = _value; |
| 1253 } | 1255 } |
| 1254 } | 1256 } |
| 1255 | 1257 |
| 1256 void set isFinal(bool _value) { | 1258 void set isFinal(bool _value) { |
| 1257 assert(!_json.containsKey("isFinal")); | 1259 assert(!_json.containsKey("isFinal")); |
| 1258 if (_value != null) { | 1260 if (_value != null) { |
| 1259 _json["isFinal"] = _value; | 1261 _json["isFinal"] = _value; |
| 1260 } | 1262 } |
| 1261 } | 1263 } |
| 1262 | 1264 |
| 1263 void set isConst(bool _value) { | 1265 void set isConst(bool _value) { |
| 1264 assert(!_json.containsKey("isConst")); | 1266 assert(!_json.containsKey("isConst")); |
| 1265 if (_value != null) { | 1267 if (_value != null) { |
| 1266 _json["isConst"] = _value; | 1268 _json["isConst"] = _value; |
| 1267 } | 1269 } |
| 1268 } | 1270 } |
| 1269 | 1271 |
| 1270 Object finish() => _json; | 1272 Map finish() => _json; |
| 1271 } | 1273 } |
| 1272 | 1274 |
| 1273 Object encodeUnlinkedVariable(builder.BuilderContext builderContext, {String nam
e, int unit, Object type, bool isStatic, bool isFinal, bool isConst}) { | 1275 UnlinkedVariableBuilder encodeUnlinkedVariable(builder.BuilderContext builderCon
text, {String name, int unit, UnlinkedTypeRefBuilder type, bool isStatic, bool i
sFinal, bool isConst}) { |
| 1274 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); | 1276 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); |
| 1275 builder.name = name; | 1277 builder.name = name; |
| 1276 builder.unit = unit; | 1278 builder.unit = unit; |
| 1277 builder.type = type; | 1279 builder.type = type; |
| 1278 builder.isStatic = isStatic; | 1280 builder.isStatic = isStatic; |
| 1279 builder.isFinal = isFinal; | 1281 builder.isFinal = isFinal; |
| 1280 builder.isConst = isConst; | 1282 builder.isConst = isConst; |
| 1281 return builder.finish(); | 1283 return builder; |
| 1282 } | 1284 } |
| 1283 | 1285 |
| OLD | NEW |