File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ import JavaRuntime
6161
6262@JavaClass (" org.swift.javakit.HelloSwiftMain" )
6363struct HelloSwiftMain {
64- @ExposeToJava
64+ @ImplementsJava
6565 static func main (arguments : [String ], environment : JNIEnvironment) {
6666 print (" Command line arguments are: \( arguments ) " )
6767 }
@@ -94,7 +94,7 @@ struct HelloSwiftMain: ParsableCommand {
9494 @Option (name: .shortAndLong , help: " Enable verbose output" )
9595 var verbose: Bool = false
9696
97- @ExposeToJava
97+ @ImplementsJava
9898 static func main (arguments : [String ], environment : JNIEnvironment) {
9999 let command = Self .parseOrExit (arguments)
100100 command.run (environment : environment)
@@ -322,12 +322,12 @@ struct HelloSwift { ... }
322322```
323323
324324Implementations of ` native ` methods can be written within the Swift type or an
325- extension thereof, and should be marked with ` @ExposeToJava ` . For example:
325+ extension thereof, and should be marked with ` @ImplementsJava ` . For example:
326326
327327``` swift
328328@JavaClass (" org.swift.javakit.HelloSwift" )
329329extension HelloSwift {
330- @ExposeToJava
330+ @ImplementsJava
331331 func reportStatistics (_ meaning : String , _ numbers : [Double ]) -> String {
332332 let average = numbers.isEmpty ? 0.0 : numbers.reduce (0.0 ) { $0 + $1 } / Double (numbers.count )
333333 return " Average of \( meaning ) is \( average ) "
You can’t perform that action at this time.
0 commit comments