@flock/wirespec 0.20.0-RC.8 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arrow-arrow-atomic.mjs +12 -12
- package/arrow-arrow-core.mjs +163 -163
- package/clikt-clikt-mordant.mjs +80 -80
- package/clikt-clikt-mordant.mjs.map +1 -1
- package/clikt-clikt.mjs +1575 -1575
- package/clikt-clikt.mjs.map +1 -1
- package/colormath-root-colormath.mjs +444 -444
- package/kotlin-kotlin-stdlib.mjs +2001 -1948
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlin-openapi-bindings.mjs +10254 -10254
- package/kotlin-rgxgen.mjs +1815 -1815
- package/kotlinx-io-kotlinx-io-core.mjs +440 -440
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +1890 -1890
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1576 -1576
- package/mordant-mordant.mjs +1362 -1362
- package/package.json +2 -2
- package/wirespec-src-compiler-core.mjs +1768 -2207
- package/wirespec-src-compiler-core.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-java.mjs +384 -1254
- package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-kotlin.mjs +366 -1065
- package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-python.mjs +400 -1422
- package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-rust.mjs +424 -422
- package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-scala.mjs +214 -189
- package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-typescript.mjs +529 -1409
- package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
- package/wirespec-src-compiler-emitters-wirespec.mjs +92 -86
- package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
- package/wirespec-src-compiler-ir.mjs +4476 -4329
- package/wirespec-src-compiler-ir.mjs.map +1 -1
- package/wirespec-src-compiler-lib.mjs +250 -1120
- package/wirespec-src-compiler-lib.mjs.map +1 -1
- package/wirespec-src-converter-avro.mjs +512 -512
- package/wirespec-src-converter-avro.mjs.map +1 -1
- package/wirespec-src-converter-openapi.mjs +756 -756
- package/wirespec-src-converter-openapi.mjs.map +1 -1
- package/wirespec-src-ide-lsp.mjs +1408 -1393
- package/wirespec-src-ide-lsp.mjs.map +1 -1
- package/wirespec-src-plugin-arguments.mjs +185 -245
- package/wirespec-src-plugin-arguments.mjs.map +1 -1
- package/wirespec-src-plugin-cli.mjs +102 -128
- package/wirespec-src-plugin-cli.mjs.map +1 -1
- package/wirespec-src-plugin-npm.d.mts +0 -104
- package/wirespec-src-plugin-npm.mjs +40 -40
- package/wirespec-src-plugin-npm.mjs.map +1 -1
- package/wirespec-src-tools-generator.mjs +34 -34
- package/wirespec-src-tools-generator.mjs.map +1 -1
|
@@ -1,117 +1,64 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
LanguageEmitterxhzgykhux3qm as LanguageEmitter,
|
|
4
|
-
Companion_instance1a2xqc448tlhh as Companion_instance,
|
|
5
|
-
Companion_instance2ryk3262e300f as Companion_instance_0,
|
|
6
|
-
FileExtension_Java_getInstance6j3tok5j3omd as FileExtension_Java_getInstance,
|
|
7
|
-
Emitted12h24rpo4uifw as Emitted,
|
|
8
|
-
plus3lrm73de10b42 as plus,
|
|
9
|
-
Companion_instancebcq57hoyp8c2 as Companion_instance_1,
|
|
10
|
-
Iterable29qbzfup67wqp as Iterable,
|
|
11
|
-
get_pathParamsf41cxx5qebxt as get_pathParams,
|
|
12
|
-
orNull2zq556ke3x99j as orNull,
|
|
13
|
-
Spacer_instance1p6915grp4mfk as Spacer_instance,
|
|
14
|
-
get_indexedPathParams2pzt0qs62068 as get_indexedPathParams,
|
|
15
|
-
distinctByStatus134zrt4nyr6p2 as distinctByStatus,
|
|
16
|
-
emit2koty5c8abmj3 as emit,
|
|
17
|
-
Paramvfwnys2w6aj1 as Param,
|
|
18
|
-
Literal331hu9r04vptz as Literal,
|
|
19
|
-
concatGenerics2esceo9p1a45k as concatGenerics,
|
|
20
|
-
fixStatus2l9jrn3538wpy as fixStatus,
|
|
21
|
-
spacer28p2fwyb64afn as spacer,
|
|
22
|
-
FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
|
|
23
|
-
DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
|
|
24
|
-
Unionccsavx6nrdr2 as Union,
|
|
25
|
-
Refined1lkzc0dg6wey7 as Refined,
|
|
26
|
-
Enum3l2iuc342kle6 as Enum,
|
|
27
|
-
Type12n1gx16iqtcu as Type,
|
|
28
|
-
plus14o24vdaiongg as plus_0,
|
|
29
|
-
Bytes_instance1o9u095wd3kx6 as Bytes_instance,
|
|
30
|
-
Boolean_instance237vwt01w3hs8 as Boolean_instance,
|
|
31
|
-
RegExpiyof7szm5zfu as RegExp_0,
|
|
32
|
-
String1czvr8pxnm6on as String_0,
|
|
33
|
-
Number1mui0heypwdhp as Number_0,
|
|
34
|
-
Integer39lqx4uc63u28 as Integer,
|
|
35
|
-
Primitive1i8my14jkp3nk as Primitive,
|
|
36
|
-
Custom1lu6o8txpimqz as Custom,
|
|
37
|
-
Anyv7qdq63z63rc as Any,
|
|
38
|
-
Unit2z95clvxm08vr as Unit,
|
|
39
|
-
Dict3g7w5wia7rncj as Dict,
|
|
40
|
-
Bytes3eoc50vgt1uem as Bytes,
|
|
41
|
-
Boolean1fpfi8m5jt3fg as Boolean_0,
|
|
42
|
-
Bound2mp7s0560derz as Bound,
|
|
43
|
-
TypeDefinitionEmitter18est4d94fpw8 as TypeDefinitionEmitter,
|
|
44
|
-
} from './wirespec-src-compiler-core.mjs';
|
|
45
|
-
import {
|
|
46
|
-
ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
|
|
47
|
-
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
2
|
+
split2bvyvnrlcifjv as split,
|
|
48
3
|
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
49
|
-
ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create
|
|
50
|
-
|
|
4
|
+
ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
|
|
5
|
+
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
6
|
+
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
51
7
|
joinToString1cxrrlmo0chqs as joinToString,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
toString1pkumu07cwy4m as toString,
|
|
56
|
-
trimMarginhyd3fsmh8iev as trimMargin,
|
|
57
|
-
protoOf180f3jzyo7rfj as protoOf,
|
|
58
|
-
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
|
|
59
|
-
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
60
|
-
listOfNotNull2woi2boe01ub4 as listOfNotNull,
|
|
61
|
-
isBlank1dvkhjjvox3p0 as isBlank,
|
|
62
|
-
ensureNotNull1e947j3ixpazm as ensureNotNull,
|
|
63
|
-
distinct10qe1scfdvu5k as distinct,
|
|
64
|
-
first3kg261hmihapu as first,
|
|
65
|
-
Char19o2r8palgjof as Char,
|
|
66
|
-
first58ocm7j58k3q as first_0,
|
|
67
|
-
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
68
|
-
toString3dhdjl9yf50de as toString_0,
|
|
69
|
-
substring3saq8ornu0luv as substring,
|
|
70
|
-
startsWith26w8qjqapeeq6 as startsWith,
|
|
71
|
-
split2bvyvnrlcifjv as split,
|
|
72
|
-
setOf45ia9pnfhe90 as setOf,
|
|
73
|
-
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
8
|
+
StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
|
|
9
|
+
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
10
|
+
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
74
11
|
isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
|
|
75
12
|
_Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
|
|
76
|
-
listOfvhqybd2zx248 as listOf,
|
|
77
|
-
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
78
|
-
asSequence3lsvgkvyzox0q as asSequence,
|
|
79
|
-
filter184huxd00uyfg as filter,
|
|
80
|
-
joinToStringooja5rkatz3u as joinToString_0,
|
|
81
13
|
firstOrNulltrxqttxfxqju as firstOrNull,
|
|
82
14
|
isDigit3mimrri4wkzop as isDigit,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
15
|
+
Char19o2r8palgjof as Char,
|
|
16
|
+
protoOf180f3jzyo7rfj as protoOf,
|
|
17
|
+
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
18
|
+
listOfvhqybd2zx248 as listOf,
|
|
86
19
|
emptyList1g2z5xcrvp2zy as emptyList,
|
|
20
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
21
|
+
ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
|
|
87
22
|
Paire9pteg33gng7 as Pair,
|
|
88
|
-
plus310ted5e4i90h as
|
|
23
|
+
plus310ted5e4i90h as plus,
|
|
24
|
+
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
25
|
+
startsWith26w8qjqapeeq6 as startsWith,
|
|
89
26
|
substringBefore3n7kj60w69hju as substringBefore,
|
|
90
27
|
listOf1jh22dvmctj1r as listOf_0,
|
|
91
|
-
plus20p0vtfmu0596 as
|
|
28
|
+
plus20p0vtfmu0596 as plus_0,
|
|
92
29
|
isInterface3d6p8outrmvmk as isInterface,
|
|
93
|
-
asSequence2phdjljfh9jhx as
|
|
30
|
+
asSequence2phdjljfh9jhx as asSequence,
|
|
94
31
|
filterNot56uwv8hfomaa as filterNot,
|
|
95
32
|
mapsbvh18eqox7a as map,
|
|
96
|
-
distinct17vua5ffe1cfv as
|
|
33
|
+
distinct17vua5ffe1cfv as distinct,
|
|
97
34
|
toListx6x8nvfmvvht as toList,
|
|
98
35
|
addAll1k27qatfgp3k5 as addAll,
|
|
99
36
|
HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
|
|
100
37
|
Collection1k04j3hzsbod0 as Collection,
|
|
38
|
+
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
101
39
|
equals2au1ep9vhcato as equals,
|
|
40
|
+
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
102
41
|
last1vo29oleiqj36 as last,
|
|
103
42
|
dropLast1vpiyky649o34 as dropLast,
|
|
104
43
|
to2cs3ny02qtbcb as to,
|
|
105
44
|
mapOf2zpbbmyqk8xpf as mapOf,
|
|
106
|
-
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
107
|
-
dropLastlqc2oyv04br0 as dropLast_0,
|
|
108
|
-
replace3le3ie7l9k8aq as replace,
|
|
109
45
|
} from './kotlin-kotlin-stdlib.mjs';
|
|
110
46
|
import {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
47
|
+
Companion_instancebcq57hoyp8c2 as Companion_instance,
|
|
48
|
+
Companion_instance1a2xqc448tlhh as Companion_instance_0,
|
|
49
|
+
Companion_instance2ryk3262e300f as Companion_instance_1,
|
|
50
|
+
FileExtension_Java_getInstance6j3tok5j3omd as FileExtension_Java_getInstance,
|
|
51
|
+
Unionccsavx6nrdr2 as Union,
|
|
52
|
+
Refined1lkzc0dg6wey7 as Refined,
|
|
53
|
+
Enum3l2iuc342kle6 as Enum,
|
|
54
|
+
Type12n1gx16iqtcu as Type,
|
|
55
|
+
plus14o24vdaiongg as plus_1,
|
|
56
|
+
importReferencesy4xv7r53sjjs as importReferences,
|
|
57
|
+
Paramvfwnys2w6aj1 as Param,
|
|
58
|
+
Literal331hu9r04vptz as Literal,
|
|
59
|
+
} from './wirespec-src-compiler-core.mjs';
|
|
114
60
|
import {
|
|
61
|
+
JavaGenerator_getInstancepty760x3tbfi as JavaGenerator_getInstance,
|
|
115
62
|
Nameoqr8dt2fim9d as Name,
|
|
116
63
|
FunctionCall30872kpnbr7op as FunctionCall,
|
|
117
64
|
transformChildren2mszeagj5nq4c as transformChildren,
|
|
@@ -119,15 +66,17 @@ import {
|
|
|
119
66
|
Package2tniq694j1763 as Package,
|
|
120
67
|
File3dimy4iqmuock as File,
|
|
121
68
|
transformChildrend9p91tpcqdkx as transformChildren_0,
|
|
122
|
-
|
|
69
|
+
Mainb4yvz4x0nrxd as Main,
|
|
70
|
+
Enumlszg09mwd24f as Enum_0,
|
|
71
|
+
Interface3pn84xq686t2r as Interface,
|
|
123
72
|
Namespace345pal554qu3j as Namespace,
|
|
73
|
+
Struct39wf79cwtn4ty as Struct,
|
|
124
74
|
import5uhkz67bd8tt as import_0,
|
|
125
75
|
function12vu2kapzno4w as function_0,
|
|
126
76
|
String_instance3uxvo48ki208u as String_instance,
|
|
127
77
|
VariableReference2vlynnhaw1i64 as VariableReference,
|
|
128
|
-
JavaGenerator_getInstancepty760x3tbfi as JavaGenerator_getInstance,
|
|
129
78
|
SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
|
|
130
|
-
|
|
79
|
+
convertClientServer1346neky3bhls as convertClientServer,
|
|
131
80
|
toGetterAccessors2z6mndbqwlczg as toGetterAccessors,
|
|
132
81
|
rawttvqxl50flj9 as raw,
|
|
133
82
|
convertnty9x0e63d0u as convert,
|
|
@@ -135,7 +84,7 @@ import {
|
|
|
135
84
|
TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
|
|
136
85
|
transform3eti8i2bqvifx as transform,
|
|
137
86
|
Elementitq62jg6fid3 as Element,
|
|
138
|
-
emitn3eihixilqyh as
|
|
87
|
+
emitn3eihixilqyh as emit,
|
|
139
88
|
prependImports32gcj3yb8voha as prependImports,
|
|
140
89
|
placeInPackage1ffljbk9me4ug as placeInPackage,
|
|
141
90
|
convertToGenerator2wzjrmaavxhph as convertToGenerator,
|
|
@@ -155,30 +104,27 @@ import {
|
|
|
155
104
|
emitEndpointClient1meajc90wf3el as emitEndpointClient,
|
|
156
105
|
emitClient32kfwzg2hm5vj as emitClient,
|
|
157
106
|
get_extensions31c4or738wbxz as get_extensions,
|
|
158
|
-
emit1oxjujel6f3jb as
|
|
159
|
-
emit3bzdcd0f6nwtj as
|
|
107
|
+
emit1oxjujel6f3jb as emit_0,
|
|
108
|
+
emit3bzdcd0f6nwtj as emit_1,
|
|
160
109
|
beforeGenerate3o8idb3hey1b0 as beforeGenerate,
|
|
161
110
|
IrEmitterh2m93ojzvkep as IrEmitter,
|
|
162
|
-
Dict22iqrhoo0g8et as
|
|
111
|
+
Dict22iqrhoo0g8et as Dict,
|
|
163
112
|
Array2goj74t0aak7b as Array_0,
|
|
164
113
|
Nullable3wjn6l6q3h6o as Nullable,
|
|
165
|
-
Custom2si7lto3wompr as
|
|
114
|
+
Custom2si7lto3wompr as Custom,
|
|
166
115
|
Unit_instanceyaei45a6t5rv as Unit_instance_0,
|
|
167
116
|
Any_instance2998xag3cdzh3 as Any_instance,
|
|
168
|
-
Bytes_instance3edm2lhbrwd51 as
|
|
169
|
-
Boolean_instance27opaqtiiiysz as
|
|
170
|
-
Number3azxs9q1cyulb as
|
|
171
|
-
Integer1uwg1wvo5lp6z as
|
|
117
|
+
Bytes_instance3edm2lhbrwd51 as Bytes_instance,
|
|
118
|
+
Boolean_instance27opaqtiiiysz as Boolean_instance,
|
|
119
|
+
Number3azxs9q1cyulb as Number_0,
|
|
120
|
+
Integer1uwg1wvo5lp6z as Integer,
|
|
172
121
|
structo1silz79n3nu as struct,
|
|
173
122
|
RawExpression2bo7ldfrptjia as RawExpression,
|
|
174
123
|
TypeDescriptor1hvcpxrtxcqsx as TypeDescriptor,
|
|
175
124
|
convert2loxpwk8n2r8c as convert_5,
|
|
176
125
|
Custom_init_$Create$2enn7oyj71j1t as Custom_init_$Create$,
|
|
177
126
|
Function21cuq8qizkin7 as Function,
|
|
178
|
-
plusd54zq6f7l8fy as plus_3,
|
|
179
|
-
Struct39wf79cwtn4ty as Struct,
|
|
180
127
|
RawElement2yts1x2rbem1g as RawElement,
|
|
181
|
-
Interface3pn84xq686t2r as Interface,
|
|
182
128
|
Assignment3kcxc8wlcbmkn as Assignment,
|
|
183
129
|
ReturnStatement29qlfkn9kpy10 as ReturnStatement,
|
|
184
130
|
Wildcard_instance2ga1ytfwj78ra as Wildcard_instance,
|
|
@@ -187,813 +133,21 @@ import {
|
|
|
187
133
|
//region block: imports
|
|
188
134
|
//endregion
|
|
189
135
|
//region block: pre-declaration
|
|
190
|
-
function emit_3(type, module_0) {
|
|
191
|
-
var tmp = this.or(type.mp_1);
|
|
192
|
-
var tmp_0 = this.mq(type.np_1);
|
|
193
|
-
// Inline function 'kotlin.run' call
|
|
194
|
-
var $this$run = type.op_1;
|
|
195
|
-
var tmp_1;
|
|
196
|
-
if ($this$run.r()) {
|
|
197
|
-
tmp_1 = '';
|
|
198
|
-
} else {
|
|
199
|
-
tmp_1 = ' implements ' + joinToString($this$run, ', ', VOID, VOID, VOID, VOID, JavaTypeDefinitionEmitter$emit$lambda(this));
|
|
200
|
-
}
|
|
201
|
-
var tmp$ret$1 = tmp_1;
|
|
202
|
-
return trimMargin('\n |public record ' + tmp + ' (\n |' + tmp_0 + '\n |)' + tmp$ret$1 + ' {\n |};\n |\n ');
|
|
203
|
-
}
|
|
204
|
-
function emit_4(_this__u8e3s4) {
|
|
205
|
-
return dropLast_0(joinToString(_this__u8e3s4.jp_1, '\n', VOID, VOID, VOID, VOID, JavaTypeDefinitionEmitter$emit$lambda_0(this)), 1);
|
|
206
|
-
}
|
|
207
|
-
function emit_5(_this__u8e3s4) {
|
|
208
|
-
return this.oq(_this__u8e3s4.sp_1) + ' ' + this.or(_this__u8e3s4.rp_1);
|
|
209
|
-
}
|
|
210
|
-
function emit_6(_this__u8e3s4) {
|
|
211
|
-
// Inline function 'kotlin.let' call
|
|
212
|
-
var it = emitType(this, _this__u8e3s4);
|
|
213
|
-
return _this__u8e3s4.uu() ? 'java.util.Optional<' + it + '>' : it;
|
|
214
|
-
}
|
|
215
|
-
function emitRoot(_this__u8e3s4, void_0) {
|
|
216
|
-
var tmp;
|
|
217
|
-
if (_this__u8e3s4 instanceof Dict) {
|
|
218
|
-
tmp = this.y1w(_this__u8e3s4.so_1);
|
|
219
|
-
} else {
|
|
220
|
-
if (_this__u8e3s4 instanceof Iterable) {
|
|
221
|
-
tmp = this.y1w(_this__u8e3s4.po_1);
|
|
222
|
-
} else {
|
|
223
|
-
if (_this__u8e3s4 instanceof Unit) {
|
|
224
|
-
tmp = void_0;
|
|
225
|
-
} else {
|
|
226
|
-
if (_this__u8e3s4 instanceof Any) {
|
|
227
|
-
tmp = emitType(this, _this__u8e3s4);
|
|
228
|
-
} else {
|
|
229
|
-
if (_this__u8e3s4 instanceof Custom) {
|
|
230
|
-
tmp = emitType(this, _this__u8e3s4);
|
|
231
|
-
} else {
|
|
232
|
-
if (_this__u8e3s4 instanceof Primitive) {
|
|
233
|
-
tmp = emitType(this, _this__u8e3s4);
|
|
234
|
-
} else {
|
|
235
|
-
if (_this__u8e3s4 == null) {
|
|
236
|
-
tmp = void_0;
|
|
237
|
-
} else {
|
|
238
|
-
noWhenBranchMatchedException();
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return tmp;
|
|
247
|
-
}
|
|
248
|
-
function emitRoot$default(_this__u8e3s4, void_0, $super) {
|
|
249
|
-
void_0 = void_0 === VOID ? 'void' : void_0;
|
|
250
|
-
return $super === VOID ? this.z1w(_this__u8e3s4, void_0) : emitRoot(_this__u8e3s4, void_0);
|
|
251
|
-
}
|
|
252
|
-
function emit_7(_this__u8e3s4) {
|
|
253
|
-
var tmp;
|
|
254
|
-
if (_this__u8e3s4 instanceof RegExp_0) {
|
|
255
|
-
tmp = 'return java.util.regex.Pattern.compile("' + replace(this.qq(_this__u8e3s4.qt_1), '\\', '\\\\') + '").matcher(value).find();';
|
|
256
|
-
} else {
|
|
257
|
-
if (_this__u8e3s4 instanceof Bound) {
|
|
258
|
-
var tmp1_safe_receiver = _this__u8e3s4.gu_1;
|
|
259
|
-
var tmp_0;
|
|
260
|
-
if (tmp1_safe_receiver == null) {
|
|
261
|
-
tmp_0 = null;
|
|
262
|
-
} else {
|
|
263
|
-
// Inline function 'kotlin.let' call
|
|
264
|
-
tmp_0 = tmp1_safe_receiver + ' < value';
|
|
265
|
-
}
|
|
266
|
-
var minCheck = tmp_0;
|
|
267
|
-
var tmp2_safe_receiver = _this__u8e3s4.hu_1;
|
|
268
|
-
var tmp_1;
|
|
269
|
-
if (tmp2_safe_receiver == null) {
|
|
270
|
-
tmp_1 = null;
|
|
271
|
-
} else {
|
|
272
|
-
// Inline function 'kotlin.let' call
|
|
273
|
-
tmp_1 = 'value < ' + tmp2_safe_receiver;
|
|
274
|
-
}
|
|
275
|
-
var maxCheck = tmp_1;
|
|
276
|
-
var checks = joinToString(listOfNotNull([minCheck, maxCheck]), ' && ');
|
|
277
|
-
var tmp_2;
|
|
278
|
-
// Inline function 'kotlin.text.isEmpty' call
|
|
279
|
-
if (charSequenceLength(checks) === 0) {
|
|
280
|
-
tmp_2 = 'true';
|
|
281
|
-
} else {
|
|
282
|
-
tmp_2 = checks;
|
|
283
|
-
}
|
|
284
|
-
tmp = 'return ' + tmp_2 + ';';
|
|
285
|
-
} else {
|
|
286
|
-
noWhenBranchMatchedException();
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
return tmp;
|
|
290
|
-
}
|
|
291
|
-
initMetadataForInterface(JavaTypeDefinitionEmitter, 'JavaTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter]);
|
|
292
|
-
function emit_8(channel) {
|
|
293
|
-
return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |@FunctionalInterface\n |public interface ' + this.or(channel.dp_1) + ' {\n | void invoke(' + emitFullyQualified(this, channel, channel.ep_1) + this.y1w(channel.ep_1) + ' message);\n |}\n |\n ');
|
|
294
|
-
}
|
|
295
|
-
initMetadataForInterface(JavaChannelDefinitionEmitter, 'JavaChannelDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
296
|
-
function emit_9(identifier) {
|
|
297
|
-
var tmp;
|
|
298
|
-
if (identifier instanceof DefinitionIdentifier) {
|
|
299
|
-
tmp = this.j1x(identifier.l1());
|
|
300
|
-
} else {
|
|
301
|
-
if (identifier instanceof FieldIdentifier) {
|
|
302
|
-
tmp = this.n1x(this.j1x(identifier.l1()));
|
|
303
|
-
} else {
|
|
304
|
-
noWhenBranchMatchedException();
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
return tmp;
|
|
308
|
-
}
|
|
309
|
-
function sanitizeSymbol(_this__u8e3s4) {
|
|
310
|
-
// Inline function 'kotlin.collections.mapIndexed' call
|
|
311
|
-
var this_0 = split(_this__u8e3s4, ['.', ' ', '-']);
|
|
312
|
-
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
313
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
314
|
-
var index = 0;
|
|
315
|
-
var _iterator__ex2g4s = this_0.t();
|
|
316
|
-
while (_iterator__ex2g4s.u()) {
|
|
317
|
-
var item = _iterator__ex2g4s.v();
|
|
318
|
-
var _unary__edvuaz = index;
|
|
319
|
-
index = _unary__edvuaz + 1 | 0;
|
|
320
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
|
|
321
|
-
destination.x(tmp$ret$0);
|
|
322
|
-
}
|
|
323
|
-
var tmp = asSequence(joinToString(destination, ''));
|
|
324
|
-
return this.m1x(joinToString_0(filter(tmp, JavaIdentifierEmitter$sanitizeSymbol$lambda), ''));
|
|
325
|
-
}
|
|
326
|
-
function sanitizeFirstIsDigit(_this__u8e3s4) {
|
|
327
|
-
var tmp;
|
|
328
|
-
var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
|
|
329
|
-
var tmp_0;
|
|
330
|
-
var tmp_1 = tmp0_safe_receiver;
|
|
331
|
-
if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
|
|
332
|
-
tmp_0 = null;
|
|
333
|
-
} else {
|
|
334
|
-
tmp_0 = isDigit(tmp0_safe_receiver);
|
|
335
|
-
}
|
|
336
|
-
if (tmp_0 === true) {
|
|
337
|
-
tmp = '_' + _this__u8e3s4;
|
|
338
|
-
} else {
|
|
339
|
-
tmp = _this__u8e3s4;
|
|
340
|
-
}
|
|
341
|
-
return tmp;
|
|
342
|
-
}
|
|
343
|
-
function sanitizeKeywords(_this__u8e3s4) {
|
|
344
|
-
return Companion_getInstance_0().p1x_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
345
|
-
}
|
|
346
|
-
initMetadataForInterface(JavaIdentifierEmitter, 'JavaIdentifierEmitter');
|
|
347
|
-
function emit_10(enum_0, module_0) {
|
|
348
|
-
var tmp = this.or(enum_0.yr_1);
|
|
349
|
-
return trimMargin('\n |public enum ' + tmp + ' implements Wirespec.Enum {\n |' + spacer(joinToString(enum_0.zr_1, ',\n', VOID, VOID, VOID, VOID, JavaEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'public final String label;\n |' + Spacer_instance.toString() + this.or(enum_0.yr_1) + '(String label) {\n |' + Spacer_instance.is(2) + 'this.label = label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String toString() {\n |' + Spacer_instance.is(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String label() {\n |' + Spacer_instance.is(2) + 'return label;\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
350
|
-
}
|
|
351
|
-
initMetadataForInterface(JavaEnumDefinitionEmitter, 'JavaEnumDefinitionEmitter', VOID, VOID, [JavaIdentifierEmitter]);
|
|
352
|
-
function emit_11(refined) {
|
|
353
|
-
return trimMargin('\n |public record ' + this.or(refined.tr_1) + ' (' + this.oq(refined.ur_1) + ' value) implements Wirespec.Refined<' + this.oq(refined.ur_1) + '> {\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public String toString() { return value.toString(); }\n |' + Spacer_instance.toString() + 'public Boolean validate() {\n |' + Spacer_instance.toString() + Spacer_instance.toString() + this.cs(refined) + '\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + '@Override\n |' + Spacer_instance.toString() + 'public ' + this.oq(refined.ur_1) + ' value() { return value; }\n |}\n |\n ');
|
|
354
|
-
}
|
|
355
|
-
function emitValidator(_this__u8e3s4) {
|
|
356
|
-
var defaultReturn = 'return true;';
|
|
357
|
-
var type = _this__u8e3s4.ur_1.gv_1;
|
|
358
|
-
var tmp;
|
|
359
|
-
if (type instanceof Integer) {
|
|
360
|
-
var tmp0_safe_receiver = type.lu_1;
|
|
361
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.pq(tmp0_safe_receiver);
|
|
362
|
-
tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
|
|
363
|
-
} else {
|
|
364
|
-
if (type instanceof Number_0) {
|
|
365
|
-
var tmp2_safe_receiver = type.ou_1;
|
|
366
|
-
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.pq(tmp2_safe_receiver);
|
|
367
|
-
tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
|
|
368
|
-
} else {
|
|
369
|
-
if (type instanceof String_0) {
|
|
370
|
-
var tmp4_safe_receiver = type.iu_1;
|
|
371
|
-
var tmp_0;
|
|
372
|
-
var tmp_1 = tmp4_safe_receiver;
|
|
373
|
-
if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
|
|
374
|
-
tmp_0 = null;
|
|
375
|
-
} else {
|
|
376
|
-
tmp_0 = this.pq(new RegExp_0(tmp4_safe_receiver));
|
|
377
|
-
}
|
|
378
|
-
var tmp5_elvis_lhs = tmp_0;
|
|
379
|
-
tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
|
|
380
|
-
} else {
|
|
381
|
-
if (equals(type, Boolean_instance)) {
|
|
382
|
-
tmp = defaultReturn;
|
|
383
|
-
} else {
|
|
384
|
-
if (equals(type, Bytes_instance)) {
|
|
385
|
-
tmp = defaultReturn;
|
|
386
|
-
} else {
|
|
387
|
-
noWhenBranchMatchedException();
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return tmp;
|
|
394
|
-
}
|
|
395
|
-
initMetadataForInterface(JavaRefinedTypeDefinitionEmitter, 'JavaRefinedTypeDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
396
|
-
function emit_12(union) {
|
|
397
|
-
var tmp = this.or(union.hp_1);
|
|
398
|
-
return trimMargin('\n |public sealed interface ' + tmp + ' permits ' + joinToString(union.ip_1, VOID, VOID, VOID, VOID, VOID, JavaUnionDefinitionEmitter$emit$lambda) + ' {}\n |\n ');
|
|
399
|
-
}
|
|
400
|
-
initMetadataForInterface(JavaUnionDefinitionEmitter, 'JavaUnionDefinitionEmitter', VOID, VOID, [JavaIdentifierEmitter]);
|
|
401
|
-
function emit_13(endpoint) {
|
|
402
|
-
var tmp = emitImports_0(this, endpoint);
|
|
403
|
-
var tmp_0 = this.or(endpoint.vp_1);
|
|
404
|
-
var tmp_1 = get_pathParams(endpoint);
|
|
405
|
-
var tmp_2 = emitObject(this, tmp_1, 'Path', 'Wirespec.Path', JavaEndpointDefinitionEmitter$emit$lambda(this));
|
|
406
|
-
var tmp_3 = emitObject(this, endpoint.yp_1, 'Queries', 'Wirespec.Queries', JavaEndpointDefinitionEmitter$emit$lambda_0(this));
|
|
407
|
-
var tmp_4 = emitObject(this, endpoint.zp_1, 'RequestHeaders', 'Wirespec.Request.Headers', JavaEndpointDefinitionEmitter$emit$lambda_1(this));
|
|
408
|
-
var tmp_5 = this.k1x(first_0(endpoint.aq_1), endpoint);
|
|
409
|
-
var tmp_6 = Spacer_instance.toString();
|
|
410
|
-
var tmp_7 = emitStatusInterfaces(this, endpoint);
|
|
411
|
-
var tmp_8 = emitResponseInterfaces(this, endpoint);
|
|
412
|
-
var tmp_9 = distinctByStatus(endpoint.bq_1);
|
|
413
|
-
var tmp_10 = joinToString(tmp_9, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_2(this));
|
|
414
|
-
var tmp_11 = Spacer_instance.toString();
|
|
415
|
-
var tmp_12 = emitRequestFunctions(this, first_0(endpoint.aq_1), endpoint);
|
|
416
|
-
var tmp_13 = Spacer_instance.is(2);
|
|
417
|
-
var tmp_14 = distinctByStatus(endpoint.bq_1);
|
|
418
|
-
var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_3(this));
|
|
419
|
-
var tmp_16 = Spacer_instance.is(3);
|
|
420
|
-
var tmp_17 = Spacer_instance.is(2);
|
|
421
|
-
var tmp_18 = Spacer_instance.is(2);
|
|
422
|
-
var tmp_19 = emitFromResponse(this, endpoint);
|
|
423
|
-
var tmp_20 = Spacer_instance.is(2);
|
|
424
|
-
var tmp_21 = Spacer_instance.is(2);
|
|
425
|
-
var tmp_22 = this.o1x(endpoint);
|
|
426
|
-
var tmp_23 = Spacer_instance.is(2);
|
|
427
|
-
var tmp_24 = Spacer_instance.is(3);
|
|
428
|
-
return trimMargin('\n |' + tmp + '\n |\n |public interface ' + tmp_0 + ' extends Wirespec.Endpoint {\n |' + tmp_2 + '\n |\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + 'sealed interface Response<T> extends Wirespec.Response<T> {}\n |' + tmp_7 + '\n |' + tmp_8 + '\n |\n |' + tmp_10 + '\n |\n |' + tmp_11 + 'interface Handler extends Wirespec.Handler {\n |\n |' + tmp_12 + '\n |\n |' + tmp_13 + 'static Wirespec.RawResponse toResponse(Wirespec.Serializer serialization, Response<?> response) {\n |' + tmp_15 + '\n |' + tmp_16 + 'else { throw new IllegalStateException("Cannot match response with status: " + response.status());}\n |' + tmp_17 + '}\n |\n |' + tmp_18 + 'static Response<?> fromResponse(Wirespec.Deserializer serialization, Wirespec.RawResponse response) {\n |' + tmp_19 + '\n |' + tmp_20 + '}\n |\n |' + tmp_21 + tmp_22 + '\n |' + tmp_23 + 'class Handlers implements Wirespec.Server<Request, Response<?>>, Wirespec.Client<Request, Response<?>> {\n |' + tmp_24 + '@Override public String getPathTemplate() { return "/' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_4) + '"; }\n |' + Spacer_instance.is(3) + '@Override public String getMethod() { return "' + endpoint.wp_1.toString() + '"; }\n |' + Spacer_instance.is(3) + '@Override public Wirespec.ServerEdge<Request, Response<?>> getServer(Wirespec.Serialization serialization) {\n |' + Spacer_instance.is(4) + 'return new Wirespec.ServerEdge<>() {\n |' + Spacer_instance.is(5) + '@Override public Request from(Wirespec.RawRequest request) { return fromRequest(serialization, request); }\n |' + Spacer_instance.is(5) + '@Override public Wirespec.RawResponse to(Response<?> response) { return toResponse(serialization, response); }\n |' + Spacer_instance.is(4) + '};\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(3) + '@Override public Wirespec.ClientEdge<Request, Response<?>> getClient(Wirespec.Serialization serialization) {\n |' + Spacer_instance.is(4) + 'return new Wirespec.ClientEdge<>() {\n |' + Spacer_instance.is(5) + '@Override public Wirespec.RawRequest to(Request request) { return toRequest(serialization, request); }\n |' + Spacer_instance.is(5) + '@Override public Response<?> from(Wirespec.RawResponse response) { return fromResponse(serialization, response); }\n |' + Spacer_instance.is(4) + '};\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
429
|
-
}
|
|
430
|
-
function emitHandleFunction(endpoint) {
|
|
431
|
-
return 'java.util.concurrent.CompletableFuture<Response<?>> ' + Companion_instance_1.gr(this.or(endpoint.vp_1)) + '(Request request);';
|
|
432
|
-
}
|
|
433
|
-
function emit_14(_this__u8e3s4, endpoint) {
|
|
434
|
-
return trimMargin('\n |' + Spacer_instance.toString() + 'record Request (\n |' + Spacer_instance.is(2) + 'Path path,\n |' + Spacer_instance.is(2) + 'Wirespec.Method method,\n |' + Spacer_instance.is(2) + 'Queries queries,\n |' + Spacer_instance.is(2) + 'RequestHeaders headers,\n |' + Spacer_instance.is(2) + emit_16(this, _this__u8e3s4.eq_1) + ' body\n |' + Spacer_instance.toString() + ') implements Wirespec.Request<' + emit_16(this, _this__u8e3s4.eq_1) + '> {\n |' + Spacer_instance.is(2) + emitConstructor(this, _this__u8e3s4, endpoint) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
435
|
-
}
|
|
436
|
-
function emit_15(_this__u8e3s4) {
|
|
437
|
-
var tmp = Spacer_instance.toString();
|
|
438
|
-
var tmp_0 = Companion_instance_1.fr(_this__u8e3s4.hq_1);
|
|
439
|
-
var tmp_1 = Spacer_instance.is(2);
|
|
440
|
-
var tmp_2 = Spacer_instance.is(2);
|
|
441
|
-
var tmp_3 = Spacer_instance.is(2);
|
|
442
|
-
var tmp_4 = emit_16(this, _this__u8e3s4.jq_1);
|
|
443
|
-
var tmp_5 = Spacer_instance.toString();
|
|
444
|
-
var tmp_6 = toString_0(first(_this__u8e3s4.hq_1));
|
|
445
|
-
var tmp_7 = emit_16(this, _this__u8e3s4.jq_1);
|
|
446
|
-
var tmp_8 = concatGenerics(emit_16(this, _this__u8e3s4.jq_1));
|
|
447
|
-
var tmp_9 = Spacer_instance.is(2);
|
|
448
|
-
var tmp_10 = Companion_instance_1.fr(_this__u8e3s4.hq_1);
|
|
449
|
-
var tmp_11 = orNull(joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_5(this)));
|
|
450
|
-
var tmp0_safe_receiver = _this__u8e3s4.jq_1;
|
|
451
|
-
var tmp_12;
|
|
452
|
-
if (tmp0_safe_receiver == null) {
|
|
453
|
-
tmp_12 = null;
|
|
454
|
-
} else {
|
|
455
|
-
// Inline function 'kotlin.let' call
|
|
456
|
-
tmp_12 = emit_16(this, tmp0_safe_receiver) + ' body';
|
|
457
|
-
}
|
|
458
|
-
var tmp_13 = joinToString(listOfNotNull([tmp_11, tmp_12]));
|
|
459
|
-
var tmp_14 = Spacer_instance.is(3);
|
|
460
|
-
var tmp_15 = fixStatus(_this__u8e3s4.hq_1);
|
|
461
|
-
// Inline function 'kotlin.let' call
|
|
462
|
-
var tmp_16 = 'new Headers(' + joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emit$lambda_6(this)) + ')';
|
|
463
|
-
var tmp_17 = _this__u8e3s4.jq_1 == null ? 'null' : 'body';
|
|
464
|
-
var tmp_18 = Spacer_instance.is(2);
|
|
465
|
-
var tmp_19 = Spacer_instance.is(1);
|
|
466
|
-
return trimMargin('\n |' + tmp + 'record Response' + tmp_0 + '(\n |' + tmp_1 + 'Integer status,\n |' + tmp_2 + 'Headers headers,\n |' + tmp_3 + tmp_4 + ' body\n |' + tmp_5 + ') implements Response' + tmp_6 + 'XX<' + tmp_7 + '>, Response' + tmp_8 + ' {\n |' + tmp_9 + 'public Response' + tmp_10 + '(' + tmp_13 + ') {\n |' + tmp_14 + 'this(' + tmp_15 + ', ' + tmp_16 + ', ' + tmp_17 + ');\n |' + tmp_18 + '}\n |' + tmp_19 + emitObject(this, _this__u8e3s4.iq_1, 'Headers', 'Wirespec.Response.Headers', JavaEndpointDefinitionEmitter$emit$lambda_7(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
|
|
467
|
-
}
|
|
468
|
-
initMetadataForInterface(JavaEndpointDefinitionEmitter, 'JavaEndpointDefinitionEmitter', VOID, VOID, [JavaTypeDefinitionEmitter]);
|
|
469
|
-
initMetadataForClass(JavaEmitter, 'JavaEmitter', JavaEmitter, LanguageEmitter, [JavaTypeDefinitionEmitter, JavaIdentifierEmitter, JavaChannelDefinitionEmitter, JavaEnumDefinitionEmitter, JavaRefinedTypeDefinitionEmitter, JavaUnionDefinitionEmitter, JavaEndpointDefinitionEmitter, LanguageEmitter]);
|
|
470
136
|
initMetadataForCompanion(Companion);
|
|
471
|
-
initMetadataForCompanion(Companion_0);
|
|
472
137
|
initMetadataForClass(JavaIrEmitter, 'JavaIrEmitter', JavaIrEmitter, VOID, [IrEmitter]);
|
|
473
|
-
initMetadataForObject(JavaShared, 'JavaShared');
|
|
474
138
|
//endregion
|
|
475
|
-
function
|
|
476
|
-
// Inline function 'kotlin.collections.filter' call
|
|
477
|
-
var tmp0 = importReferences(_this__u8e3s4);
|
|
478
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
479
|
-
var destination = ArrayList_init_$Create$();
|
|
480
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
481
|
-
while (_iterator__ex2g4s.u()) {
|
|
482
|
-
var element = _iterator__ex2g4s.v();
|
|
483
|
-
if (!(_this__u8e3s4.nr().l1() === element.cv_1)) {
|
|
484
|
-
destination.x(element);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
// Inline function 'kotlin.collections.map' call
|
|
488
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
489
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
490
|
-
var _iterator__ex2g4s_0 = destination.t();
|
|
491
|
-
while (_iterator__ex2g4s_0.u()) {
|
|
492
|
-
var item = _iterator__ex2g4s_0.v();
|
|
493
|
-
var tmp$ret$3 = 'import ' + $this.x1w().es_1 + '.model.' + item.cv_1 + ';';
|
|
494
|
-
destination_0.x(tmp$ret$3);
|
|
495
|
-
}
|
|
496
|
-
var tmp = destination_0;
|
|
497
|
-
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaChannelDefinitionEmitter$emitImports$lambda);
|
|
498
|
-
}
|
|
499
|
-
function emitFullyQualified($this, _this__u8e3s4, reference) {
|
|
500
|
-
var tmp;
|
|
501
|
-
if (_this__u8e3s4.nr().l1() === reference.l1()) {
|
|
502
|
-
tmp = $this.x1w().es_1 + '.model.';
|
|
503
|
-
} else {
|
|
504
|
-
tmp = '';
|
|
505
|
-
}
|
|
506
|
-
return tmp;
|
|
507
|
-
}
|
|
508
|
-
function JavaChannelDefinitionEmitter$emitImports$lambda(it) {
|
|
509
|
-
// Inline function 'kotlin.text.trimStart' call
|
|
510
|
-
return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
|
|
511
|
-
}
|
|
512
|
-
function JavaChannelDefinitionEmitter() {
|
|
513
|
-
}
|
|
514
|
-
function JavaEmitter(packageName, emitShared) {
|
|
515
|
-
packageName = packageName === VOID ? Companion_instance.ds('community.flock.wirespec.generated') : packageName;
|
|
516
|
-
emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
|
|
517
|
-
LanguageEmitter.call(this);
|
|
518
|
-
this.a1x_1 = packageName;
|
|
519
|
-
this.b1x_1 = emitShared;
|
|
520
|
-
this.c1x_1 = '\nimport community.flock.wirespec.java.Wirespec;\n';
|
|
521
|
-
this.d1x_1 = FileExtension_Java_getInstance();
|
|
522
|
-
this.e1x_1 = JavaShared_getInstance();
|
|
523
|
-
this.f1x_1 = '//';
|
|
524
|
-
}
|
|
525
|
-
protoOf(JavaEmitter).x1w = function () {
|
|
526
|
-
return this.a1x_1;
|
|
527
|
-
};
|
|
528
|
-
protoOf(JavaEmitter).vq = function () {
|
|
529
|
-
return this.d1x_1;
|
|
530
|
-
};
|
|
531
|
-
protoOf(JavaEmitter).g1x = function () {
|
|
532
|
-
return this.e1x_1;
|
|
533
|
-
};
|
|
534
|
-
protoOf(JavaEmitter).wq = function () {
|
|
535
|
-
return this.f1x_1;
|
|
536
|
-
};
|
|
537
|
-
protoOf(JavaEmitter).lr = function (module_0, logger) {
|
|
538
|
-
// Inline function 'kotlin.let' call
|
|
539
|
-
var it = protoOf(LanguageEmitter).lr.call(this, module_0, logger);
|
|
540
|
-
return this.b1x_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.ds('community.flock.wirespec.java').gs() + 'Wirespec', this.g1x().i1x_1)) : it;
|
|
541
|
-
};
|
|
542
|
-
protoOf(JavaEmitter).mr = function (definition, module_0, logger) {
|
|
543
|
-
// Inline function 'kotlin.let' call
|
|
544
|
-
var it = protoOf(LanguageEmitter).mr.call(this, definition, module_0, logger);
|
|
545
|
-
var subPackageName = plus(this.x1w(), definition);
|
|
546
|
-
var tmp = subPackageName.gs() + this.j1x(it.yo_1);
|
|
547
|
-
// Inline function 'kotlin.text.trimStart' call
|
|
548
|
-
var this_0 = trimMargin('\n |package ' + subPackageName.toString() + ';\n |' + (Companion_instance_1.hr(module_0) ? this.c1x_1 : '') + '\n |' + it.zo_1 + '\n ');
|
|
549
|
-
var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
|
|
550
|
-
return new Emitted(tmp, tmp$ret$0);
|
|
551
|
-
};
|
|
552
|
-
function emitGetType($this, _this__u8e3s4) {
|
|
553
|
-
return 'Wirespec.getType(' + $this.z1w(_this__u8e3s4, 'Void') + '.class, ' + emitGetTypeRaw($this, _this__u8e3s4) + ')';
|
|
554
|
-
}
|
|
555
|
-
function emitGetTypeRaw($this, _this__u8e3s4) {
|
|
556
|
-
var tmp;
|
|
557
|
-
var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : _this__u8e3s4.uu();
|
|
558
|
-
if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
|
|
559
|
-
tmp = 'java.util.Optional.class';
|
|
560
|
-
} else {
|
|
561
|
-
if (_this__u8e3s4 instanceof Iterable) {
|
|
562
|
-
tmp = 'java.util.List.class';
|
|
563
|
-
} else {
|
|
564
|
-
tmp = null;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
return tmp;
|
|
568
|
-
}
|
|
569
|
-
function emitConstructor($this, _this__u8e3s4, endpoint) {
|
|
570
|
-
var tmp = get_pathParams(endpoint);
|
|
571
|
-
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda($this)));
|
|
572
|
-
var tmp_1 = orNull(joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
|
|
573
|
-
var tmp_2 = orNull(joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
|
|
574
|
-
var tmp0_safe_receiver = _this__u8e3s4.eq_1;
|
|
575
|
-
var tmp_3;
|
|
576
|
-
if (tmp0_safe_receiver == null) {
|
|
577
|
-
tmp_3 = null;
|
|
578
|
-
} else {
|
|
579
|
-
// Inline function 'kotlin.let' call
|
|
580
|
-
tmp_3 = emit_16($this, tmp0_safe_receiver) + ' body';
|
|
581
|
-
}
|
|
582
|
-
var tmp_4 = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]));
|
|
583
|
-
var tmp_5 = Spacer_instance.is(3);
|
|
584
|
-
var tmp_6 = get_pathParams(endpoint);
|
|
585
|
-
// Inline function 'kotlin.let' call
|
|
586
|
-
var tmp$ret$3 = 'new Path(' + joinToString(tmp_6, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_2($this)) + ')';
|
|
587
|
-
var tmp1_elvis_lhs = orNull(tmp$ret$3);
|
|
588
|
-
var tmp_7 = tmp1_elvis_lhs == null ? 'new Path()' : tmp1_elvis_lhs;
|
|
589
|
-
var tmp_8 = 'Wirespec.Method.' + endpoint.wp_1.a3_1;
|
|
590
|
-
// Inline function 'kotlin.let' call
|
|
591
|
-
var tmp$ret$5 = 'new Queries(' + joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_3($this)) + ')';
|
|
592
|
-
var tmp2_elvis_lhs = orNull(tmp$ret$5);
|
|
593
|
-
var tmp_9 = tmp2_elvis_lhs == null ? 'new Queries()' : tmp2_elvis_lhs;
|
|
594
|
-
// Inline function 'kotlin.let' call
|
|
595
|
-
var tmp$ret$7 = 'new RequestHeaders(' + joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitConstructor$lambda_4($this)) + ')';
|
|
596
|
-
var tmp3_elvis_lhs = orNull(tmp$ret$7);
|
|
597
|
-
var tmp_10 = tmp3_elvis_lhs == null ? 'new RequestHeaders()' : tmp3_elvis_lhs;
|
|
598
|
-
var tmp_11;
|
|
599
|
-
if (_this__u8e3s4.eq_1 == null) {
|
|
600
|
-
tmp_11 = null;
|
|
601
|
-
} else {
|
|
602
|
-
// Inline function 'kotlin.let' call
|
|
603
|
-
tmp_11 = 'body';
|
|
604
|
-
}
|
|
605
|
-
var tmp5_elvis_lhs = tmp_11;
|
|
606
|
-
return 'public Request(' + tmp_4 + ') {\n' + tmp_5 + 'this(' + joinToString(listOfNotNull([tmp_7, tmp_8, tmp_9, tmp_10, tmp5_elvis_lhs == null ? 'null' : tmp5_elvis_lhs])) + ');\n' + Spacer_instance.is(2) + '}';
|
|
607
|
-
}
|
|
608
|
-
function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
|
|
609
|
-
var tmp = get_indexedPathParams(endpoint);
|
|
610
|
-
var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
|
|
611
|
-
var tmp_1 = orNull(joinToString(endpoint.yp_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
|
|
612
|
-
var tmp_2 = orNull(joinToString(endpoint.zp_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
|
|
613
|
-
var tmp0_safe_receiver = _this__u8e3s4.eq_1;
|
|
614
|
-
var tmp_3;
|
|
615
|
-
if (tmp0_safe_receiver == null) {
|
|
616
|
-
tmp_3 = null;
|
|
617
|
-
} else {
|
|
618
|
-
// Inline function 'kotlin.let' call
|
|
619
|
-
tmp_3 = Spacer_instance.is(4) + 'request.body().<' + emit_16($this, tmp0_safe_receiver) + '>map(body -> serialization.deserializeBody(body, ' + emitGetType($this, tmp0_safe_receiver.gq_1) + ')).orElse(null)';
|
|
620
|
-
}
|
|
621
|
-
// Inline function 'kotlin.let' call
|
|
622
|
-
var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
|
|
623
|
-
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.is(3);
|
|
624
|
-
}
|
|
625
|
-
function emitDeserializedParams_0($this, _this__u8e3s4) {
|
|
626
|
-
var tmp = orNull(joinToString(_this__u8e3s4.iq_1, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_2($this)));
|
|
627
|
-
var tmp0_safe_receiver = _this__u8e3s4.jq_1;
|
|
628
|
-
var tmp_0;
|
|
629
|
-
if (tmp0_safe_receiver == null) {
|
|
630
|
-
tmp_0 = null;
|
|
631
|
-
} else {
|
|
632
|
-
// Inline function 'kotlin.let' call
|
|
633
|
-
tmp_0 = Spacer_instance.is(5) + 'response.body().<' + emit_16($this, tmp0_safe_receiver) + '>map(body -> serialization.deserializeBody(body, ' + emitGetType($this, tmp0_safe_receiver.gq_1) + ')).orElse(null)';
|
|
634
|
-
}
|
|
635
|
-
// Inline function 'kotlin.let' call
|
|
636
|
-
var it = joinToString(listOfNotNull([tmp, tmp_0]), ',\n');
|
|
637
|
-
return isBlank(it) ? '' : '\n' + it + '\n' + Spacer_instance.is(4);
|
|
638
|
-
}
|
|
639
|
-
function emitSerialized($this, _this__u8e3s4) {
|
|
640
|
-
var tmp;
|
|
641
|
-
if (!(_this__u8e3s4.jq_1 == null)) {
|
|
642
|
-
tmp = 'java.util.Optional.ofNullable(serialization.serializeBody(r.body, ' + emitGetType($this, ensureNotNull(_this__u8e3s4.jq_1).gq_1) + '))';
|
|
643
|
-
} else {
|
|
644
|
-
tmp = 'java.util.Optional.empty()';
|
|
645
|
-
}
|
|
646
|
-
var body = tmp;
|
|
647
|
-
var tmp_0;
|
|
648
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
649
|
-
if (!_this__u8e3s4.iq_1.r()) {
|
|
650
|
-
tmp_0 = 'java.util.Map.ofEntries(' + joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitSerialized$lambda($this)) + ')';
|
|
651
|
-
} else {
|
|
652
|
-
tmp_0 = 'java.util.Collections.emptyMap()';
|
|
653
|
-
}
|
|
654
|
-
var headers = tmp_0;
|
|
655
|
-
return Spacer_instance.is(3) + 'if (response instanceof Response' + Companion_instance_1.fr(_this__u8e3s4.hq_1) + ' r) { return new Wirespec.RawResponse(r.status(), ' + headers + ', ' + body + '); }';
|
|
656
|
-
}
|
|
657
|
-
function emitDeserialized($this, _this__u8e3s4) {
|
|
658
|
-
return Spacer_instance.is(4) + 'case ' + _this__u8e3s4.hq_1 + ' -> new Response' + Companion_instance_1.fr(_this__u8e3s4.hq_1) + '(' + emitDeserializedParams_0($this, _this__u8e3s4) + ');';
|
|
659
|
-
}
|
|
660
|
-
function emitSerializedParams($this, _this__u8e3s4, fields) {
|
|
661
|
-
return 'java.util.Map.entry("' + _this__u8e3s4.rp_1.l1() + '", serialization.serializeParam(request.' + (fields === 'queries' ? 'queries' : 'headers') + '().' + $this.or(_this__u8e3s4.rp_1) + '(), ' + emitGetType($this, _this__u8e3s4.sp_1) + '))';
|
|
662
|
-
}
|
|
663
|
-
function emitDeserialized_0($this, _this__u8e3s4) {
|
|
664
|
-
return Spacer_instance.is(4) + 'serialization.deserializePath(request.path().get(' + _this__u8e3s4.te_1 + '), ' + emitGetType($this, _this__u8e3s4.ue_1.dq_1) + ')';
|
|
665
|
-
}
|
|
666
|
-
function emitDeserializedParams_1($this, _this__u8e3s4, fields, caseSensitive) {
|
|
667
|
-
var tmp;
|
|
668
|
-
if (caseSensitive) {
|
|
669
|
-
tmp = 'request.' + fields + '().getOrDefault("' + _this__u8e3s4.rp_1.l1() + '", java.util.Collections.emptyList())';
|
|
670
|
-
} else {
|
|
671
|
-
tmp = 'request.' + fields + '().entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase("' + _this__u8e3s4.rp_1.l1() + '")).findFirst().map(java.util.Map.Entry::getValue).orElse(java.util.Collections.emptyList())';
|
|
672
|
-
}
|
|
673
|
-
var valuesFromField = tmp;
|
|
674
|
-
return Spacer_instance.is(4) + 'serialization.<' + $this.oq(_this__u8e3s4.sp_1) + '>deserializeParam(' + valuesFromField + ', ' + emitGetType($this, _this__u8e3s4.sp_1) + ')';
|
|
675
|
-
}
|
|
676
|
-
function emitSerializedHeader($this, _this__u8e3s4) {
|
|
677
|
-
return 'java.util.Map.entry("' + _this__u8e3s4.rp_1.l1() + '", serialization.<' + $this.oq(_this__u8e3s4.sp_1) + '>serializeParam(r.headers().' + $this.or(_this__u8e3s4.rp_1) + '(), ' + emitGetType($this, _this__u8e3s4.sp_1) + '))';
|
|
678
|
-
}
|
|
679
|
-
function emitIdentifier($this, _this__u8e3s4) {
|
|
680
|
-
return 'serialization.serializePath(request.path().' + Companion_instance_1.gr($this.or(_this__u8e3s4.cq_1)) + '(), ' + emitGetType($this, _this__u8e3s4.dq_1) + ')';
|
|
681
|
-
}
|
|
682
|
-
function emit_16($this, _this__u8e3s4) {
|
|
683
|
-
var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.gq_1;
|
|
684
|
-
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.oq(tmp1_safe_receiver);
|
|
685
|
-
return tmp2_elvis_lhs == null ? 'Void' : tmp2_elvis_lhs;
|
|
686
|
-
}
|
|
687
|
-
function emit_17($this, _this__u8e3s4) {
|
|
688
|
-
return $this.oq(_this__u8e3s4.dq_1) + ' ' + $this.or(_this__u8e3s4.cq_1);
|
|
689
|
-
}
|
|
690
|
-
function emitImports_0($this, _this__u8e3s4) {
|
|
691
|
-
// Inline function 'kotlin.collections.filter' call
|
|
692
|
-
var tmp0 = importReferences(_this__u8e3s4);
|
|
693
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
694
|
-
var destination = ArrayList_init_$Create$();
|
|
695
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
696
|
-
while (_iterator__ex2g4s.u()) {
|
|
697
|
-
var element = _iterator__ex2g4s.v();
|
|
698
|
-
if (!(_this__u8e3s4.nr().l1() === element.cv_1)) {
|
|
699
|
-
destination.x(element);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
// Inline function 'kotlin.collections.map' call
|
|
703
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
704
|
-
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
705
|
-
var _iterator__ex2g4s_0 = destination.t();
|
|
706
|
-
while (_iterator__ex2g4s_0.u()) {
|
|
707
|
-
var item = _iterator__ex2g4s_0.v();
|
|
708
|
-
var tmp$ret$3 = 'import ' + $this.x1w().es_1 + '.model.' + item.cv_1 + ';';
|
|
709
|
-
destination_0.x(tmp$ret$3);
|
|
710
|
-
}
|
|
711
|
-
var tmp = destination_0;
|
|
712
|
-
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitImports$lambda);
|
|
713
|
-
}
|
|
714
|
-
function emitRequestFunctions($this, _this__u8e3s4, endpoint) {
|
|
715
|
-
var tmp = Spacer_instance.is(2);
|
|
716
|
-
var tmp_0 = Spacer_instance.is(3);
|
|
717
|
-
var tmp_1 = Spacer_instance.is(4);
|
|
718
|
-
var tmp_2 = Spacer_instance.is(4);
|
|
719
|
-
var tmp_3 = joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda($this));
|
|
720
|
-
var tmp_4 = Spacer_instance.is(4);
|
|
721
|
-
var tmp_5;
|
|
722
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
723
|
-
if (!endpoint.yp_1.r()) {
|
|
724
|
-
tmp_5 = 'java.util.Map.ofEntries(' + joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_0($this)) + ')';
|
|
725
|
-
} else {
|
|
726
|
-
tmp_5 = 'java.util.Collections.emptyMap()';
|
|
727
|
-
}
|
|
728
|
-
var tmp_6 = tmp_5;
|
|
729
|
-
var tmp_7 = Spacer_instance.is(4);
|
|
730
|
-
var tmp_8;
|
|
731
|
-
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
732
|
-
if (!endpoint.zp_1.r()) {
|
|
733
|
-
tmp_8 = 'java.util.Map.ofEntries(' + joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_1($this)) + ')';
|
|
734
|
-
} else {
|
|
735
|
-
tmp_8 = 'java.util.Collections.emptyMap()';
|
|
736
|
-
}
|
|
737
|
-
var tmp_9 = tmp_8;
|
|
738
|
-
var tmp_10 = Spacer_instance.is(4);
|
|
739
|
-
var tmp_11;
|
|
740
|
-
if (!(_this__u8e3s4.eq_1 == null)) {
|
|
741
|
-
var tmp0_safe_receiver = _this__u8e3s4.eq_1;
|
|
742
|
-
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gq_1;
|
|
743
|
-
tmp_11 = 'java.util.Optional.ofNullable(serialization.serializeBody(request.body(), ' + (tmp1_safe_receiver == null ? null : emitGetType($this, tmp1_safe_receiver)) + '))';
|
|
744
|
-
} else {
|
|
745
|
-
tmp_11 = 'java.util.Optional.empty()';
|
|
746
|
-
}
|
|
747
|
-
return trimMargin('\n |' + tmp + 'static Wirespec.RawRequest toRequest(Wirespec.Serializer serialization, Request request) {\n |' + tmp_0 + 'return new Wirespec.RawRequest(\n |' + tmp_1 + 'request.method().name(),\n |' + tmp_2 + 'java.util.List.of(' + tmp_3 + '),\n |' + tmp_4 + tmp_6 + ',\n |' + tmp_7 + tmp_9 + ',\n |' + tmp_10 + tmp_11 + '\n |' + Spacer_instance.is(3) + ');\n |' + Spacer_instance.is(2) + '}\n |\n |' + Spacer_instance.is(2) + 'static Request fromRequest(Wirespec.Deserializer serialization, Wirespec.RawRequest request) {\n |' + Spacer_instance.is(3) + 'return new Request(' + emitDeserializedParams($this, _this__u8e3s4, endpoint) + ');\n |' + Spacer_instance.is(2) + '}\n ');
|
|
748
|
-
}
|
|
749
|
-
function emitObject($this, _this__u8e3s4, name, extends_0, block) {
|
|
750
|
-
var tmp;
|
|
751
|
-
if (_this__u8e3s4.r()) {
|
|
752
|
-
tmp = Spacer_instance.toString() + 'static class ' + name + ' implements ' + extends_0 + ' {}';
|
|
753
|
-
} else {
|
|
754
|
-
var tmp_0 = Spacer_instance.toString();
|
|
755
|
-
tmp = trimMargin('\n |' + tmp_0 + 'public record ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitObject$lambda(block)) + '\n |' + Spacer_instance.toString() + ') implements ' + extends_0 + ' {}\n ');
|
|
756
|
-
}
|
|
757
|
-
return tmp;
|
|
758
|
-
}
|
|
759
|
-
function emitResponseInterfaces($this, _this__u8e3s4) {
|
|
760
|
-
// Inline function 'kotlin.collections.map' call
|
|
761
|
-
var this_0 = distinctByStatus(_this__u8e3s4.bq_1);
|
|
762
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
763
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
764
|
-
var _iterator__ex2g4s = this_0.t();
|
|
765
|
-
while (_iterator__ex2g4s.u()) {
|
|
766
|
-
var item = _iterator__ex2g4s.v();
|
|
767
|
-
var tmp$ret$0 = emit_16($this, item.jq_1);
|
|
768
|
-
destination.x(tmp$ret$0);
|
|
769
|
-
}
|
|
770
|
-
var tmp = distinct(destination);
|
|
771
|
-
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitResponseInterfaces$lambda);
|
|
772
|
-
}
|
|
773
|
-
function emitStatusInterfaces($this, _this__u8e3s4) {
|
|
774
|
-
// Inline function 'kotlin.collections.map' call
|
|
775
|
-
var this_0 = _this__u8e3s4.bq_1;
|
|
776
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
777
|
-
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
778
|
-
var _iterator__ex2g4s = this_0.t();
|
|
779
|
-
while (_iterator__ex2g4s.u()) {
|
|
780
|
-
var item = _iterator__ex2g4s.v();
|
|
781
|
-
var tmp$ret$0 = new Char(first(item.hq_1));
|
|
782
|
-
destination.x(tmp$ret$0);
|
|
783
|
-
}
|
|
784
|
-
var tmp = distinct(destination);
|
|
785
|
-
return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitStatusInterfaces$lambda);
|
|
786
|
-
}
|
|
787
|
-
function emitFromResponse($this, _this__u8e3s4) {
|
|
788
|
-
// Inline function 'kotlin.collections.filter' call
|
|
789
|
-
var tmp0 = distinctByStatus(_this__u8e3s4.bq_1);
|
|
790
|
-
// Inline function 'kotlin.collections.filterTo' call
|
|
791
|
-
var destination = ArrayList_init_$Create$();
|
|
792
|
-
var _iterator__ex2g4s = tmp0.t();
|
|
793
|
-
while (_iterator__ex2g4s.u()) {
|
|
794
|
-
var element = _iterator__ex2g4s.v();
|
|
795
|
-
if (Companion_instance_1.jr(element.hq_1)) {
|
|
796
|
-
destination.x(element);
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
var statusResponses = destination;
|
|
800
|
-
var tmp;
|
|
801
|
-
if (statusResponses.r()) {
|
|
802
|
-
tmp = trimMargin('\n |' + Spacer_instance.is(3) + 'throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n ');
|
|
803
|
-
} else if (statusResponses.a1() === 1) {
|
|
804
|
-
var response = first_0(statusResponses);
|
|
805
|
-
tmp = trimMargin('\n |' + Spacer_instance.is(3) + 'if (response.statusCode() == ' + response.hq_1 + ') {\n |' + Spacer_instance.is(4) + 'return new Response' + Companion_instance_1.fr(response.hq_1) + '(' + emitDeserializedParams_0($this, response) + ');\n |' + Spacer_instance.is(3) + '} else {\n |' + Spacer_instance.is(4) + 'throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n |' + Spacer_instance.is(3) + '}\n ');
|
|
806
|
-
} else {
|
|
807
|
-
var tmp_0 = Spacer_instance.is(3);
|
|
808
|
-
tmp = trimMargin('\n |' + tmp_0 + 'return switch (response.statusCode()) {\n |' + joinToString(statusResponses, '\n', VOID, VOID, VOID, VOID, JavaEndpointDefinitionEmitter$emitFromResponse$lambda($this)) + '\n |' + Spacer_instance.is(4) + 'default -> throw new IllegalStateException("Cannot match response with status: " + response.statusCode());\n |' + Spacer_instance.is(3) + '};\n ');
|
|
809
|
-
}
|
|
810
|
-
return tmp;
|
|
811
|
-
}
|
|
812
|
-
function JavaEndpointDefinitionEmitter$emit$lambda(this$0) {
|
|
813
|
-
return function (it) {
|
|
814
|
-
return emit_17(this$0, it);
|
|
815
|
-
};
|
|
816
|
-
}
|
|
817
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_0(this$0) {
|
|
818
|
-
return function (it) {
|
|
819
|
-
return this$0.nq(it);
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_1(this$0) {
|
|
823
|
-
return function (it) {
|
|
824
|
-
return this$0.nq(it);
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_2(this$0) {
|
|
828
|
-
return function (it) {
|
|
829
|
-
return this$0.l1x(it);
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_3(this$0) {
|
|
833
|
-
return function (it) {
|
|
834
|
-
return emitSerialized(this$0, it);
|
|
835
|
-
};
|
|
836
|
-
}
|
|
837
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_4(it) {
|
|
838
|
-
return emit(it);
|
|
839
|
-
}
|
|
840
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
|
|
841
|
-
return function (it) {
|
|
842
|
-
return emit_17(this$0, it);
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
|
|
846
|
-
return function (it) {
|
|
847
|
-
return this$0.nq(it);
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
|
|
851
|
-
return function (it) {
|
|
852
|
-
return this$0.nq(it);
|
|
853
|
-
};
|
|
854
|
-
}
|
|
855
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_2(this$0) {
|
|
856
|
-
return function (it) {
|
|
857
|
-
return this$0.or(it.cq_1);
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_3(this$0) {
|
|
861
|
-
return function (it) {
|
|
862
|
-
return this$0.or(it.rp_1);
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
function JavaEndpointDefinitionEmitter$emitConstructor$lambda_4(this$0) {
|
|
866
|
-
return function (it) {
|
|
867
|
-
return this$0.or(it.rp_1);
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
|
|
871
|
-
return function (it) {
|
|
872
|
-
return emitDeserialized_0(this$0, it);
|
|
873
|
-
};
|
|
874
|
-
}
|
|
875
|
-
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_0(this$0) {
|
|
876
|
-
return function (it) {
|
|
877
|
-
return emitDeserializedParams_1(this$0, it, 'queries', true);
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_1(this$0) {
|
|
881
|
-
return function (it) {
|
|
882
|
-
return emitDeserializedParams_1(this$0, it, 'headers', false);
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_5(this$0) {
|
|
886
|
-
return function (it) {
|
|
887
|
-
return this$0.nq(it);
|
|
888
|
-
};
|
|
889
|
-
}
|
|
890
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_6(this$0) {
|
|
891
|
-
return function (it) {
|
|
892
|
-
return this$0.or(it.rp_1);
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
function JavaEndpointDefinitionEmitter$emit$lambda_7(this$0) {
|
|
896
|
-
return function (it) {
|
|
897
|
-
return this$0.nq(it);
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
function JavaEndpointDefinitionEmitter$emitDeserializedParams$lambda_2(this$0) {
|
|
901
|
-
return function (it) {
|
|
902
|
-
return Spacer_instance.is(5) + 'serialization.<' + this$0.oq(it.sp_1) + '>deserializeParam(response.headers().entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase("' + it.rp_1.l1() + '")).findFirst().map(java.util.Map.Entry::getValue).orElse(java.util.Collections.emptyList()), ' + emitGetType(this$0, it.sp_1) + ')';
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
function JavaEndpointDefinitionEmitter$emitSerialized$lambda(this$0) {
|
|
906
|
-
return function (it) {
|
|
907
|
-
return emitSerializedHeader(this$0, it);
|
|
908
|
-
};
|
|
909
|
-
}
|
|
910
|
-
function JavaEndpointDefinitionEmitter$emitImports$lambda(it) {
|
|
911
|
-
// Inline function 'kotlin.text.trimStart' call
|
|
912
|
-
return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
|
|
913
|
-
}
|
|
914
|
-
function JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda(this$0) {
|
|
915
|
-
return function (it) {
|
|
916
|
-
var tmp;
|
|
917
|
-
if (it instanceof Literal) {
|
|
918
|
-
tmp = '"' + it.yq_1 + '"';
|
|
919
|
-
} else {
|
|
920
|
-
if (it instanceof Param) {
|
|
921
|
-
tmp = emitIdentifier(this$0, it);
|
|
922
|
-
} else {
|
|
923
|
-
noWhenBranchMatchedException();
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
return tmp;
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
function JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_0(this$0) {
|
|
930
|
-
return function (it) {
|
|
931
|
-
return emitSerializedParams(this$0, it, 'queries');
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
function JavaEndpointDefinitionEmitter$emitRequestFunctions$lambda_1(this$0) {
|
|
935
|
-
return function (it) {
|
|
936
|
-
return emitSerializedParams(this$0, it, 'headers');
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
function JavaEndpointDefinitionEmitter$emitObject$lambda($block) {
|
|
940
|
-
return function (it) {
|
|
941
|
-
return Spacer_instance.is(2) + $block(it);
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
function JavaEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
|
|
945
|
-
return Spacer_instance.toString() + 'sealed interface Response' + concatGenerics(it) + ' extends Response<' + it + '> {}';
|
|
946
|
-
}
|
|
947
|
-
function JavaEndpointDefinitionEmitter$emitStatusInterfaces$lambda(it) {
|
|
948
|
-
return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.h1_1) + 'XX<T> extends Response<T> {}';
|
|
949
|
-
}
|
|
950
|
-
function JavaEndpointDefinitionEmitter$emitFromResponse$lambda(this$0) {
|
|
951
|
-
return function (it) {
|
|
952
|
-
return emitDeserialized(this$0, it);
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
function JavaEndpointDefinitionEmitter() {
|
|
956
|
-
}
|
|
957
|
-
function sanitizeNegative($this, _this__u8e3s4) {
|
|
958
|
-
return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
|
|
959
|
-
}
|
|
960
|
-
function sanitizeEnum($this, _this__u8e3s4) {
|
|
961
|
-
return $this.n1x($this.m1x(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_')));
|
|
962
|
-
}
|
|
963
|
-
function JavaEnumDefinitionEmitter$emit$lambda(this$0) {
|
|
964
|
-
return function (it) {
|
|
965
|
-
return sanitizeEnum(this$0, it) + '("' + it + '")';
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
function JavaEnumDefinitionEmitter() {
|
|
969
|
-
}
|
|
970
|
-
function Companion() {
|
|
971
|
-
Companion_instance_2 = this;
|
|
972
|
-
this.p1x_1 = setOf(['abstract', 'continue', 'for', 'new', 'switch', 'assert', 'default', 'goto', 'package', 'synchronized', 'boolean', 'do', 'if', 'private', 'this', 'break', 'double', 'implements', 'protected', 'throw', 'byte', 'else', 'import', 'public', 'throws', 'case', 'enum', 'instanceof', 'return', 'transient', 'catch', 'extends', 'int', 'short', 'try', 'char', 'final', 'interface', 'static', 'void', 'class', 'finally', 'long', 'strictfp', 'volatile', 'const', 'float', 'native', 'super', 'while', 'true', 'false']);
|
|
973
|
-
}
|
|
974
|
-
var Companion_instance_2;
|
|
975
|
-
function Companion_getInstance_0() {
|
|
976
|
-
if (Companion_instance_2 == null)
|
|
977
|
-
new Companion();
|
|
978
|
-
return Companion_instance_2;
|
|
979
|
-
}
|
|
980
|
-
function JavaIdentifierEmitter$sanitizeSymbol$lambda(it) {
|
|
981
|
-
return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
|
|
982
|
-
}
|
|
983
|
-
function JavaIdentifierEmitter() {
|
|
984
|
-
}
|
|
985
|
-
function sanitizeSymbol_0($this, _this__u8e3s4) {
|
|
139
|
+
function sanitizeSymbol($this, _this__u8e3s4) {
|
|
986
140
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
987
141
|
var this_0 = split(_this__u8e3s4, ['.', ' ', '-']);
|
|
988
142
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
989
|
-
var destination = ArrayList_init_$Create$
|
|
143
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
990
144
|
var index = 0;
|
|
991
145
|
var _iterator__ex2g4s = this_0.t();
|
|
992
146
|
while (_iterator__ex2g4s.u()) {
|
|
993
147
|
var item = _iterator__ex2g4s.v();
|
|
994
148
|
var _unary__edvuaz = index;
|
|
995
149
|
index = _unary__edvuaz + 1 | 0;
|
|
996
|
-
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ?
|
|
150
|
+
var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.xq(item) : item;
|
|
997
151
|
destination.x(tmp$ret$0);
|
|
998
152
|
}
|
|
999
153
|
// Inline function 'kotlin.text.filter' call
|
|
@@ -1013,9 +167,9 @@ function sanitizeSymbol_0($this, _this__u8e3s4) {
|
|
|
1013
167
|
}
|
|
1014
168
|
while (inductionVariable < last);
|
|
1015
169
|
var tmp$ret$5 = destination_0.toString();
|
|
1016
|
-
return
|
|
170
|
+
return sanitizeFirstIsDigit($this, tmp$ret$5);
|
|
1017
171
|
}
|
|
1018
|
-
function
|
|
172
|
+
function sanitizeFirstIsDigit($this, _this__u8e3s4) {
|
|
1019
173
|
var tmp;
|
|
1020
174
|
var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
|
|
1021
175
|
var tmp_0;
|
|
@@ -1032,57 +186,60 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
|
|
|
1032
186
|
}
|
|
1033
187
|
return tmp;
|
|
1034
188
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return
|
|
189
|
+
function sanitizeKeywords($this, _this__u8e3s4) {
|
|
190
|
+
return Companion_getInstance_0().l1x().v1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
|
|
1037
191
|
}
|
|
1038
|
-
function
|
|
1039
|
-
return
|
|
192
|
+
function sanitizeEnum($this, _this__u8e3s4) {
|
|
193
|
+
return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
|
|
1040
194
|
}
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1043
|
-
this.
|
|
195
|
+
function Companion() {
|
|
196
|
+
Companion_instance_2 = this;
|
|
197
|
+
this.k1x_1 = JavaGenerator_getInstance();
|
|
1044
198
|
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
199
|
+
protoOf(Companion).l1x = function () {
|
|
200
|
+
return this.k1x_1.n1w_1;
|
|
201
|
+
};
|
|
202
|
+
var Companion_instance_2;
|
|
203
|
+
function Companion_getInstance_0() {
|
|
204
|
+
if (Companion_instance_2 == null)
|
|
205
|
+
new Companion();
|
|
206
|
+
return Companion_instance_2;
|
|
1050
207
|
}
|
|
1051
208
|
function JavaIrEmitter$sanitizationConfig$lambda(it) {
|
|
1052
209
|
return '_' + it;
|
|
1053
210
|
}
|
|
1054
211
|
function JavaIrEmitter$sanitizationConfig$lambda_0(name) {
|
|
1055
|
-
return name.
|
|
212
|
+
return name.v1g_1.b1() > 1 ? new Name(listOf(name.j1m())) : name;
|
|
1056
213
|
}
|
|
1057
214
|
function JavaIrEmitter$sanitizationConfig$lambda_1(name) {
|
|
1058
|
-
return new Name(listOf(name.
|
|
215
|
+
return new Name(listOf(name.j1m()));
|
|
1059
216
|
}
|
|
1060
217
|
function JavaIrEmitter$sanitizationConfig$lambda_2(this$0) {
|
|
1061
218
|
return function (it) {
|
|
1062
|
-
return
|
|
219
|
+
return sanitizeSymbol(this$0, it);
|
|
1063
220
|
};
|
|
1064
221
|
}
|
|
1065
222
|
function JavaIrEmitter$sanitizationConfig$lambda_3(stmt, tr) {
|
|
1066
223
|
var tmp;
|
|
1067
224
|
var tmp_0;
|
|
1068
225
|
if (stmt instanceof FunctionCall) {
|
|
1069
|
-
tmp_0 = stmt.
|
|
226
|
+
tmp_0 = stmt.t1m_1.w1i() === 'validate';
|
|
1070
227
|
} else {
|
|
1071
228
|
tmp_0 = false;
|
|
1072
229
|
}
|
|
1073
230
|
if (tmp_0) {
|
|
1074
|
-
tmp = transformChildren(stmt.
|
|
231
|
+
tmp = transformChildren(stmt.x1m(VOID, emptyList()), tr);
|
|
1075
232
|
} else {
|
|
1076
233
|
tmp = transformChildren(stmt, tr);
|
|
1077
234
|
}
|
|
1078
235
|
return tmp;
|
|
1079
236
|
}
|
|
1080
237
|
function JavaIrEmitter$emitShared$lambda(name) {
|
|
1081
|
-
switch (name.
|
|
238
|
+
switch (name.w1i()) {
|
|
1082
239
|
case 'client':
|
|
1083
|
-
return Companion_getInstance().
|
|
240
|
+
return Companion_getInstance().x1g('getClient');
|
|
1084
241
|
case 'server':
|
|
1085
|
-
return Companion_getInstance().
|
|
242
|
+
return Companion_getInstance().x1g('getServer');
|
|
1086
243
|
default:
|
|
1087
244
|
return null;
|
|
1088
245
|
}
|
|
@@ -1092,9 +249,9 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
1092
249
|
var tmp;
|
|
1093
250
|
if (element instanceof File) {
|
|
1094
251
|
// Inline function 'kotlin.collections.partition' call
|
|
1095
|
-
var this_0 = element.
|
|
1096
|
-
var first = ArrayList_init_$Create$();
|
|
1097
|
-
var second = ArrayList_init_$Create$();
|
|
252
|
+
var this_0 = element.t1n_1;
|
|
253
|
+
var first = ArrayList_init_$Create$_0();
|
|
254
|
+
var second = ArrayList_init_$Create$_0();
|
|
1098
255
|
var _iterator__ex2g4s = this_0.t();
|
|
1099
256
|
while (_iterator__ex2g4s.u()) {
|
|
1100
257
|
var element_0 = _iterator__ex2g4s.v();
|
|
@@ -1105,9 +262,9 @@ function JavaIrEmitter$emitShared$lambda_0($imports) {
|
|
|
1105
262
|
}
|
|
1106
263
|
}
|
|
1107
264
|
var _destruct__k2r9zo = new Pair(first, second);
|
|
1108
|
-
var packageElements = _destruct__k2r9zo.
|
|
1109
|
-
var rest = _destruct__k2r9zo.
|
|
1110
|
-
tmp = element.
|
|
265
|
+
var packageElements = _destruct__k2r9zo.we();
|
|
266
|
+
var rest = _destruct__k2r9zo.xe();
|
|
267
|
+
tmp = element.w1n(VOID, plus(plus(packageElements, $imports), rest));
|
|
1111
268
|
} else {
|
|
1112
269
|
tmp = element;
|
|
1113
270
|
}
|
|
@@ -1119,11 +276,40 @@ function JavaIrEmitter$emitShared$lambda_1($clientServer) {
|
|
|
1119
276
|
return function (element, transformer) {
|
|
1120
277
|
var tmp;
|
|
1121
278
|
if (element instanceof Namespace) {
|
|
1122
|
-
var injected = element.
|
|
279
|
+
var injected = element.y1n_1.equals(Companion_getInstance().x1g('Wirespec')) ? $clientServer : emptyList();
|
|
1123
280
|
var tmp_0;
|
|
1124
281
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1125
282
|
if (!injected.r()) {
|
|
1126
|
-
|
|
283
|
+
// Inline function 'community.flock.wirespec.ir.core.withElements' call
|
|
284
|
+
var elements = plus(element.u1n(), injected);
|
|
285
|
+
var tmp_1;
|
|
286
|
+
if (element instanceof File) {
|
|
287
|
+
tmp_1 = element.w1n(VOID, elements);
|
|
288
|
+
} else {
|
|
289
|
+
if (element instanceof Struct) {
|
|
290
|
+
tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
|
|
291
|
+
} else {
|
|
292
|
+
if (element instanceof Namespace) {
|
|
293
|
+
tmp_1 = element.d1o(VOID, elements);
|
|
294
|
+
} else {
|
|
295
|
+
if (element instanceof Interface) {
|
|
296
|
+
tmp_1 = element.m1o(VOID, elements);
|
|
297
|
+
} else {
|
|
298
|
+
if (element instanceof Enum_0) {
|
|
299
|
+
tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
|
|
300
|
+
} else {
|
|
301
|
+
if (element instanceof Main) {
|
|
302
|
+
tmp_1 = element;
|
|
303
|
+
} else {
|
|
304
|
+
tmp_1 = element;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
var tmp_2 = tmp_1;
|
|
312
|
+
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
1127
313
|
} else {
|
|
1128
314
|
tmp_0 = element;
|
|
1129
315
|
}
|
|
@@ -1148,111 +334,111 @@ function JavaIrEmitter$emitGenerator$lambda_1(it) {
|
|
|
1148
334
|
}
|
|
1149
335
|
function JavaIrEmitter$emitGenerator$lambda_2(this$0) {
|
|
1150
336
|
return function (it) {
|
|
1151
|
-
return import_0(this$0.
|
|
337
|
+
return import_0(this$0.s1x().cs_1 + '.model', it);
|
|
1152
338
|
};
|
|
1153
339
|
}
|
|
1154
340
|
function JavaIrEmitter$emit$lambda(this$0) {
|
|
1155
341
|
return function (it) {
|
|
1156
|
-
return
|
|
342
|
+
return sanitizeEnum(this$0, it);
|
|
1157
343
|
};
|
|
1158
344
|
}
|
|
1159
345
|
function JavaIrEmitter$emit$lambda_0(it) {
|
|
1160
346
|
return listOf(function_0('label', VOID, VOID, JavaIrEmitter$emit$lambda$lambda));
|
|
1161
347
|
}
|
|
1162
348
|
function JavaIrEmitter$emit$lambda$lambda($this$function) {
|
|
1163
|
-
$this$function.
|
|
1164
|
-
$this$function.
|
|
349
|
+
$this$function.o1h(String_instance);
|
|
350
|
+
$this$function.p1h(new VariableReference(Companion_getInstance().x1g('label')));
|
|
1165
351
|
return Unit_instance;
|
|
1166
352
|
}
|
|
1167
353
|
function JavaIrEmitter(packageName, emitShared) {
|
|
1168
|
-
|
|
1169
|
-
packageName = packageName === VOID ?
|
|
1170
|
-
emitShared = emitShared === VOID ?
|
|
1171
|
-
this.
|
|
1172
|
-
this.
|
|
1173
|
-
this.
|
|
1174
|
-
this.
|
|
1175
|
-
this.
|
|
354
|
+
Companion_getInstance_0();
|
|
355
|
+
packageName = packageName === VOID ? Companion_instance_0.bs('community.flock.wirespec.generated') : packageName;
|
|
356
|
+
emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
|
|
357
|
+
this.m1x_1 = packageName;
|
|
358
|
+
this.n1x_1 = emitShared;
|
|
359
|
+
this.o1x_1 = JavaGenerator_getInstance();
|
|
360
|
+
this.p1x_1 = FileExtension_Java_getInstance();
|
|
361
|
+
this.q1x_1 = listOf(import_0('community.flock.wirespec.java', 'Wirespec'));
|
|
1176
362
|
var tmp = this;
|
|
1177
|
-
var tmp_0 =
|
|
363
|
+
var tmp_0 = Companion_getInstance_0().l1x();
|
|
1178
364
|
var tmp_1 = JavaIrEmitter$sanitizationConfig$lambda;
|
|
1179
365
|
var tmp_2 = JavaIrEmitter$sanitizationConfig$lambda_0;
|
|
1180
366
|
var tmp_3 = JavaIrEmitter$sanitizationConfig$lambda_1;
|
|
1181
367
|
var tmp_4 = JavaIrEmitter$sanitizationConfig$lambda_2(this);
|
|
1182
|
-
tmp.
|
|
368
|
+
tmp.r1x_1 = new SanitizationConfig(tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, JavaIrEmitter$sanitizationConfig$lambda_3);
|
|
1183
369
|
}
|
|
1184
|
-
protoOf(JavaIrEmitter).
|
|
1185
|
-
return this.
|
|
370
|
+
protoOf(JavaIrEmitter).s1x = function () {
|
|
371
|
+
return this.m1x_1;
|
|
1186
372
|
};
|
|
1187
|
-
protoOf(JavaIrEmitter).
|
|
1188
|
-
return this.
|
|
373
|
+
protoOf(JavaIrEmitter).d1w = function () {
|
|
374
|
+
return this.o1x_1;
|
|
1189
375
|
};
|
|
1190
|
-
protoOf(JavaIrEmitter).
|
|
1191
|
-
return this.
|
|
376
|
+
protoOf(JavaIrEmitter).er = function () {
|
|
377
|
+
return this.p1x_1;
|
|
1192
378
|
};
|
|
1193
|
-
protoOf(JavaIrEmitter).
|
|
1194
|
-
var packageName =
|
|
379
|
+
protoOf(JavaIrEmitter).h1w = function () {
|
|
380
|
+
var packageName = Companion_instance_0.bs('community.flock.wirespec.java');
|
|
1195
381
|
var imports = listOf_0([import_0('java.lang.reflect', 'Type'), import_0('java.lang.reflect', 'ParameterizedType'), import_0('java.util', 'List'), import_0('java.util', 'Map')]);
|
|
1196
382
|
// Inline function 'kotlin.collections.map' call
|
|
1197
|
-
var this_0 = convertClientServer(
|
|
383
|
+
var this_0 = convertClientServer();
|
|
1198
384
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1199
|
-
var destination = ArrayList_init_$Create$
|
|
385
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1200
386
|
var _iterator__ex2g4s = this_0.t();
|
|
1201
387
|
while (_iterator__ex2g4s.u()) {
|
|
1202
388
|
var item = _iterator__ex2g4s.v();
|
|
1203
389
|
var tmp$ret$0 = toGetterAccessors(item, JavaIrEmitter$emitShared$lambda);
|
|
1204
390
|
destination.x(tmp$ret$0);
|
|
1205
391
|
}
|
|
1206
|
-
var clientServer =
|
|
392
|
+
var clientServer = plus_0(destination, raw('public static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n if(rawType != null) {\n return new ParameterizedType() {\n public Type getRawType() { return rawType; }\n public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n public Type getOwnerType() { return null; }\n };\n }\n else { return actualTypeArguments; }\n}'));
|
|
1207
393
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1208
394
|
var this_1 = convert(packageName);
|
|
1209
395
|
var scope = new TransformScope(this_1);
|
|
1210
396
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1211
397
|
var tmp = scope;
|
|
1212
398
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1213
|
-
var this_2 = scope.
|
|
399
|
+
var this_2 = scope.q1v_1;
|
|
1214
400
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1215
401
|
// Inline function 'kotlin.apply' call
|
|
1216
402
|
var this_3 = new TransformerBuilder();
|
|
1217
|
-
this_3.
|
|
1218
|
-
var tmp$ret$5 = this_3.
|
|
1219
|
-
tmp.
|
|
403
|
+
this_3.k1i(JavaIrEmitter$emitShared$lambda_0(imports));
|
|
404
|
+
var tmp$ret$5 = this_3.l1i();
|
|
405
|
+
tmp.q1v_1 = transform(this_2, tmp$ret$5);
|
|
1220
406
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1221
407
|
var tmp_0 = scope;
|
|
1222
408
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1223
409
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1224
|
-
var this_4 = scope.
|
|
410
|
+
var this_4 = scope.q1v_1;
|
|
1225
411
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1226
412
|
// Inline function 'kotlin.apply' call
|
|
1227
413
|
var this_5 = new TransformerBuilder();
|
|
1228
|
-
this_5.
|
|
1229
|
-
var tmp$ret$10 = this_5.
|
|
1230
|
-
tmp_0.
|
|
1231
|
-
var tmp_1 = scope.
|
|
414
|
+
this_5.k1i(JavaIrEmitter$emitShared$lambda_1(clientServer));
|
|
415
|
+
var tmp$ret$10 = this_5.l1i();
|
|
416
|
+
tmp_0.q1v_1 = transform(this_4, tmp$ret$10);
|
|
417
|
+
var tmp_1 = scope.q1v_1;
|
|
1232
418
|
var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1233
419
|
var tmp_2;
|
|
1234
|
-
if (this.
|
|
420
|
+
if (this.n1x_1.gp_1) {
|
|
1235
421
|
tmp_2 = wirespecShared;
|
|
1236
422
|
} else {
|
|
1237
423
|
tmp_2 = null;
|
|
1238
424
|
}
|
|
1239
425
|
return tmp_2;
|
|
1240
426
|
};
|
|
1241
|
-
protoOf(JavaIrEmitter).
|
|
1242
|
-
var file =
|
|
1243
|
-
var tmp = file.
|
|
427
|
+
protoOf(JavaIrEmitter).fr = function (definition, module_0, logger) {
|
|
428
|
+
var file = emit.call(this, definition, module_0, logger);
|
|
429
|
+
var tmp = file.w1n(Companion_getInstance().x1g(sanitizeSymbol(this, file.s1n_1.y1g())));
|
|
1244
430
|
// Inline function 'kotlin.takeIf' call
|
|
1245
|
-
var this_0 = this.
|
|
431
|
+
var this_0 = this.q1x_1;
|
|
1246
432
|
var tmp_0;
|
|
1247
|
-
if (
|
|
433
|
+
if (Companion_instance.yq(module_0)) {
|
|
1248
434
|
tmp_0 = this_0;
|
|
1249
435
|
} else {
|
|
1250
436
|
tmp_0 = null;
|
|
1251
437
|
}
|
|
1252
438
|
var tmp$ret$1 = tmp_0;
|
|
1253
|
-
return placeInPackage(prependImports(tmp, tmp$ret$1), this.
|
|
439
|
+
return placeInPackage(prependImports(tmp, tmp$ret$1), this.s1x(), definition);
|
|
1254
440
|
};
|
|
1255
|
-
protoOf(JavaIrEmitter).
|
|
441
|
+
protoOf(JavaIrEmitter).m1w = function (definition, module_0) {
|
|
1256
442
|
var tmp;
|
|
1257
443
|
if (definition instanceof Type) {
|
|
1258
444
|
tmp = convertToGenerator_2(definition, module_0);
|
|
@@ -1272,33 +458,33 @@ protoOf(JavaIrEmitter).f1w = function (definition, module_0) {
|
|
|
1272
458
|
}
|
|
1273
459
|
}
|
|
1274
460
|
var generatorFile = tmp;
|
|
1275
|
-
var sanitized = sanitizeNames(generatorFile, this.
|
|
1276
|
-
var generatorOwnName = definition.
|
|
1277
|
-
var tmp_0 =
|
|
461
|
+
var sanitized = sanitizeNames(generatorFile, this.r1x_1);
|
|
462
|
+
var generatorOwnName = definition.gr().m1() + 'Generator';
|
|
463
|
+
var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
|
|
1278
464
|
var tmp_1 = filterNot(tmp_0, JavaIrEmitter$emitGenerator$lambda);
|
|
1279
465
|
var tmp_2 = filterNot(tmp_1, JavaIrEmitter$emitGenerator$lambda_0(generatorOwnName));
|
|
1280
|
-
var tmp_3 =
|
|
466
|
+
var tmp_3 = distinct(map(tmp_2, JavaIrEmitter$emitGenerator$lambda_1));
|
|
1281
467
|
var modelImports = toList(map(tmp_3, JavaIrEmitter$emitGenerator$lambda_2(this)));
|
|
1282
|
-
return placeInPackage_0(prependImports(sanitized,
|
|
468
|
+
return placeInPackage_0(prependImports(sanitized, plus(this.q1x_1, modelImports)), this.s1x(), 'generator');
|
|
1283
469
|
};
|
|
1284
|
-
protoOf(JavaIrEmitter).
|
|
1285
|
-
return sanitizeNames(convertWithValidation(type, module_0), this.
|
|
470
|
+
protoOf(JavaIrEmitter).vr = function (type, module_0) {
|
|
471
|
+
return sanitizeNames(convertWithValidation(type, module_0), this.r1x_1);
|
|
1286
472
|
};
|
|
1287
|
-
protoOf(JavaIrEmitter).
|
|
473
|
+
protoOf(JavaIrEmitter).tr = function (enum_0, module_0) {
|
|
1288
474
|
var tmp = convert_0(enum_0);
|
|
1289
475
|
var tmp_0 = JavaIrEmitter$emit$lambda(this);
|
|
1290
|
-
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaIrEmitter$emit$lambda_0), this.
|
|
476
|
+
return sanitizeNames(injectEnumLabelField(tmp, tmp_0, JavaIrEmitter$emit$lambda_0), this.r1x_1);
|
|
1291
477
|
};
|
|
1292
|
-
protoOf(JavaIrEmitter).
|
|
1293
|
-
return sanitizeNames(convert_1(union), this.
|
|
478
|
+
protoOf(JavaIrEmitter).jr = function (union) {
|
|
479
|
+
return sanitizeNames(convert_1(union), this.r1x_1);
|
|
1294
480
|
};
|
|
1295
|
-
protoOf(JavaIrEmitter).
|
|
1296
|
-
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.
|
|
481
|
+
protoOf(JavaIrEmitter).or = function (refined) {
|
|
482
|
+
return sanitizeNames(applyRefinedStructShape(convert_2(refined), refined), this.r1x_1);
|
|
1297
483
|
};
|
|
1298
|
-
protoOf(JavaIrEmitter).
|
|
1299
|
-
var tmp = sanitizeNames(transformTypeDescriptors(injectApiField(injectHandleFunction(convert_3(endpoint), endpoint))), this.
|
|
484
|
+
protoOf(JavaIrEmitter).ur = function (endpoint) {
|
|
485
|
+
var tmp = sanitizeNames(transformTypeDescriptors(injectApiField(injectHandleFunction(convert_3(endpoint), endpoint))), this.r1x_1);
|
|
1300
486
|
// Inline function 'kotlin.takeIf' call
|
|
1301
|
-
var this_0 = buildModelImports(endpoint, this.
|
|
487
|
+
var this_0 = buildModelImports(endpoint, this.s1x());
|
|
1302
488
|
var tmp_0;
|
|
1303
489
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1304
490
|
if (!this_0.r()) {
|
|
@@ -1309,28 +495,28 @@ protoOf(JavaIrEmitter).bs = function (endpoint) {
|
|
|
1309
495
|
var tmp$ret$2 = tmp_0;
|
|
1310
496
|
return prependImports(tmp, tmp$ret$2);
|
|
1311
497
|
};
|
|
1312
|
-
protoOf(JavaIrEmitter).
|
|
498
|
+
protoOf(JavaIrEmitter).ir = function (channel) {
|
|
1313
499
|
var tmp;
|
|
1314
|
-
if (channel.
|
|
1315
|
-
tmp = this.
|
|
500
|
+
if (channel.mp_1.m1() === channel.np_1.m1()) {
|
|
501
|
+
tmp = this.s1x().cs_1 + '.model.';
|
|
1316
502
|
} else {
|
|
1317
503
|
tmp = '';
|
|
1318
504
|
}
|
|
1319
505
|
var fullyQualifiedPrefix = tmp;
|
|
1320
|
-
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.
|
|
506
|
+
return qualifyChannelReferences(sanitizeNames(convert_4(channel), this.r1x_1), fullyQualifiedPrefix);
|
|
1321
507
|
};
|
|
1322
|
-
protoOf(JavaIrEmitter).
|
|
1323
|
-
var imports = buildModelImports(endpoint, this.
|
|
1324
|
-
var endpointImport = import_0(this.
|
|
1325
|
-
var endpointName = endpoint.
|
|
1326
|
-
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.
|
|
1327
|
-
var subPackageName =
|
|
1328
|
-
return new File(Companion_getInstance().
|
|
508
|
+
protoOf(JavaIrEmitter).l1w = function (endpoint) {
|
|
509
|
+
var imports = buildModelImports(endpoint, this.s1x());
|
|
510
|
+
var endpointImport = import_0(this.s1x().cs_1 + '.endpoint', endpoint.eq_1.m1());
|
|
511
|
+
var endpointName = endpoint.eq_1.m1();
|
|
512
|
+
var file = wrapAsyncReturnInThenApply(transformTypeDescriptors(sanitizeNames(emitEndpointClient.call(this, endpoint), this.r1x_1)), endpointName);
|
|
513
|
+
var subPackageName = plus_1(this.s1x(), 'client');
|
|
514
|
+
return new File(Companion_getInstance().x1g(subPackageName.es() + sanitizeSymbol(this, file.s1n_1.y1g())), plus(plus(plus(plus(listOf(new Package(subPackageName.cs_1)), this.q1x_1), imports), listOf(endpointImport)), file.t1n_1));
|
|
1329
515
|
};
|
|
1330
|
-
protoOf(JavaIrEmitter).
|
|
516
|
+
protoOf(JavaIrEmitter).i1w = function (endpoints, logger) {
|
|
1331
517
|
// Inline function 'kotlin.collections.flatMap' call
|
|
1332
518
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
1333
|
-
var destination = ArrayList_init_$Create$();
|
|
519
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1334
520
|
var _iterator__ex2g4s = endpoints.t();
|
|
1335
521
|
while (_iterator__ex2g4s.u()) {
|
|
1336
522
|
var element = _iterator__ex2g4s.v();
|
|
@@ -1339,18 +525,18 @@ protoOf(JavaIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1339
525
|
}
|
|
1340
526
|
// Inline function 'kotlin.collections.distinctBy' call
|
|
1341
527
|
var set = HashSet_init_$Create$();
|
|
1342
|
-
var list_0 = ArrayList_init_$Create$();
|
|
528
|
+
var list_0 = ArrayList_init_$Create$_0();
|
|
1343
529
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1344
530
|
while (_iterator__ex2g4s_0.u()) {
|
|
1345
531
|
var e = _iterator__ex2g4s_0.v();
|
|
1346
|
-
var key = e.
|
|
532
|
+
var key = e.dv_1;
|
|
1347
533
|
if (set.x(key)) {
|
|
1348
534
|
list_0.x(e);
|
|
1349
535
|
}
|
|
1350
536
|
}
|
|
1351
537
|
// Inline function 'kotlin.collections.filter' call
|
|
1352
538
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1353
|
-
var destination_0 = ArrayList_init_$Create$();
|
|
539
|
+
var destination_0 = ArrayList_init_$Create$_0();
|
|
1354
540
|
var _iterator__ex2g4s_1 = list_0.t();
|
|
1355
541
|
while (_iterator__ex2g4s_1.u()) {
|
|
1356
542
|
var element_0 = _iterator__ex2g4s_1.v();
|
|
@@ -1370,7 +556,7 @@ protoOf(JavaIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1370
556
|
var _iterator__ex2g4s_2 = endpoints.t();
|
|
1371
557
|
while (_iterator__ex2g4s_2.u()) {
|
|
1372
558
|
var element_1 = _iterator__ex2g4s_2.v();
|
|
1373
|
-
if (element_1.
|
|
559
|
+
if (element_1.eq_1.m1() === element_0.dv_1) {
|
|
1374
560
|
tmp$ret$5 = false;
|
|
1375
561
|
break $l$block_0;
|
|
1376
562
|
}
|
|
@@ -1383,43 +569,43 @@ protoOf(JavaIrEmitter).b1w = function (endpoints, logger) {
|
|
|
1383
569
|
}
|
|
1384
570
|
// Inline function 'kotlin.collections.map' call
|
|
1385
571
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1386
|
-
var destination_1 = ArrayList_init_$Create$
|
|
572
|
+
var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(destination_0, 10));
|
|
1387
573
|
var _iterator__ex2g4s_3 = destination_0.t();
|
|
1388
574
|
while (_iterator__ex2g4s_3.u()) {
|
|
1389
575
|
var item = _iterator__ex2g4s_3.v();
|
|
1390
|
-
var tmp$ret$10 = import_0(this.
|
|
576
|
+
var tmp$ret$10 = import_0(this.s1x().cs_1 + '.model', item.dv_1);
|
|
1391
577
|
destination_1.x(tmp$ret$10);
|
|
1392
578
|
}
|
|
1393
579
|
var imports = destination_1;
|
|
1394
580
|
// Inline function 'kotlin.collections.map' call
|
|
1395
581
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1396
|
-
var destination_2 = ArrayList_init_$Create$
|
|
582
|
+
var destination_2 = ArrayList_init_$Create$(collectionSizeOrDefault(endpoints, 10));
|
|
1397
583
|
var _iterator__ex2g4s_4 = endpoints.t();
|
|
1398
584
|
while (_iterator__ex2g4s_4.u()) {
|
|
1399
585
|
var item_0 = _iterator__ex2g4s_4.v();
|
|
1400
|
-
var tmp$ret$13 = import_0(this.
|
|
586
|
+
var tmp$ret$13 = import_0(this.s1x().cs_1 + '.endpoint', item_0.eq_1.m1());
|
|
1401
587
|
destination_2.x(tmp$ret$13);
|
|
1402
588
|
}
|
|
1403
589
|
var endpointImports = destination_2;
|
|
1404
590
|
// Inline function 'kotlin.collections.map' call
|
|
1405
591
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1406
|
-
var destination_3 = ArrayList_init_$Create$
|
|
592
|
+
var destination_3 = ArrayList_init_$Create$(collectionSizeOrDefault(endpoints, 10));
|
|
1407
593
|
var _iterator__ex2g4s_5 = endpoints.t();
|
|
1408
594
|
while (_iterator__ex2g4s_5.u()) {
|
|
1409
595
|
var item_1 = _iterator__ex2g4s_5.v();
|
|
1410
|
-
var tmp$ret$16 = import_0(this.
|
|
596
|
+
var tmp$ret$16 = import_0(this.s1x().cs_1 + '.client', item_1.eq_1.m1() + 'Client');
|
|
1411
597
|
destination_3.x(tmp$ret$16);
|
|
1412
598
|
}
|
|
1413
599
|
var clientImports = destination_3;
|
|
1414
|
-
var allImports =
|
|
1415
|
-
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.
|
|
1416
|
-
return new File(Companion_getInstance().
|
|
600
|
+
var allImports = plus(plus(imports, endpointImports), clientImports);
|
|
601
|
+
var file = sanitizeNames(emitClient.call(this, endpoints, logger), this.r1x_1);
|
|
602
|
+
return new File(Companion_getInstance().x1g(this.s1x().es() + sanitizeSymbol(this, file.s1n_1.y1g())), plus(plus(plus(listOf(new Package(this.s1x().cs_1)), this.q1x_1), allImports), file.t1n_1));
|
|
1417
603
|
};
|
|
1418
604
|
function transformTypeDescriptors(_this__u8e3s4) {
|
|
1419
605
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1420
606
|
var scope = new TransformScope(_this__u8e3s4);
|
|
1421
|
-
scope.
|
|
1422
|
-
var tmp = scope.
|
|
607
|
+
scope.z1v(transformTypeDescriptors$lambda);
|
|
608
|
+
var tmp = scope.q1v_1;
|
|
1423
609
|
return isInterface(tmp, Element) ? tmp : THROW_CCE();
|
|
1424
610
|
}
|
|
1425
611
|
function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
@@ -1428,14 +614,14 @@ function applyRefinedStructShape(_this__u8e3s4, refined) {
|
|
|
1428
614
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1429
615
|
var tmp = scope;
|
|
1430
616
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1431
|
-
var this_0 = scope.
|
|
617
|
+
var this_0 = scope.q1v_1;
|
|
1432
618
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1433
619
|
// Inline function 'kotlin.apply' call
|
|
1434
620
|
var this_1 = new TransformerBuilder();
|
|
1435
|
-
this_1.
|
|
1436
|
-
var tmp$ret$2 = this_1.
|
|
1437
|
-
tmp.
|
|
1438
|
-
var tmp_0 = scope.
|
|
621
|
+
this_1.k1i(applyRefinedStructShape$lambda(refined));
|
|
622
|
+
var tmp$ret$2 = this_1.l1i();
|
|
623
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
624
|
+
var tmp_0 = scope.q1v_1;
|
|
1439
625
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1440
626
|
}
|
|
1441
627
|
function injectApiField(_this__u8e3s4) {
|
|
@@ -1445,14 +631,14 @@ function injectApiField(_this__u8e3s4) {
|
|
|
1445
631
|
var tmp = scope;
|
|
1446
632
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1447
633
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1448
|
-
var this_0 = scope.
|
|
634
|
+
var this_0 = scope.q1v_1;
|
|
1449
635
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1450
636
|
// Inline function 'kotlin.apply' call
|
|
1451
637
|
var this_1 = new TransformerBuilder();
|
|
1452
|
-
this_1.
|
|
1453
|
-
var tmp$ret$2 = this_1.
|
|
1454
|
-
tmp.
|
|
1455
|
-
var tmp_0 = scope.
|
|
638
|
+
this_1.k1i(injectApiField$lambda);
|
|
639
|
+
var tmp$ret$2 = this_1.l1i();
|
|
640
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
641
|
+
var tmp_0 = scope.q1v_1;
|
|
1456
642
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1457
643
|
}
|
|
1458
644
|
function injectHandleFunction(_this__u8e3s4, endpoint) {
|
|
@@ -1462,35 +648,35 @@ function injectHandleFunction(_this__u8e3s4, endpoint) {
|
|
|
1462
648
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1463
649
|
var tmp = scope;
|
|
1464
650
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1465
|
-
var this_0 = scope.
|
|
651
|
+
var this_0 = scope.q1v_1;
|
|
1466
652
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1467
653
|
// Inline function 'kotlin.apply' call
|
|
1468
654
|
var this_1 = new TransformerBuilder();
|
|
1469
|
-
this_1.
|
|
1470
|
-
var tmp$ret$2 = this_1.
|
|
1471
|
-
tmp.
|
|
1472
|
-
var tmp_0 = scope.
|
|
655
|
+
this_1.k1i(injectHandleFunction$lambda(handlersStruct));
|
|
656
|
+
var tmp$ret$2 = this_1.l1i();
|
|
657
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
658
|
+
var tmp_0 = scope.q1v_1;
|
|
1473
659
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1474
660
|
}
|
|
1475
661
|
function buildModelImports(_this__u8e3s4, packageName) {
|
|
1476
662
|
// Inline function 'kotlin.collections.filter' call
|
|
1477
663
|
var tmp0 = importReferences(_this__u8e3s4);
|
|
1478
664
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1479
|
-
var destination = ArrayList_init_$Create$();
|
|
665
|
+
var destination = ArrayList_init_$Create$_0();
|
|
1480
666
|
var _iterator__ex2g4s = tmp0.t();
|
|
1481
667
|
while (_iterator__ex2g4s.u()) {
|
|
1482
668
|
var element = _iterator__ex2g4s.v();
|
|
1483
|
-
if (!(_this__u8e3s4.
|
|
669
|
+
if (!(_this__u8e3s4.gr().m1() === element.dv_1)) {
|
|
1484
670
|
destination.x(element);
|
|
1485
671
|
}
|
|
1486
672
|
}
|
|
1487
673
|
// Inline function 'kotlin.collections.map' call
|
|
1488
674
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1489
|
-
var destination_0 = ArrayList_init_$Create$
|
|
675
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(destination, 10));
|
|
1490
676
|
var _iterator__ex2g4s_0 = destination.t();
|
|
1491
677
|
while (_iterator__ex2g4s_0.u()) {
|
|
1492
678
|
var item = _iterator__ex2g4s_0.v();
|
|
1493
|
-
var tmp$ret$3 = import_0(packageName.
|
|
679
|
+
var tmp$ret$3 = import_0(packageName.cs_1 + '.model', Companion_getInstance().x1g(item.dv_1).y1g());
|
|
1494
680
|
destination_0.x(tmp$ret$3);
|
|
1495
681
|
}
|
|
1496
682
|
return destination_0;
|
|
@@ -1501,14 +687,14 @@ function qualifyChannelReferences(_this__u8e3s4, fullyQualifiedPrefix) {
|
|
|
1501
687
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1502
688
|
var tmp = scope;
|
|
1503
689
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1504
|
-
var this_0 = scope.
|
|
690
|
+
var this_0 = scope.q1v_1;
|
|
1505
691
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1506
692
|
// Inline function 'kotlin.apply' call
|
|
1507
693
|
var this_1 = new TransformerBuilder();
|
|
1508
|
-
this_1.
|
|
1509
|
-
var tmp$ret$2 = this_1.
|
|
1510
|
-
tmp.
|
|
1511
|
-
var tmp_0 = scope.
|
|
694
|
+
this_1.k1i(qualifyChannelReferences$lambda(fullyQualifiedPrefix));
|
|
695
|
+
var tmp$ret$2 = this_1.l1i();
|
|
696
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
697
|
+
var tmp_0 = scope.q1v_1;
|
|
1512
698
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1513
699
|
}
|
|
1514
700
|
function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
@@ -1517,26 +703,26 @@ function wrapAsyncReturnInThenApply(_this__u8e3s4, endpointName) {
|
|
|
1517
703
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
|
|
1518
704
|
var tmp = scope;
|
|
1519
705
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1520
|
-
var this_0 = scope.
|
|
706
|
+
var this_0 = scope.q1v_1;
|
|
1521
707
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1522
708
|
// Inline function 'kotlin.apply' call
|
|
1523
709
|
var this_1 = new TransformerBuilder();
|
|
1524
|
-
this_1.
|
|
1525
|
-
var tmp$ret$2 = this_1.
|
|
1526
|
-
tmp.
|
|
1527
|
-
var tmp_0 = scope.
|
|
710
|
+
this_1.k1i(wrapAsyncReturnInThenApply$lambda(endpointName));
|
|
711
|
+
var tmp$ret$2 = this_1.l1i();
|
|
712
|
+
tmp.q1v_1 = transform(this_0, tmp$ret$2);
|
|
713
|
+
var tmp_0 = scope.q1v_1;
|
|
1528
714
|
return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
|
|
1529
715
|
}
|
|
1530
716
|
function findRoot(_this__u8e3s4) {
|
|
1531
717
|
var tmp;
|
|
1532
718
|
if (_this__u8e3s4 instanceof Nullable) {
|
|
1533
|
-
tmp = findRoot(_this__u8e3s4.
|
|
719
|
+
tmp = findRoot(_this__u8e3s4.s1i_1);
|
|
1534
720
|
} else {
|
|
1535
721
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
1536
|
-
tmp = findRoot(_this__u8e3s4.
|
|
722
|
+
tmp = findRoot(_this__u8e3s4.t1i_1);
|
|
1537
723
|
} else {
|
|
1538
|
-
if (_this__u8e3s4 instanceof
|
|
1539
|
-
tmp = findRoot(_this__u8e3s4.
|
|
724
|
+
if (_this__u8e3s4 instanceof Dict) {
|
|
725
|
+
tmp = findRoot(_this__u8e3s4.c1n_1);
|
|
1540
726
|
} else {
|
|
1541
727
|
tmp = _this__u8e3s4;
|
|
1542
728
|
}
|
|
@@ -1552,7 +738,7 @@ function rawContainerClass(_this__u8e3s4) {
|
|
|
1552
738
|
if (_this__u8e3s4 instanceof Array_0) {
|
|
1553
739
|
tmp = 'java.util.List';
|
|
1554
740
|
} else {
|
|
1555
|
-
if (_this__u8e3s4 instanceof
|
|
741
|
+
if (_this__u8e3s4 instanceof Dict) {
|
|
1556
742
|
tmp = 'java.util.Map';
|
|
1557
743
|
} else {
|
|
1558
744
|
tmp = null;
|
|
@@ -1563,9 +749,9 @@ function rawContainerClass(_this__u8e3s4) {
|
|
|
1563
749
|
}
|
|
1564
750
|
function toJavaName(_this__u8e3s4) {
|
|
1565
751
|
var tmp;
|
|
1566
|
-
if (_this__u8e3s4 instanceof
|
|
752
|
+
if (_this__u8e3s4 instanceof Integer) {
|
|
1567
753
|
var tmp_0;
|
|
1568
|
-
switch (_this__u8e3s4.
|
|
754
|
+
switch (_this__u8e3s4.y1m_1.c3_1) {
|
|
1569
755
|
case 0:
|
|
1570
756
|
tmp_0 = 'Integer';
|
|
1571
757
|
break;
|
|
@@ -1578,9 +764,9 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1578
764
|
}
|
|
1579
765
|
tmp = tmp_0;
|
|
1580
766
|
} else {
|
|
1581
|
-
if (_this__u8e3s4 instanceof
|
|
767
|
+
if (_this__u8e3s4 instanceof Number_0) {
|
|
1582
768
|
var tmp_1;
|
|
1583
|
-
switch (_this__u8e3s4.
|
|
769
|
+
switch (_this__u8e3s4.z1m_1.c3_1) {
|
|
1584
770
|
case 0:
|
|
1585
771
|
tmp_1 = 'Float';
|
|
1586
772
|
break;
|
|
@@ -1596,10 +782,10 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1596
782
|
if (equals(_this__u8e3s4, String_instance)) {
|
|
1597
783
|
tmp = 'String';
|
|
1598
784
|
} else {
|
|
1599
|
-
if (equals(_this__u8e3s4,
|
|
785
|
+
if (equals(_this__u8e3s4, Boolean_instance)) {
|
|
1600
786
|
tmp = 'Boolean';
|
|
1601
787
|
} else {
|
|
1602
|
-
if (equals(_this__u8e3s4,
|
|
788
|
+
if (equals(_this__u8e3s4, Bytes_instance)) {
|
|
1603
789
|
tmp = 'byte[]';
|
|
1604
790
|
} else {
|
|
1605
791
|
if (equals(_this__u8e3s4, Any_instance)) {
|
|
@@ -1608,8 +794,8 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1608
794
|
if (equals(_this__u8e3s4, Unit_instance_0)) {
|
|
1609
795
|
tmp = 'Void';
|
|
1610
796
|
} else {
|
|
1611
|
-
if (_this__u8e3s4 instanceof
|
|
1612
|
-
tmp = _this__u8e3s4.
|
|
797
|
+
if (_this__u8e3s4 instanceof Custom) {
|
|
798
|
+
tmp = _this__u8e3s4.u1i_1.y1g();
|
|
1613
799
|
} else {
|
|
1614
800
|
tmp = 'Object';
|
|
1615
801
|
}
|
|
@@ -1623,7 +809,7 @@ function toJavaName(_this__u8e3s4) {
|
|
|
1623
809
|
return tmp;
|
|
1624
810
|
}
|
|
1625
811
|
function buildHandlersStruct(_this__u8e3s4) {
|
|
1626
|
-
var pathTemplate = '/' + joinToString(_this__u8e3s4.
|
|
812
|
+
var pathTemplate = '/' + joinToString(_this__u8e3s4.gq_1, '/', VOID, VOID, VOID, VOID, buildHandlersStruct$lambda);
|
|
1627
813
|
return struct('Handlers', buildHandlersStruct$lambda_0(pathTemplate, _this__u8e3s4));
|
|
1628
814
|
}
|
|
1629
815
|
function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
@@ -1635,14 +821,14 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
1635
821
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.matching' call
|
|
1636
822
|
var tmp_0 = scope;
|
|
1637
823
|
// Inline function 'community.flock.wirespec.ir.core.transformMatching' call
|
|
1638
|
-
var this_0 = scope.
|
|
824
|
+
var this_0 = scope.q1v_1;
|
|
1639
825
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1640
826
|
// Inline function 'kotlin.apply' call
|
|
1641
827
|
var this_1 = new TransformerBuilder();
|
|
1642
|
-
this_1.
|
|
1643
|
-
var tmp$ret$3 = this_1.
|
|
1644
|
-
tmp_0.
|
|
1645
|
-
var tmp_1 = scope.
|
|
828
|
+
this_1.w1v(withFullyQualifiedPrefix$lambda(prefix));
|
|
829
|
+
var tmp$ret$3 = this_1.l1i();
|
|
830
|
+
tmp_0.q1v_1 = transform(this_0, tmp$ret$3);
|
|
831
|
+
var tmp_1 = scope.q1v_1;
|
|
1646
832
|
tmp = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
|
|
1647
833
|
} else {
|
|
1648
834
|
tmp = _this__u8e3s4;
|
|
@@ -1652,8 +838,8 @@ function withFullyQualifiedPrefix(_this__u8e3s4, prefix) {
|
|
|
1652
838
|
function transformTypeDescriptors$lambda(stmt, tr) {
|
|
1653
839
|
var tmp;
|
|
1654
840
|
if (stmt instanceof TypeDescriptor) {
|
|
1655
|
-
var rootType = findRoot(stmt.
|
|
1656
|
-
var containerStr = rawContainerClass(stmt.
|
|
841
|
+
var rootType = findRoot(stmt.g1q_1);
|
|
842
|
+
var containerStr = rawContainerClass(stmt.g1q_1);
|
|
1657
843
|
var rootStr = toJavaName(rootType) + '.class';
|
|
1658
844
|
var tmp_0;
|
|
1659
845
|
if (containerStr == null) {
|
|
@@ -1672,8 +858,8 @@ function transformTypeDescriptors$lambda(stmt, tr) {
|
|
|
1672
858
|
}
|
|
1673
859
|
function applyRefinedStructShape$lambda$lambda($refined) {
|
|
1674
860
|
return function ($this$function) {
|
|
1675
|
-
$this$function.
|
|
1676
|
-
$this$function.
|
|
861
|
+
$this$function.o1h(convert_5($refined.nr_1));
|
|
862
|
+
$this$function.p1h(new VariableReference(Companion_getInstance().x1g('value')));
|
|
1677
863
|
return Unit_instance;
|
|
1678
864
|
};
|
|
1679
865
|
}
|
|
@@ -1683,19 +869,48 @@ function applyRefinedStructShape$lambda($refined) {
|
|
|
1683
869
|
if (element instanceof Struct) {
|
|
1684
870
|
var tmp_0 = listOf(Custom_init_$Create$('Wirespec.Refined'));
|
|
1685
871
|
// Inline function 'kotlin.collections.map' call
|
|
1686
|
-
var this_0 = element.
|
|
872
|
+
var this_0 = element.w1p_1;
|
|
1687
873
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1688
|
-
var destination = ArrayList_init_$Create$
|
|
874
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1689
875
|
var _iterator__ex2g4s = this_0.t();
|
|
1690
876
|
while (_iterator__ex2g4s.u()) {
|
|
1691
877
|
var item = _iterator__ex2g4s.v();
|
|
1692
878
|
var tmp0_safe_receiver = item instanceof Function ? item : null;
|
|
1693
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
879
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1l(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
|
|
1694
880
|
var tmp$ret$0 = tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs;
|
|
1695
881
|
destination.x(tmp$ret$0);
|
|
1696
882
|
}
|
|
1697
|
-
var
|
|
1698
|
-
|
|
883
|
+
var tmp0 = element.d1q(VOID, VOID, VOID, tmp_0, destination);
|
|
884
|
+
// Inline function 'community.flock.wirespec.ir.core.plus' call
|
|
885
|
+
var element_0 = function_0('value', VOID, true, applyRefinedStructShape$lambda$lambda($refined));
|
|
886
|
+
var tmp_1;
|
|
887
|
+
if (tmp0 instanceof File) {
|
|
888
|
+
var tmp_2 = tmp0.w1n(VOID, plus_0(tmp0.t1n_1, element_0));
|
|
889
|
+
tmp_1 = tmp_2 instanceof Struct ? tmp_2 : THROW_CCE();
|
|
890
|
+
} else {
|
|
891
|
+
if (tmp0 instanceof Struct) {
|
|
892
|
+
var tmp_3 = tmp0.d1q(VOID, VOID, VOID, VOID, plus_0(tmp0.w1p_1, element_0));
|
|
893
|
+
tmp_1 = tmp_3 instanceof Struct ? tmp_3 : THROW_CCE();
|
|
894
|
+
} else {
|
|
895
|
+
if (tmp0 instanceof Namespace) {
|
|
896
|
+
var tmp_4 = tmp0.d1o(VOID, plus_0(tmp0.z1n_1, element_0));
|
|
897
|
+
tmp_1 = tmp_4 instanceof Struct ? tmp_4 : THROW_CCE();
|
|
898
|
+
} else {
|
|
899
|
+
if (tmp0 instanceof Interface) {
|
|
900
|
+
var tmp_5 = tmp0.m1o(VOID, plus_0(tmp0.f1o_1, element_0));
|
|
901
|
+
tmp_1 = tmp_5 instanceof Struct ? tmp_5 : THROW_CCE();
|
|
902
|
+
} else {
|
|
903
|
+
if (tmp0 instanceof Enum_0) {
|
|
904
|
+
var tmp_6 = tmp0.r1p(VOID, VOID, VOID, VOID, VOID, plus_0(tmp0.o1p_1, element_0));
|
|
905
|
+
tmp_1 = tmp_6 instanceof Struct ? tmp_6 : THROW_CCE();
|
|
906
|
+
} else {
|
|
907
|
+
noWhenBranchMatchedException();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
tmp = tmp_1;
|
|
1699
914
|
} else {
|
|
1700
915
|
tmp = element;
|
|
1701
916
|
}
|
|
@@ -1710,7 +925,36 @@ function injectApiField$lambda(element, transformer) {
|
|
|
1710
925
|
var tmp_0;
|
|
1711
926
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1712
927
|
if (!injected.r()) {
|
|
1713
|
-
|
|
928
|
+
// Inline function 'community.flock.wirespec.ir.core.withElements' call
|
|
929
|
+
var elements = plus(element.u1n(), injected);
|
|
930
|
+
var tmp_1;
|
|
931
|
+
if (element instanceof File) {
|
|
932
|
+
tmp_1 = element.w1n(VOID, elements);
|
|
933
|
+
} else {
|
|
934
|
+
if (element instanceof Struct) {
|
|
935
|
+
tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
|
|
936
|
+
} else {
|
|
937
|
+
if (element instanceof Namespace) {
|
|
938
|
+
tmp_1 = element.d1o(VOID, elements);
|
|
939
|
+
} else {
|
|
940
|
+
if (element instanceof Interface) {
|
|
941
|
+
tmp_1 = element.m1o(VOID, elements);
|
|
942
|
+
} else {
|
|
943
|
+
if (element instanceof Enum_0) {
|
|
944
|
+
tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
|
|
945
|
+
} else {
|
|
946
|
+
if (element instanceof Main) {
|
|
947
|
+
tmp_1 = element;
|
|
948
|
+
} else {
|
|
949
|
+
tmp_1 = element;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
var tmp_2 = tmp_1;
|
|
957
|
+
tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
|
|
1714
958
|
} else {
|
|
1715
959
|
tmp_0 = element;
|
|
1716
960
|
}
|
|
@@ -1729,7 +973,36 @@ function injectHandleFunction$lambda$lambda($handlersStruct) {
|
|
|
1729
973
|
var tmp_0;
|
|
1730
974
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1731
975
|
if (!injected.r()) {
|
|
1732
|
-
|
|
976
|
+
// Inline function 'community.flock.wirespec.ir.core.withElements' call
|
|
977
|
+
var elements = plus(element.u1n(), injected);
|
|
978
|
+
var tmp_1;
|
|
979
|
+
if (element instanceof File) {
|
|
980
|
+
tmp_1 = element.w1n(VOID, elements);
|
|
981
|
+
} else {
|
|
982
|
+
if (element instanceof Struct) {
|
|
983
|
+
tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
|
|
984
|
+
} else {
|
|
985
|
+
if (element instanceof Namespace) {
|
|
986
|
+
tmp_1 = element.d1o(VOID, elements);
|
|
987
|
+
} else {
|
|
988
|
+
if (element instanceof Interface) {
|
|
989
|
+
tmp_1 = element.m1o(VOID, elements);
|
|
990
|
+
} else {
|
|
991
|
+
if (element instanceof Enum_0) {
|
|
992
|
+
tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
|
|
993
|
+
} else {
|
|
994
|
+
if (element instanceof Main) {
|
|
995
|
+
tmp_1 = element;
|
|
996
|
+
} else {
|
|
997
|
+
tmp_1 = element;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
var tmp_2 = tmp_1;
|
|
1005
|
+
tmp_0 = tmp_2 instanceof Interface ? tmp_2 : THROW_CCE();
|
|
1733
1006
|
} else {
|
|
1734
1007
|
tmp_0 = element;
|
|
1735
1008
|
}
|
|
@@ -1746,21 +1019,21 @@ function injectHandleFunction$lambda($handlersStruct) {
|
|
|
1746
1019
|
var tmp;
|
|
1747
1020
|
if (element instanceof Interface) {
|
|
1748
1021
|
var tmp_0;
|
|
1749
|
-
if (element.
|
|
1022
|
+
if (element.e1o_1.equals(Companion_getInstance().x1g('Handler'))) {
|
|
1750
1023
|
// Inline function 'community.flock.wirespec.ir.core.transform' call
|
|
1751
1024
|
var scope = new TransformScope(element);
|
|
1752
1025
|
// Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
|
|
1753
1026
|
var tmp_1 = scope;
|
|
1754
1027
|
// Inline function 'community.flock.wirespec.ir.core.injectAfter' call
|
|
1755
1028
|
// Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
|
|
1756
|
-
var this_0 = scope.
|
|
1029
|
+
var this_0 = scope.q1v_1;
|
|
1757
1030
|
// Inline function 'community.flock.wirespec.ir.core.transformer' call
|
|
1758
1031
|
// Inline function 'kotlin.apply' call
|
|
1759
1032
|
var this_1 = new TransformerBuilder();
|
|
1760
|
-
this_1.
|
|
1761
|
-
var tmp$ret$2 = this_1.
|
|
1762
|
-
tmp_1.
|
|
1763
|
-
var tmp_2 = scope.
|
|
1033
|
+
this_1.k1i(injectHandleFunction$lambda$lambda($handlersStruct));
|
|
1034
|
+
var tmp$ret$2 = this_1.l1i();
|
|
1035
|
+
tmp_1.q1v_1 = transform(this_0, tmp$ret$2);
|
|
1036
|
+
var tmp_2 = scope.q1v_1;
|
|
1764
1037
|
tmp_0 = isInterface(tmp_2, Element) ? tmp_2 : THROW_CCE();
|
|
1765
1038
|
} else {
|
|
1766
1039
|
tmp_0 = element;
|
|
@@ -1791,11 +1064,11 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1791
1064
|
if (element instanceof Function) {
|
|
1792
1065
|
var tmp$ret$0;
|
|
1793
1066
|
$l$block_1: {
|
|
1794
|
-
if (!element.
|
|
1067
|
+
if (!element.z1k_1 || element.y1k_1.b1() < 2) {
|
|
1795
1068
|
tmp$ret$0 = element;
|
|
1796
1069
|
break $l$block_1;
|
|
1797
1070
|
}
|
|
1798
|
-
var tmp_0 = element.
|
|
1071
|
+
var tmp_0 = element.y1k_1.c1(element.y1k_1.b1() - 2 | 0);
|
|
1799
1072
|
var tmp0_elvis_lhs = tmp_0 instanceof Assignment ? tmp_0 : null;
|
|
1800
1073
|
var tmp_1;
|
|
1801
1074
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -1805,16 +1078,16 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1805
1078
|
tmp_1 = tmp0_elvis_lhs;
|
|
1806
1079
|
}
|
|
1807
1080
|
var transportAssign = tmp_1;
|
|
1808
|
-
var tmp_2 = last(element.
|
|
1081
|
+
var tmp_2 = last(element.y1k_1);
|
|
1809
1082
|
if (!(tmp_2 instanceof ReturnStatement)) {
|
|
1810
1083
|
tmp$ret$0 = element;
|
|
1811
1084
|
break $l$block_1;
|
|
1812
1085
|
}
|
|
1813
|
-
var tmp_3 = dropLast(element.
|
|
1814
|
-
var tmp1_name = Companion_getInstance().
|
|
1815
|
-
var tmp2_receiver = transportAssign.
|
|
1816
|
-
var tmp3_arguments = mapOf(to(Companion_getInstance().
|
|
1817
|
-
tmp$ret$0 = element.
|
|
1086
|
+
var tmp_3 = dropLast(element.y1k_1, 2);
|
|
1087
|
+
var tmp1_name = Companion_getInstance().x1g('thenApply');
|
|
1088
|
+
var tmp2_receiver = transportAssign.j1q_1;
|
|
1089
|
+
var tmp3_arguments = mapOf(to(Companion_getInstance().x1g('mapper'), new RawExpression('rawResponse -> ' + $endpointName + '.fromRawResponse(serialization(), rawResponse)')));
|
|
1090
|
+
tmp$ret$0 = element.f1l(VOID, VOID, VOID, VOID, plus_0(tmp_3, new ReturnStatement(new FunctionCall(tmp2_receiver, VOID, tmp1_name, tmp3_arguments))));
|
|
1818
1091
|
}
|
|
1819
1092
|
tmp = tmp$ret$0;
|
|
1820
1093
|
} else {
|
|
@@ -1827,10 +1100,10 @@ function wrapAsyncReturnInThenApply$lambda($endpointName) {
|
|
|
1827
1100
|
function buildHandlersStruct$lambda(it) {
|
|
1828
1101
|
var tmp;
|
|
1829
1102
|
if (it instanceof Literal) {
|
|
1830
|
-
tmp = it.
|
|
1103
|
+
tmp = it.tt_1;
|
|
1831
1104
|
} else {
|
|
1832
1105
|
if (it instanceof Param) {
|
|
1833
|
-
tmp = '{' + it.
|
|
1106
|
+
tmp = '{' + it.lq_1.m1() + '}';
|
|
1834
1107
|
} else {
|
|
1835
1108
|
noWhenBranchMatchedException();
|
|
1836
1109
|
}
|
|
@@ -1839,46 +1112,46 @@ function buildHandlersStruct$lambda(it) {
|
|
|
1839
1112
|
}
|
|
1840
1113
|
function buildHandlersStruct$lambda$lambda($pathTemplate) {
|
|
1841
1114
|
return function ($this$function) {
|
|
1842
|
-
$this$function.
|
|
1843
|
-
$this$function.
|
|
1115
|
+
$this$function.o1h(String_instance);
|
|
1116
|
+
$this$function.p1h($this$function.w1u($pathTemplate));
|
|
1844
1117
|
return Unit_instance;
|
|
1845
1118
|
};
|
|
1846
1119
|
}
|
|
1847
1120
|
function buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct) {
|
|
1848
1121
|
return function ($this$function) {
|
|
1849
|
-
$this$function.
|
|
1850
|
-
$this$function.
|
|
1122
|
+
$this$function.o1h(String_instance);
|
|
1123
|
+
$this$function.p1h($this$function.w1u($this_buildHandlersStruct.fq_1.b3_1));
|
|
1851
1124
|
return Unit_instance;
|
|
1852
1125
|
};
|
|
1853
1126
|
}
|
|
1854
1127
|
function buildHandlersStruct$lambda$lambda_1($this$function) {
|
|
1855
|
-
$this$function.
|
|
1856
|
-
$this$function.
|
|
1857
|
-
$this$function.
|
|
1128
|
+
$this$function.o1h($this$function.z1g('Wirespec.ServerEdge', [$this$function.z1g('Request', []), $this$function.z1g('Response', [Wildcard_instance])]));
|
|
1129
|
+
$this$function.l1h('serialization', $this$function.z1g('Wirespec.Serialization', []));
|
|
1130
|
+
$this$function.p1h(new RawExpression('new Wirespec.ServerEdge<>() {\n@Override public Request from(Wirespec.RawRequest request) {\n return fromRawRequest(serialization, request);\n}\n@Override public Wirespec.RawResponse to(Response<?> response) {\n return toRawResponse(serialization, response);\n}\n}'));
|
|
1858
1131
|
return Unit_instance;
|
|
1859
1132
|
}
|
|
1860
1133
|
function buildHandlersStruct$lambda$lambda_2($this$function) {
|
|
1861
|
-
$this$function.
|
|
1862
|
-
$this$function.
|
|
1863
|
-
$this$function.
|
|
1134
|
+
$this$function.o1h($this$function.z1g('Wirespec.ClientEdge', [$this$function.z1g('Request', []), $this$function.z1g('Response', [Wildcard_instance])]));
|
|
1135
|
+
$this$function.l1h('serialization', $this$function.z1g('Wirespec.Serialization', []));
|
|
1136
|
+
$this$function.p1h(new RawExpression('new Wirespec.ClientEdge<>() {\n@Override public Wirespec.RawRequest to(Request request) {\n return toRawRequest(serialization, request);\n}\n@Override public Response<?> from(Wirespec.RawResponse response) {\n return fromRawResponse(serialization, response);\n}\n}'));
|
|
1864
1137
|
return Unit_instance;
|
|
1865
1138
|
}
|
|
1866
1139
|
function buildHandlersStruct$lambda_0($pathTemplate, $this_buildHandlersStruct) {
|
|
1867
1140
|
return function ($this$struct) {
|
|
1868
|
-
$this$struct.
|
|
1869
|
-
$this$struct.
|
|
1870
|
-
$this$struct.
|
|
1871
|
-
$this$struct.
|
|
1872
|
-
$this$struct.
|
|
1873
|
-
$this$struct.
|
|
1141
|
+
$this$struct.l1k($this$struct.z1g('Wirespec.Server', [$this$struct.z1g('Request', []), $this$struct.z1g('Response', [Wildcard_instance])]));
|
|
1142
|
+
$this$struct.l1k($this$struct.z1g('Wirespec.Client', [$this$struct.z1g('Request', []), $this$struct.z1g('Response', [Wildcard_instance])]));
|
|
1143
|
+
$this$struct.q1h('getPathTemplate', VOID, true, buildHandlersStruct$lambda$lambda($pathTemplate));
|
|
1144
|
+
$this$struct.q1h('getMethod', VOID, true, buildHandlersStruct$lambda$lambda_0($this_buildHandlersStruct));
|
|
1145
|
+
$this$struct.q1h('getServer', VOID, true, buildHandlersStruct$lambda$lambda_1);
|
|
1146
|
+
$this$struct.q1h('getClient', VOID, true, buildHandlersStruct$lambda$lambda_2);
|
|
1874
1147
|
return Unit_instance;
|
|
1875
1148
|
};
|
|
1876
1149
|
}
|
|
1877
1150
|
function withFullyQualifiedPrefix$lambda($prefix) {
|
|
1878
1151
|
return function (type, transformer) {
|
|
1879
1152
|
var tmp;
|
|
1880
|
-
if (type instanceof
|
|
1881
|
-
tmp = type.
|
|
1153
|
+
if (type instanceof Custom) {
|
|
1154
|
+
tmp = type.f1n(new Name(listOf($prefix + type.u1i_1.y1g())));
|
|
1882
1155
|
} else {
|
|
1883
1156
|
tmp = type;
|
|
1884
1157
|
}
|
|
@@ -1886,157 +1159,14 @@ function withFullyQualifiedPrefix$lambda($prefix) {
|
|
|
1886
1159
|
return transformChildren_1(transformed, transformer);
|
|
1887
1160
|
};
|
|
1888
1161
|
}
|
|
1889
|
-
function JavaRefinedTypeDefinitionEmitter() {
|
|
1890
|
-
}
|
|
1891
|
-
function JavaShared() {
|
|
1892
|
-
JavaShared_instance = this;
|
|
1893
|
-
this.h1x_1 = 'community.flock.wirespec.java';
|
|
1894
|
-
this.i1x_1 = trimMargin('\n |package ' + this.h1x_1 + ';\n |\n |import java.lang.reflect.Type;\n |import java.lang.reflect.ParameterizedType;\n |import java.util.List;\n |import java.util.Map;\n |import java.util.Optional;\n |\n |public interface Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { String label(); }\n |' + Spacer_instance.toString() + 'interface Endpoint {}\n |' + Spacer_instance.toString() + 'interface Refined<T> { T value(); }\n |' + Spacer_instance.toString() + 'interface Path {}\n |' + Spacer_instance.toString() + 'interface Queries {}\n |' + Spacer_instance.toString() + 'interface Headers {}\n |' + Spacer_instance.toString() + 'interface Handler {}\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.is(2) + 'Req from(RawRequest request);\n |' + Spacer_instance.is(2) + 'RawResponse to(Res response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.is(2) + 'RawRequest to(Req request);\n |' + Spacer_instance.is(2) + 'Res from(RawResponse response);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.is(2) + 'String getPathTemplate();\n |' + Spacer_instance.is(2) + 'String getMethod();\n |' + Spacer_instance.is(2) + 'ClientEdge<Req, Res> getClient(Serialization serialization);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req extends Request<?>, Res extends Response<?>> {\n |' + Spacer_instance.is(2) + 'String getPathTemplate();\n |' + Spacer_instance.is(2) + 'String getMethod();\n |' + Spacer_instance.is(2) + 'ServerEdge<Req, Res> getServer(Serialization serialization);\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T> { Path path(); Method method(); Queries queries(); Headers headers(); T body(); interface Headers extends Wirespec.Headers {} }\n |' + Spacer_instance.toString() + 'interface Response<T> { Integer status(); Headers headers(); T body(); interface Headers extends Wirespec.Headers {} }\n |' + Spacer_instance.toString() + 'interface Serialization extends Serializer, Deserializer {}\n |' + Spacer_instance.toString() + 'interface Serializer extends BodySerializer, PathSerializer, ParamSerializer {}\n |' + Spacer_instance.toString() + 'interface Deserializer extends BodyDeserializer, PathDeserializer, ParamDeserializer {}\n |' + Spacer_instance.toString() + 'interface BodySerialization extends BodySerializer, BodyDeserializer {}\n |' + Spacer_instance.toString() + 'interface BodySerializer { <T> byte[] serializeBody(T t, Type type); }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { <T> T deserializeBody(byte[] raw, Type type); }\n |' + Spacer_instance.toString() + 'interface PathSerialization extends PathSerializer, PathDeserializer {}\n |' + Spacer_instance.toString() + 'interface PathSerializer { <T> String serializePath(T t, Type type); }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { <T> T deserializePath(String raw, Type type); }\n |' + Spacer_instance.toString() + 'interface ParamSerialization extends ParamSerializer, ParamDeserializer {}\n |' + Spacer_instance.toString() + 'interface ParamSerializer { <T> List<String> serializeParam(T value, Type type); }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { <T> T deserializeParam(List<String> values, Type type); }\n |' + Spacer_instance.toString() + 'record RawRequest(String method, List<String> path, Map<String, List<String>> queries, Map<String, List<String>> headers, Optional<byte[]> body) {}\n |' + Spacer_instance.toString() + 'record RawResponse(int statusCode, Map<String, List<String>> headers, Optional<byte[]> body) {}\n |' + Spacer_instance.toString() + 'static Type getType(final Class<?> actualTypeArguments, final Class<?> rawType) {\n |' + Spacer_instance.is(2) + 'if(rawType != null) {\n |' + Spacer_instance.is(3) + 'return new ParameterizedType() {\n |' + Spacer_instance.is(4) + 'public Type getRawType() { return rawType; }\n |' + Spacer_instance.is(4) + 'public Type[] getActualTypeArguments() { return new Class<?>[]{actualTypeArguments}; }\n |' + Spacer_instance.is(4) + 'public Type getOwnerType() { return null; }\n |' + Spacer_instance.is(3) + '};\n |' + Spacer_instance.is(2) + '}\n |' + Spacer_instance.is(2) + 'else { return actualTypeArguments; }\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
|
|
1895
|
-
}
|
|
1896
|
-
protoOf(JavaShared).toString = function () {
|
|
1897
|
-
return 'JavaShared';
|
|
1898
|
-
};
|
|
1899
|
-
protoOf(JavaShared).hashCode = function () {
|
|
1900
|
-
return 1339168438;
|
|
1901
|
-
};
|
|
1902
|
-
protoOf(JavaShared).equals = function (other) {
|
|
1903
|
-
if (this === other)
|
|
1904
|
-
return true;
|
|
1905
|
-
if (!(other instanceof JavaShared))
|
|
1906
|
-
return false;
|
|
1907
|
-
return true;
|
|
1908
|
-
};
|
|
1909
|
-
var JavaShared_instance;
|
|
1910
|
-
function JavaShared_getInstance() {
|
|
1911
|
-
if (JavaShared_instance == null)
|
|
1912
|
-
new JavaShared();
|
|
1913
|
-
return JavaShared_instance;
|
|
1914
|
-
}
|
|
1915
|
-
function emitType($this, _this__u8e3s4) {
|
|
1916
|
-
var tmp;
|
|
1917
|
-
if (_this__u8e3s4 instanceof Dict) {
|
|
1918
|
-
tmp = 'java.util.Map<String, ' + $this.oq(_this__u8e3s4.so_1) + '>';
|
|
1919
|
-
} else {
|
|
1920
|
-
if (_this__u8e3s4 instanceof Iterable) {
|
|
1921
|
-
tmp = 'java.util.List<' + $this.oq(_this__u8e3s4.po_1) + '>';
|
|
1922
|
-
} else {
|
|
1923
|
-
if (_this__u8e3s4 instanceof Unit) {
|
|
1924
|
-
tmp = 'void';
|
|
1925
|
-
} else {
|
|
1926
|
-
if (_this__u8e3s4 instanceof Any) {
|
|
1927
|
-
tmp = 'Object';
|
|
1928
|
-
} else {
|
|
1929
|
-
if (_this__u8e3s4 instanceof Custom) {
|
|
1930
|
-
tmp = _this__u8e3s4.cv_1;
|
|
1931
|
-
} else {
|
|
1932
|
-
if (_this__u8e3s4 instanceof Primitive) {
|
|
1933
|
-
tmp = emit_18($this, _this__u8e3s4);
|
|
1934
|
-
} else {
|
|
1935
|
-
noWhenBranchMatchedException();
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
}
|
|
1942
|
-
return tmp;
|
|
1943
|
-
}
|
|
1944
|
-
function emit_18($this, _this__u8e3s4) {
|
|
1945
|
-
var t = _this__u8e3s4.gv_1;
|
|
1946
|
-
var tmp;
|
|
1947
|
-
if (t instanceof String_0) {
|
|
1948
|
-
tmp = 'String';
|
|
1949
|
-
} else {
|
|
1950
|
-
if (t instanceof Integer) {
|
|
1951
|
-
var tmp_0;
|
|
1952
|
-
switch (t.ku_1.b3_1) {
|
|
1953
|
-
case 0:
|
|
1954
|
-
tmp_0 = 'Integer';
|
|
1955
|
-
break;
|
|
1956
|
-
case 1:
|
|
1957
|
-
tmp_0 = 'Long';
|
|
1958
|
-
break;
|
|
1959
|
-
default:
|
|
1960
|
-
noWhenBranchMatchedException();
|
|
1961
|
-
break;
|
|
1962
|
-
}
|
|
1963
|
-
tmp = tmp_0;
|
|
1964
|
-
} else {
|
|
1965
|
-
if (t instanceof Number_0) {
|
|
1966
|
-
var tmp_1;
|
|
1967
|
-
switch (t.nu_1.b3_1) {
|
|
1968
|
-
case 0:
|
|
1969
|
-
tmp_1 = 'Float';
|
|
1970
|
-
break;
|
|
1971
|
-
case 1:
|
|
1972
|
-
tmp_1 = 'Double';
|
|
1973
|
-
break;
|
|
1974
|
-
default:
|
|
1975
|
-
noWhenBranchMatchedException();
|
|
1976
|
-
break;
|
|
1977
|
-
}
|
|
1978
|
-
tmp = tmp_1;
|
|
1979
|
-
} else {
|
|
1980
|
-
if (t instanceof Boolean_0) {
|
|
1981
|
-
tmp = 'Boolean';
|
|
1982
|
-
} else {
|
|
1983
|
-
if (t instanceof Bytes) {
|
|
1984
|
-
tmp = 'byte[]';
|
|
1985
|
-
} else {
|
|
1986
|
-
noWhenBranchMatchedException();
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
return tmp;
|
|
1993
|
-
}
|
|
1994
|
-
function JavaTypeDefinitionEmitter$emit$lambda(this$0) {
|
|
1995
|
-
return function (it) {
|
|
1996
|
-
return this$0.oq(it);
|
|
1997
|
-
};
|
|
1998
|
-
}
|
|
1999
|
-
function JavaTypeDefinitionEmitter$emit$lambda_0(this$0) {
|
|
2000
|
-
return function (it) {
|
|
2001
|
-
return Spacer_instance.toString() + this$0.nq(it) + ',';
|
|
2002
|
-
};
|
|
2003
|
-
}
|
|
2004
|
-
function JavaTypeDefinitionEmitter() {
|
|
2005
|
-
}
|
|
2006
|
-
function JavaUnionDefinitionEmitter$emit$lambda(it) {
|
|
2007
|
-
return it.l1();
|
|
2008
|
-
}
|
|
2009
|
-
function JavaUnionDefinitionEmitter() {
|
|
2010
|
-
}
|
|
2011
1162
|
//region block: post-declaration
|
|
2012
|
-
protoOf(
|
|
2013
|
-
protoOf(
|
|
2014
|
-
protoOf(
|
|
2015
|
-
protoOf(
|
|
2016
|
-
protoOf(JavaEmitter).oq = emit_6;
|
|
2017
|
-
protoOf(JavaEmitter).pq = emit_7;
|
|
2018
|
-
protoOf(JavaEmitter).bs = emit_13;
|
|
2019
|
-
protoOf(JavaEmitter).k1x = emit_14;
|
|
2020
|
-
protoOf(JavaEmitter).l1x = emit_15;
|
|
2021
|
-
protoOf(JavaEmitter).pr = emit_8;
|
|
2022
|
-
protoOf(JavaEmitter).as = emit_10;
|
|
2023
|
-
protoOf(JavaEmitter).qr = emit_12;
|
|
2024
|
-
protoOf(JavaEmitter).vr = emit_11;
|
|
2025
|
-
protoOf(JavaEmitter).j1x = sanitizeSymbol;
|
|
2026
|
-
protoOf(JavaEmitter).m1x = sanitizeFirstIsDigit;
|
|
2027
|
-
protoOf(JavaEmitter).n1x = sanitizeKeywords;
|
|
2028
|
-
protoOf(JavaEmitter).z1w = emitRoot;
|
|
2029
|
-
protoOf(JavaEmitter).y1w = emitRoot$default;
|
|
2030
|
-
protoOf(JavaEmitter).o1x = emitHandleFunction;
|
|
2031
|
-
protoOf(JavaEmitter).cs = emitValidator;
|
|
2032
|
-
protoOf(JavaIrEmitter).y1v = get_extensions;
|
|
2033
|
-
protoOf(JavaIrEmitter).eo = emit_1;
|
|
2034
|
-
protoOf(JavaIrEmitter).z1v = emit_2;
|
|
2035
|
-
protoOf(JavaIrEmitter).d1w = beforeGenerate;
|
|
1163
|
+
protoOf(JavaIrEmitter).f1w = get_extensions;
|
|
1164
|
+
protoOf(JavaIrEmitter).no = emit_0;
|
|
1165
|
+
protoOf(JavaIrEmitter).g1w = emit_1;
|
|
1166
|
+
protoOf(JavaIrEmitter).k1w = beforeGenerate;
|
|
2036
1167
|
//endregion
|
|
2037
1168
|
//region block: exports
|
|
2038
1169
|
export {
|
|
2039
|
-
JavaEmitter as JavaEmitter1ye60adpym6m1,
|
|
2040
1170
|
JavaIrEmitter as JavaIrEmittereoab4zj7i4gq,
|
|
2041
1171
|
};
|
|
2042
1172
|
//endregion
|