@@ -301,9 +301,10 @@ extension AnyJavaObject {
301301extension JavaClass {
302302 /// Call a Java static method with the given name and arguments, which must be
303303 /// of the correct type, that produces the given result type.
304- public func dynamicJavaMethodCall < each Param : JavaValue , Result: JavaValue > (
304+ public func dynamicJavaStaticMethodCall < each Param : JavaValue , Result: JavaValue > (
305305 methodName: String ,
306- args: repeat each Param
306+ arguments: repeat each Param ,
307+ resultType: Result . Type
307308 ) throws -> Result {
308309 let thisClass = javaThis
309310 let environment = javaEnvironment
@@ -325,7 +326,7 @@ extension JavaClass {
325326
326327 // Retrieve the method that performs this call, then
327328 let jniMethod = Result . jniStaticMethodCall ( in: environment)
328- let jniArgs = getJValues ( repeat each args , in: environment)
329+ let jniArgs = getJValues ( repeat each arguments , in: environment)
329330 let jniResult = try environment. translatingJNIExceptions {
330331 jniMethod ( environment, thisClass, methodID, jniArgs)
331332 }
@@ -335,9 +336,9 @@ extension JavaClass {
335336
336337 /// Call a Java static method with the given name and arguments, which must be
337338 /// of the correct type, that produces the given result type.
338- public func dynamicJavaMethodCall < each Param : JavaValue > (
339+ public func dynamicJavaStaticMethodCall < each Param : JavaValue > (
339340 methodName: String ,
340- args : repeat each Param
341+ arguments : repeat each Param
341342 ) throws {
342343 let thisClass = javaThis
343344 let environment = javaEnvironment
@@ -359,7 +360,7 @@ extension JavaClass {
359360
360361 // Retrieve the method that performs this call, then
361362 let jniMethod = environment. interface. CallStaticVoidMethodA
362- let jniArgs = getJValues ( repeat each args , in: environment)
363+ let jniArgs = getJValues ( repeat each arguments , in: environment)
363364 try environment. translatingJNIExceptions {
364365 jniMethod!( environment, thisClass, methodID, jniArgs)
365366 }
0 commit comments