
import java_swift

/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///

/// class com.johnholdsworth.swiftbindings.SwiftHelloTest$SwiftTestListener ///

open class SwiftHelloTest_SwiftTestListener: SwiftHelloTest_TestResponderAdapter {

    public convenience init?( casting object: java_swift.JavaObject, _ file: StaticString = #file, _ line: Int = #line ) {
        self.init( javaObject: nil )
        object.withJavaObject {
            self.javaObject = $0
        }
    }

    private static var SwiftHelloTest_SwiftTestListenerJNIClass: jclass?

    /// static int com.johnholdsworth.swiftbindings.SwiftHelloTest$SwiftTestListener.tcount

    // Skipping field: true false false false false false 

    /// public com.johnholdsworth.swiftbindings.SwiftHelloTest$TestListener com.johnholdsworth.swiftbindings.SwiftHelloTest$TestResponderAdapter.loopback

    private static var loopback_FieldID: jfieldID?

    override open var loopback: SwiftHelloTest_TestListener! {
        get {
            let __value = JNIField.GetObjectField( fieldName: "loopback", fieldType: "Lcom/johnholdsworth/swiftbindings/SwiftHelloTest$TestListener;", fieldCache: &SwiftHelloTest_SwiftTestListener.loopback_FieldID, object: javaObject )
            defer { JNI.DeleteLocalRef( __value ) }
            return __value != nil ? SwiftHelloTest_TestListenerForward( javaObject: __value ) : nil
        }
        set(newValue) {
            var __locals = [jobject]()
            let __value = JNIType.toJava( value: newValue, locals: &__locals )
            JNIField.SetObjectField( fieldName: "loopback", fieldType: "Lcom/johnholdsworth/swiftbindings/SwiftHelloTest$TestListener;", fieldCache: &SwiftHelloTest_SwiftTestListener.loopback_FieldID, object: javaObject, value: __value.l, locals: &__locals )
        }
    }

    /// public com.johnholdsworth.swiftbindings.SwiftHelloTest$SwiftTestListener()

    private static var new_MethodID_1: jmethodID?

    public convenience init() {
        var __locals = [jobject]()
        var __args = [jvalue]( repeating: jvalue(), count: 1 )
        let __object = JNIMethod.NewObject( className: "com/johnholdsworth/swiftbindings/SwiftHelloTest$SwiftTestListener", classCache: &SwiftHelloTest_SwiftTestListener.SwiftHelloTest_SwiftTestListenerJNIClass, methodSig: "()V", methodCache: &SwiftHelloTest_SwiftTestListener.new_MethodID_1, args: &__args, locals: &__locals )
        self.init( javaObject: __object )
        JNI.DeleteLocalRef( __object )
    }

    /// public void com.johnholdsworth.swiftbindings.SwiftHelloTest$SwiftTestListener.respond(com.johnholdsworth.swiftbindings.SwiftHelloTest$TestListener)

    private static var respond_MethodID_2: jmethodID?

    open func respond( responder: SwiftHelloTest_TestListener? ) {
        var __locals = [jobject]()
        var __args = [jvalue]( repeating: jvalue(), count: 1 )
        __args[0] = JNIType.toJava( value: responder, locals: &__locals )
        JNIMethod.CallVoidMethod( object: javaObject, methodName: "respond", methodSig: "(Lcom/johnholdsworth/swiftbindings/SwiftHelloTest$TestListener;)V", methodCache: &SwiftHelloTest_SwiftTestListener.respond_MethodID_2, args: &__args, locals: &__locals )
    }

    open func respond( _ _responder: SwiftHelloTest_TestListener? ) {
        respond( responder: _responder )
    }

}

