Skip to content

Commit 3640052

Browse files
committed
fix javadoc formatting
1 parent 5dd3f36 commit 3640052

File tree

9 files changed

+142
-142
lines changed

9 files changed

+142
-142
lines changed

Sources/JExtractSwiftLib/JNI/JNISwift2JavaGenerator+JavaBindingsPrinting.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@ extension JNISwift2JavaGenerator {
356356
printer.print(
357357
"""
358358
/**
359-
* Downcall to Swift:
360-
* {@snippet lang=swift :
361-
* \(decl.signatureString)
362-
* }
363-
*/
359+
* Downcall to Swift:
360+
* {@snippet lang=swift :
361+
* \(decl.signatureString)
362+
* }
363+
*/
364364
"""
365365
)
366366
}

Tests/JExtractSwiftTests/JNI/JNIClassTests.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -158,22 +158,22 @@ struct JNIClassTests {
158158
expectedChunks: [
159159
"""
160160
/**
161-
* Downcall to Swift:
162-
* {@snippet lang=swift :
163-
* public init(x: Int64, y: Int64)
164-
* }
165-
*/
161+
* Downcall to Swift:
162+
* {@snippet lang=swift :
163+
* public init(x: Int64, y: Int64)
164+
* }
165+
*/
166166
public static MyClass init(long x, long y, SwiftArena swiftArena$) {
167167
return new MyClass(MyClass.$init(x, y), swiftArena$);
168168
}
169169
""",
170170
"""
171171
/**
172-
* Downcall to Swift:
173-
* {@snippet lang=swift :
174-
* public init()
175-
* }
176-
*/
172+
* Downcall to Swift:
173+
* {@snippet lang=swift :
174+
* public init()
175+
* }
176+
*/
177177
public static MyClass init(SwiftArena swiftArena$) {
178178
return new MyClass(MyClass.$init(), swiftArena$);
179179
}
@@ -303,11 +303,11 @@ struct JNIClassTests {
303303
expectedChunks: [
304304
"""
305305
/**
306-
* Downcall to Swift:
307-
* {@snippet lang=swift :
308-
* public func copy() -> MyClass
309-
* }
310-
*/
306+
* Downcall to Swift:
307+
* {@snippet lang=swift :
308+
* public func copy() -> MyClass
309+
* }
310+
*/
311311
public MyClass copy(SwiftArena swiftArena$) {
312312
return new MyClass(MyClass.$copy(this.$memoryAddress()), swiftArena$);
313313
}
@@ -355,11 +355,11 @@ struct JNIClassTests {
355355
expectedChunks: [
356356
"""
357357
/**
358-
* Downcall to Swift:
359-
* {@snippet lang=swift :
360-
* public func isEqual(to other: MyClass) -> Bool
361-
* }
362-
*/
358+
* Downcall to Swift:
359+
* {@snippet lang=swift :
360+
* public func isEqual(to other: MyClass) -> Bool
361+
* }
362+
*/
363363
public boolean isEqual(MyClass other) {
364364
return MyClass.$isEqual(other.$memoryAddress(), this.$memoryAddress());
365365
}

Tests/JExtractSwiftTests/JNI/JNIClosureTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ struct JNIClosureTests {
3636
""",
3737
"""
3838
/**
39-
* Downcall to Swift:
40-
* {@snippet lang=swift :
41-
* public func emptyClosure(closure: () -> ())
42-
* }
43-
*/
39+
* Downcall to Swift:
40+
* {@snippet lang=swift :
41+
* public func emptyClosure(closure: () -> ())
42+
* }
43+
*/
4444
public static void emptyClosure(com.example.swift.SwiftModule.emptyClosure.closure closure) {
4545
SwiftModule.$emptyClosure(closure);
4646
}
@@ -88,11 +88,11 @@ struct JNIClosureTests {
8888
""",
8989
"""
9090
/**
91-
* Downcall to Swift:
92-
* {@snippet lang=swift :
93-
* public func closureWithArgumentsAndReturn(closure: (Int64, Bool) -> Int64)
94-
* }
95-
*/
91+
* Downcall to Swift:
92+
* {@snippet lang=swift :
93+
* public func closureWithArgumentsAndReturn(closure: (Int64, Bool) -> Int64)
94+
* }
95+
*/
9696
public static void closureWithArgumentsAndReturn(com.example.swift.SwiftModule.closureWithArgumentsAndReturn.closure closure) {
9797
SwiftModule.$closureWithArgumentsAndReturn(closure);
9898
}

Tests/JExtractSwiftTests/JNI/JNIJavaKitTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ struct JNIJavaKitTests {
3737
expectedChunks: [
3838
"""
3939
/**
40-
* Downcall to Swift:
41-
* {@snippet lang=swift :
42-
* public func function(javaLong: JavaLong, javaInteger: JavaInteger, int: Int64)
43-
* }
44-
*/
40+
* Downcall to Swift:
41+
* {@snippet lang=swift :
42+
* public func function(javaLong: JavaLong, javaInteger: JavaInteger, int: Int64)
43+
* }
44+
*/
4545
public static void function(java.lang.Long javaLong, java.lang.Integer javaInteger, long int) {
4646
SwiftModule.$function(javaLong, javaInteger, int);
4747
}

Tests/JExtractSwiftTests/JNI/JNIModuleTests.swift

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ struct JNIModuleTests {
6767
expectedChunks: [
6868
"""
6969
/**
70-
* Downcall to Swift:
71-
* {@snippet lang=swift :
72-
* public func helloWorld()
73-
* }
74-
*/
70+
* Downcall to Swift:
71+
* {@snippet lang=swift :
72+
* public func helloWorld()
73+
* }
74+
*/
7575
public static void helloWorld() {
7676
SwiftModule.$helloWorld();
7777
}
@@ -81,11 +81,11 @@ struct JNIModuleTests {
8181
""",
8282
"""
8383
/**
84-
* Downcall to Swift:
85-
* {@snippet lang=swift :
86-
* public func takeIntegers(i1: Int8, i2: Int16, i3: Int32, i4: Int64) -> UInt16
87-
* }
88-
*/
84+
* Downcall to Swift:
85+
* {@snippet lang=swift :
86+
* public func takeIntegers(i1: Int8, i2: Int16, i3: Int32, i4: Int64) -> UInt16
87+
* }
88+
*/
8989
@Unsigned
9090
public static char takeIntegers(byte i1, short i2, int i3, long i4) {
9191
return SwiftModule.$takeIntegers(i1, i2, i3, i4);
@@ -96,11 +96,11 @@ struct JNIModuleTests {
9696
""",
9797
"""
9898
/**
99-
* Downcall to Swift:
100-
* {@snippet lang=swift :
101-
* public func otherPrimitives(b: Bool, f: Float, d: Double)
102-
* }
103-
*/
99+
* Downcall to Swift:
100+
* {@snippet lang=swift :
101+
* public func otherPrimitives(b: Bool, f: Float, d: Double)
102+
* }
103+
*/
104104
public static void otherPrimitives(boolean b, float f, double d) {
105105
SwiftModule.$otherPrimitives(b, f, d);
106106
}
@@ -151,11 +151,11 @@ struct JNIModuleTests {
151151
expectedChunks: [
152152
"""
153153
/**
154-
* Downcall to Swift:
155-
* {@snippet lang=swift :
156-
* public func copy(_ string: String) -> String
157-
* }
158-
*/
154+
* Downcall to Swift:
155+
* {@snippet lang=swift :
156+
* public func copy(_ string: String) -> String
157+
* }
158+
*/
159159
public static java.lang.String copy(java.lang.String string) {
160160
return SwiftModule.$copy(string);
161161
}
@@ -194,11 +194,11 @@ struct JNIModuleTests {
194194
expectedChunks: [
195195
"""
196196
/**
197-
* Downcall to Swift:
198-
* {@snippet lang=swift :
199-
* public func methodA() throws
200-
* }
201-
*/
197+
* Downcall to Swift:
198+
* {@snippet lang=swift :
199+
* public func methodA() throws
200+
* }
201+
*/
202202
public static void methodA() throws Exception {
203203
SwiftModule.$methodA();
204204
}
@@ -208,11 +208,11 @@ struct JNIModuleTests {
208208
""",
209209
"""
210210
/**
211-
* Downcall to Swift:
212-
* {@snippet lang=swift :
213-
* public func methodB() throws -> Int64
214-
* }
215-
*/
211+
* Downcall to Swift:
212+
* {@snippet lang=swift :
213+
* public func methodB() throws -> Int64
214+
* }
215+
*/
216216
public static long methodB() throws Exception {
217217
return SwiftModule.$methodB();
218218
}

Tests/JExtractSwiftTests/JNI/JNIOptionalTests.swift

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ struct JNIOptionalTests {
4646
* public func optionalSugar(_ arg: Int64?) -> Int32?
4747
* }
4848
*/
49-
public static OptionalInt optionalSugar(OptionalLong arg) {
50-
long combined$ = SwiftModule.$optionalSugar((byte) (arg.isPresent() ? 1 : 0), arg.orElse(0L));
51-
byte discriminator$ = (byte) (combined$ & 0xFF);
52-
int value$ = (int) (combined$ >> 32);
53-
return discriminator$ == 1 ? OptionalInt.of(value$) : OptionalInt.empty();
54-
}
49+
public static OptionalInt optionalSugar(OptionalLong arg) {
50+
long combined$ = SwiftModule.$optionalSugar((byte) (arg.isPresent() ? 1 : 0), arg.orElse(0L));
51+
byte discriminator$ = (byte) (combined$ & 0xFF);
52+
int value$ = (int) (combined$ >> 32);
53+
return discriminator$ == 1 ? OptionalInt.of(value$) : OptionalInt.empty();
54+
}
5555
""",
5656
"""
5757
private static native long $optionalSugar(byte arg_discriminator, long arg_value);
@@ -92,16 +92,16 @@ struct JNIOptionalTests {
9292
expectedChunks: [
9393
"""
9494
/**
95-
* Downcall to Swift:
96-
* {@snippet lang=swift :
97-
* public func optionalExplicit(_ arg: Optional<String>) -> Optional<String>
98-
* }
99-
*/
100-
public static Optional<String> optionalExplicit(Optional<String> arg) {
101-
byte[] result_discriminator$ = new byte[1];
102-
java.lang.String result$ = SwiftModule.$optionalExplicit((byte) (arg.isPresent() ? 1 : 0), arg.orElse(null), result_discriminator$);
103-
return (result_discriminator$[0] == 1) ? Optional.of(result$) : Optional.empty();
104-
}
95+
* Downcall to Swift:
96+
* {@snippet lang=swift :
97+
* public func optionalExplicit(_ arg: Optional<String>) -> Optional<String>
98+
* }
99+
*/
100+
public static Optional<String> optionalExplicit(Optional<String> arg) {
101+
byte[] result_discriminator$ = new byte[1];
102+
java.lang.String result$ = SwiftModule.$optionalExplicit((byte) (arg.isPresent() ? 1 : 0), arg.orElse(null), result_discriminator$);
103+
return (result_discriminator$[0] == 1) ? Optional.of(result$) : Optional.empty();
104+
}
105105
""",
106106
"""
107107
private static native java.lang.String $optionalExplicit(byte arg_discriminator, java.lang.String arg_value, byte[] result_discriminator$);
@@ -150,16 +150,16 @@ struct JNIOptionalTests {
150150
expectedChunks: [
151151
"""
152152
/**
153-
* Downcall to Swift:
154-
* {@snippet lang=swift :
155-
* public func optionalClass(_ arg: MyClass?) -> MyClass?
156-
* }
157-
*/
158-
public static Optional<MyClass> optionalClass(Optional<MyClass> arg, SwiftArena swiftArena$) {
159-
byte[] result_discriminator$ = new byte[1];
160-
long result$ = SwiftModule.$optionalClass(arg.map(MyClass::$memoryAddress).orElse(0L), result_discriminator$);
161-
return (result_discriminator$[0] == 1) ? Optional.of(new MyClass(result$, swiftArena$)) : Optional.empty();
162-
}
153+
* Downcall to Swift:
154+
* {@snippet lang=swift :
155+
* public func optionalClass(_ arg: MyClass?) -> MyClass?
156+
* }
157+
*/
158+
public static Optional<MyClass> optionalClass(Optional<MyClass> arg, SwiftArena swiftArena$) {
159+
byte[] result_discriminator$ = new byte[1];
160+
long result$ = SwiftModule.$optionalClass(arg.map(MyClass::$memoryAddress).orElse(0L), result_discriminator$);
161+
return (result_discriminator$[0] == 1) ? Optional.of(new MyClass(result$, swiftArena$)) : Optional.empty();
162+
}
163163
""",
164164
"""
165165
private static native long $optionalClass(long arg, byte[] result_discriminator$);
@@ -213,14 +213,14 @@ struct JNIOptionalTests {
213213
expectedChunks: [
214214
"""
215215
/**
216-
* Downcall to Swift:
217-
* {@snippet lang=swift :
218-
* public func optionalJavaKitClass(_ arg: JavaLong?)
219-
* }
220-
*/
221-
public static void optionalJavaKitClass(Optional<java.lang.Long> arg) {
222-
SwiftModule.$optionalJavaKitClass(arg.orElse(null));
223-
}
216+
* Downcall to Swift:
217+
* {@snippet lang=swift :
218+
* public func optionalJavaKitClass(_ arg: JavaLong?)
219+
* }
220+
*/
221+
public static void optionalJavaKitClass(Optional<java.lang.Long> arg) {
222+
SwiftModule.$optionalJavaKitClass(arg.orElse(null));
223+
}
224224
""",
225225
"""
226226
private static native void $optionalJavaKitClass(java.lang.Long arg);

Tests/JExtractSwiftTests/JNI/JNIStructTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ struct JNIStructTests {
104104
expectedChunks: [
105105
"""
106106
/**
107-
* Downcall to Swift:
108-
* {@snippet lang=swift :
109-
* public init(x: Int64, y: Int64)
110-
* }
111-
*/
107+
* Downcall to Swift:
108+
* {@snippet lang=swift :
109+
* public init(x: Int64, y: Int64)
110+
* }
111+
*/
112112
public static MyStruct init(long x, long y, SwiftArena swiftArena$) {
113113
return new MyStruct(MyStruct.$init(x, y), swiftArena$);
114114
}
@@ -176,11 +176,11 @@ struct JNIStructTests {
176176
expectedChunks: [
177177
"""
178178
/**
179-
* Downcall to Swift:
180-
* {@snippet lang=swift :
181-
* public func doSomething(x: Int64)
182-
* }
183-
*/
179+
* Downcall to Swift:
180+
* {@snippet lang=swift :
181+
* public func doSomething(x: Int64)
182+
* }
183+
*/
184184
public void doSomething(long x) {
185185
MyStruct.$doSomething(x, this.$memoryAddress());
186186
}

0 commit comments

Comments
 (0)