forked from swiftlang/swift-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMethodImportTests.swift
More file actions
776 lines (681 loc) · 22.2 KB
/
MethodImportTests.swift
File metadata and controls
776 lines (681 loc) · 22.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift.org project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Swift.org project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CodePrinting
import JExtractSwiftLib
import SwiftJavaConfigurationShared
import Testing
@Suite
final class MethodImportTests {
let class_interfaceFile =
"""
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.7.6 clang-1600.0.24.1)
// swift-module-flags: -target arm64-apple-macosx15.0 -enable-objc-interop -enable-library-evolution -module-name MySwiftLibrary
import Darwin.C
import Darwin
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
/// Hello World!
public func /*comment*/helloWorld()
public func globalTakeInt(i: Int)
public func globalTakeIntLongString(
i32: Int32,
l: Int64,
s: String
)
public func globalReturnClass() -> MySwiftClass
public func globalReturnAny() -> Any
public func swapRawBufferPointer(buffer: UnsafeRawBufferPointer) -> UnsafeMutableRawBufferPointer
extension MySwiftClass {
public func helloMemberInExtension()
}
public class MySwiftClass {
public init(len: Swift.Int, cap: Swift.Int)
public func helloMemberFunction()
public func makeInt() -> Int
@objc deinit
}
public struct MySwiftStruct {
public init(len: Swift.Int, cap: Swift.Int) {}
}
"""
@Test("Import: public func helloWorld()")
func method_helloWorld() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let funcDecl = try #require(st.importedGlobalFuncs.first { $0.name == "helloWorld" })
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Hello World!
*
* <p>Downcall to Swift:
* {@snippet lang=swift :
* public func helloWorld()
* }
*/
public static void helloWorld() {
swiftjava___FakeModule_helloWorld.call();
}
"""
)
}
@Test("Import: public func globalTakeInt(i: Int)")
func func_globalTakeInt() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl = try #require(
st.importedGlobalFuncs.first {
$0.name == "globalTakeInt"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func globalTakeInt(i: Int)
* }
*/
public static void globalTakeInt(long i) throws SwiftIntegerOverflowException {
if (SwiftValueLayout.has32bitSwiftInt) {
if (i < Integer.MIN_VALUE || i > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Parameter 'i' overflow: " + i);
}
}
swiftjava___FakeModule_globalTakeInt_i.call(i);
}
"""
)
}
@Test("Import: public func globalTakeIntLongString(i32: Int32, l: Int64, s: String)")
func func_globalTakeIntLongString() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl = try #require(
st.importedGlobalFuncs.first {
$0.name == "globalTakeIntLongString"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func globalTakeIntLongString(i32: Int32, l: Int64, s: String)
* }
*/
public static void globalTakeIntLongString(int i32, long l, java.lang.String s) {
try(var arena$ = Arena.ofConfined()) {
swiftjava___FakeModule_globalTakeIntLongString_i32_l_s.call(i32, l, SwiftStrings.toCString(s, arena$));
}
}
"""
)
}
@Test("Import: public func globalReturnClass() -> MySwiftClass")
func func_globalReturnClass() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl = try #require(
st.importedGlobalFuncs.first {
$0.name == "globalReturnClass"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func globalReturnClass() -> MySwiftClass
* }
*/
public static MySwiftClass globalReturnClass(AllocatingSwiftArena swiftArena) {
MemorySegment result$ = swiftArena.allocate(MySwiftClass.$LAYOUT);
swiftjava___FakeModule_globalReturnClass.call(result$);
return MySwiftClass.wrapMemoryAddressUnsafe(result$, swiftArena);
}
"""
)
}
@Test("Import: func swapRawBufferPointer(buffer: _)")
func func_globalSwapRawBufferPointer() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl = try #require(
st.importedGlobalFuncs.first {
$0.name == "swapRawBufferPointer"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func swapRawBufferPointer(buffer: UnsafeRawBufferPointer) -> UnsafeMutableRawBufferPointer
* }
*/
public static java.lang.foreign.MemorySegment swapRawBufferPointer(java.lang.foreign.MemorySegment buffer) {
try(var arena$ = Arena.ofConfined()) {
MemorySegment result$_pointer = arena$.allocate(SwiftValueLayout.SWIFT_POINTER);
MemorySegment result$_count = arena$.allocate(SwiftValueLayout.SWIFT_INT64);
swiftjava___FakeModule_swapRawBufferPointer_buffer.call(buffer, buffer.byteSize(), result$_pointer, result$_count);
return result$_pointer.get(SwiftValueLayout.SWIFT_POINTER, 0).reinterpret(result$_count.get(SwiftValueLayout.SWIFT_INT64, 0));
}
}
"""
)
}
@Test
func method_class_helloMemberFunction() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl: ImportedFunc = try #require(
st.importedTypes["MySwiftClass"]!.methods.first {
$0.name == "helloMemberFunction"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func helloMemberFunction()
* }
*/
public void helloMemberFunction() {
$ensureAlive()
swiftjava___FakeModule_MySwiftClass_helloMemberFunction.call(this.$memorySegment());
}
"""
)
}
@Test
func method_class_makeInt() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .info
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let funcDecl: ImportedFunc = try #require(
st.importedTypes["MySwiftClass"]!.methods.first {
$0.name == "makeInt"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, funcDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public func makeInt() -> Int
* }
*/
public long makeInt() throws SwiftIntegerOverflowException {
$ensureAlive();
long result$checked = swiftjava___FakeModule_MySwiftClass_makeInt.call(this.$memorySegment());
if (SwiftValueLayout.has32bitSwiftInt) {
if (result$checked < Integer.MIN_VALUE || result$checked > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Return value overflow: " + result$checked);
}
}
return result$checked;
}
"""
)
}
@Test
func class_constructor() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .info
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let initDecl: ImportedFunc = try #require(
st.importedTypes["MySwiftClass"]!.initializers.first {
$0.name == "init"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, initDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public init(len: Swift.Int, cap: Swift.Int)
* }
*/
public static MySwiftClass init(long len, long cap, AllocatingSwiftArena swiftArena) throws SwiftIntegerOverflowException {
MemorySegment result$ = swiftArena.allocate(MySwiftClass.$LAYOUT);
if (SwiftValueLayout.has32bitSwiftInt) {
if (len < Integer.MIN_VALUE || len > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Parameter 'len' overflow: " + len);
}
if (cap < Integer.MIN_VALUE || cap > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Parameter 'cap' overflow: " + cap);
}
}
swiftjava___FakeModule_MySwiftClass_init_len_cap.call(len, cap, result$)
return MySwiftClass.wrapMemoryAddressUnsafe(result$, swiftArena);
}
"""
)
}
@Test
func struct_constructor() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .info
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
let initDecl: ImportedFunc = try #require(
st.importedTypes["MySwiftStruct"]!.initializers.first {
$0.name == "init"
}
)
let generator = FFMSwift2JavaGenerator(
config: config,
translator: st,
javaPackage: "com.example.swift",
swiftOutputDirectory: "/fake",
javaOutputDirectory: "/fake"
)
let output = CodePrinter.toString { printer in
generator.printJavaBindingWrapperMethod(&printer, initDecl)
}
assertOutput(
output,
expected:
"""
/**
* Downcall to Swift:
* {@snippet lang=swift :
* public init(len: Swift.Int, cap: Swift.Int)
* }
*/
public static MySwiftStruct init(long len, long cap, AllocatingSwiftArena swiftArena) throws SwiftIntegerOverflowException {
MemorySegment result$ = swiftArena.allocate(MySwiftStruct.$LAYOUT);
if (SwiftValueLayout.has32bitSwiftInt) {
if (len < Integer.MIN_VALUE || len > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Parameter 'len' overflow: " + len);
}
if (cap < Integer.MIN_VALUE || cap > Integer.MAX_VALUE) {
throw new SwiftIntegerOverflowException("Parameter 'cap' overflow: " + cap);
}
}
swiftjava___FakeModule_MySwiftStruct_init_len_cap.call(len, cap, result$)
return MySwiftStruct.wrapMemoryAddressUnsafe(result$, swiftArena);
}
"""
)
}
@Test("Import: public func globalReturnAny() -> Any")
func func_globalReturnAny() throws {
var config = Configuration()
config.swiftModule = "__FakeModule"
let st = Swift2JavaTranslator(config: config)
st.log.logLevel = .error
try st.analyze(path: "Fake.swift", text: class_interfaceFile)
#expect(
!st.importedGlobalFuncs.contains {
$0.name == "globalReturnAny"
},
"'Any' return type is not supported yet"
)
}
// ==== -------------------------------------------------------------------
// MARK: FFM overloaded method disambiguation
let overloaded_interfaceFile =
"""
import Swift
public func takeValue(a: Swift.String) -> Swift.Int
public func takeValue(b: Swift.String) -> Swift.Int
public func uniqueFunc(x: Swift.Int) -> Swift.Int
public func overloaded(a: Swift.Int) -> Swift.Int
public func overloaded(a: Swift.String) -> Swift.Int
public class OverloadedClass {
public func bar(a: Swift.String)
public func bar(b: Swift.String)
public func unique(x: Swift.Int)
}
"""
@Test("FFM: Overloaded global functions get suffixed Java names")
func ffm_overloaded_global_functions_suffixed() throws {
try assertOutput(
input: overloaded_interfaceFile,
.ffm,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long takeValueA(java.lang.String a)",
"public static long takeValueB(java.lang.String b)",
]
)
}
@Test("FFM: Non-overloaded functions keep clean names")
func ffm_non_overloaded_functions_clean_names() throws {
try assertOutput(
input: overloaded_interfaceFile,
.ffm,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long uniqueFunc(long x)"
],
notExpectedChunks: [
"public static long uniqueFunc_x("
]
)
}
@Test("FFM: Same name but different types — no suffix needed")
func ffm_overloaded_different_types_no_suffix() throws {
try assertOutput(
input: overloaded_interfaceFile,
.ffm,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long overloaded(long a)",
"public static long overloaded(java.lang.String a)",
],
notExpectedChunks: [
"public static long overloaded_a("
]
)
}
@Test("FFM: Overloaded methods on a type get suffixed Java names")
func ffm_overloaded_methods_on_type_suffixed() throws {
try assertOutput(
input: overloaded_interfaceFile,
.ffm,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public void barA(java.lang.String a)",
"public void barB(java.lang.String b)",
]
)
}
@Test("FFM: Non-overloaded method on a type keeps clean name")
func ffm_non_overloaded_method_on_type_clean_name() throws {
try assertOutput(
input: overloaded_interfaceFile,
.ffm,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public void unique(long x)"
],
notExpectedChunks: [
"public void unique_x("
]
)
}
let propertyMethodConflict_interfaceFile =
"""
import Swift
public class MyClass {
public var name: Swift.Int { get }
public func getName() -> Swift.Int
}
"""
@Test("FFM: Property getter and method with same Java name are disambiguated")
func ffm_property_getter_vs_method_conflict() throws {
try assertOutput(
input: propertyMethodConflict_interfaceFile,
.ffm,
.java,
swiftModuleName: "ConflictModule",
expectedChunks: [
// Property getter keeps standard Java bean name
"public long getName()",
// Method gets a trailing underscore to avoid the conflict
"public long getName_()",
]
)
}
let argumentLabel_interfaceFile =
"""
import Swift
public func takeValue(outer name: Swift.String) -> Swift.Int
public func takeValue(another name: Swift.String) -> Swift.Int
"""
@Test("FFM: Overloaded functions with argument labels use label for suffix")
func ffm_overloaded_argument_labels() throws {
try assertOutput(
input: argumentLabel_interfaceFile,
.ffm,
.java,
swiftModuleName: "LabelModule",
expectedChunks: [
"public static long takeValueOuter(java.lang.String name)",
"public static long takeValueAnother(java.lang.String name)",
]
)
}
// ==== -------------------------------------------------------------------
// MARK: JNI overloaded method disambiguation
@Test("JNI: Overloaded global functions get suffixed Java names")
func jni_overloaded_global_functions_suffixed() throws {
try assertOutput(
input: overloaded_interfaceFile,
.jni,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long takeValueA(java.lang.String a)",
"public static long takeValueB(java.lang.String b)",
]
)
}
@Test("JNI: Non-overloaded functions keep clean names")
func jni_non_overloaded_functions_clean_names() throws {
try assertOutput(
input: overloaded_interfaceFile,
.jni,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long uniqueFunc(long x)"
],
notExpectedChunks: [
"public static long uniqueFunc_x("
]
)
}
@Test("JNI: Same name but different types — no suffix needed")
func jni_overloaded_different_types_no_suffix() throws {
try assertOutput(
input: overloaded_interfaceFile,
.jni,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public static long overloaded(long a)",
"public static long overloaded(java.lang.String a)",
],
notExpectedChunks: [
"public static long overloaded_a("
]
)
}
@Test("JNI: Overloaded methods on a type get suffixed Java names")
func jni_overloaded_methods_on_type_suffixed() throws {
try assertOutput(
input: overloaded_interfaceFile,
.jni,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public void barA(java.lang.String a)",
"public void barB(java.lang.String b)",
]
)
}
@Test("JNI: Non-overloaded method on a type keeps clean name")
func jni_non_overloaded_method_on_type_clean_name() throws {
try assertOutput(
input: overloaded_interfaceFile,
.jni,
.java,
swiftModuleName: "OverloadModule",
expectedChunks: [
"public void unique(long x)"
],
notExpectedChunks: [
"public void unique_x("
]
)
}
@Test("JNI: Property getter and method with same Java name are disambiguated")
func jni_property_getter_vs_method_conflict() throws {
try assertOutput(
input: propertyMethodConflict_interfaceFile,
.jni,
.java,
swiftModuleName: "ConflictModule",
expectedChunks: [
"public long getName()",
"public long getName_()",
]
)
}
@Test("JNI: Overloaded functions with argument labels use label for suffix")
func jni_overloaded_argument_labels() throws {
try assertOutput(
input: argumentLabel_interfaceFile,
.jni,
.java,
swiftModuleName: "LabelModule",
expectedChunks: [
"public static long takeValueOuter(java.lang.String name)",
"public static long takeValueAnother(java.lang.String name)",
]
)
}
}