Permalink
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (56 sloc) 3.67 KB
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// interface com.johnholdsworth.swiftbindings.SwiftHelloTypes$TextListener ///
public protocol SwiftHelloTypes_TextListener: JavaProtocol {
/// public abstract java.lang.String com.johnholdsworth.swiftbindings.SwiftHelloTypes$TextListener.getText()
func getText() -> String!
}
open class SwiftHelloTypes_TextListenerForward: JNIObjectForward, SwiftHelloTypes_TextListener {
private static var SwiftHelloTypes_TextListenerJNIClass: jclass?
/// public abstract java.lang.String com.johnholdsworth.swiftbindings.SwiftHelloTypes$TextListener.getText()
private static var getText_MethodID_2: jmethodID?
open func getText() -> String! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getText", methodSig: "()Ljava/lang/String;", methodCache: &SwiftHelloTypes_TextListenerForward.getText_MethodID_2, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? String( javaObject: __return ) : nil
}
}
private typealias SwiftHelloTypes_TextListener_getText_0_type = @convention(c) ( _: UnsafeMutablePointer<JNIEnv?>, _: jobject?, _: jlong ) -> jobject?
private func SwiftHelloTypes_TextListener_getText_0( _ __env: UnsafeMutablePointer<JNIEnv?>, _ __this: jobject?, _ __swiftObject: jlong ) -> jobject? {
let __return = SwiftHelloTypes_TextListenerLocal_.swiftObject( jniEnv: __env, javaObject: __this, swiftObject: __swiftObject ).getText( )
var __locals = [jobject]()
return JNI.check( JNIType.toJava( value: __return, locals: &__locals ).l, &__locals, removeLast: true )
}
fileprivate class SwiftHelloTypes_TextListenerLocal_: JNILocalProxy<SwiftHelloTypes_TextListener, Any> {
fileprivate static let _proxyClass: jclass = {
var natives = [JNINativeMethod]()
let SwiftHelloTypes_TextListener_getText_0_thunk: SwiftHelloTypes_TextListener_getText_0_type = SwiftHelloTypes_TextListener_getText_0
natives.append( JNINativeMethod( name: strdup("__getText"), signature: strdup("(J)Ljava/lang/String;"), fnPtr: unsafeBitCast( SwiftHelloTypes_TextListener_getText_0_thunk, to: UnsafeMutableRawPointer.self ) ) )
natives.append( JNINativeMethod( name: strdup("__finalize"), signature: strdup("(J)V"), fnPtr: unsafeBitCast( JNIReleasableProxy__finalize_thunk, to: UnsafeMutableRawPointer.self ) ) )
let clazz = JNI.FindClass( proxyClassName() )
withUnsafePointer(to: &natives[0]) {
nativesPtr in
if JNI.api.RegisterNatives( JNI.env, clazz, nativesPtr, jint(natives.count) ) != jint(JNI_OK) {
JNI.report( "Unable to register java natives" )
}
}
defer { JNI.DeleteLocalRef( clazz ) }
return JNI.api.NewGlobalRef( JNI.env, clazz )!
}()
override open class func proxyClassName() -> String { return "org/swiftjava/com_johnholdsworth/SwiftHelloTypes_TextListenerProxy" }
override open class func proxyClass() -> jclass? { return _proxyClass }
}
extension SwiftHelloTypes_TextListener {
public func localJavaObject( _ locals: UnsafeMutablePointer<[jobject]> ) -> jobject? {
return SwiftHelloTypes_TextListenerLocal_( owned: self, proto: self ).localJavaObject( locals )
}
}
open class SwiftHelloTypes_TextListenerBase: SwiftHelloTypes_TextListener {
public init() {}
/// public abstract java.lang.String com.johnholdsworth.swiftbindings.SwiftHelloTypes$TextListener.getText()
open func getText() -> String! /**/ {
return nil
}
}