blob: c28be81540695dac3d4aad910ff8f3c6e5755c1c [file] [log] [blame]
// JNI functions for the Go <=> Java bridge.
// gobind -lang=java issue10788
//
// File is generated by gobind. Do not edit.
#include <android/log.h>
#include <stdint.h>
#include "seq.h"
#include "_cgo_export.h"
#include "issue10788.h"
jclass proxy_class_issue10788_TestInterface;
jmethodID proxy_class_issue10788_TestInterface_cons;
static jmethodID mid_TestInterface_DoSomeWork;
static jmethodID mid_TestInterface_MultipleUnnamedParams;
jclass proxy_class_issue10788_TestStruct;
jmethodID proxy_class_issue10788_TestStruct_cons;
JNIEXPORT void JNICALL
Java_issue10788_Issue10788__1init(JNIEnv *env, jclass _unused) {
jclass clazz;
clazz = (*env)->FindClass(env, "issue10788/TestStruct");
proxy_class_issue10788_TestStruct = (*env)->NewGlobalRef(env, clazz);
proxy_class_issue10788_TestStruct_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
clazz = (*env)->FindClass(env, "issue10788/Issue10788$proxyTestInterface");
proxy_class_issue10788_TestInterface = (*env)->NewGlobalRef(env, clazz);
proxy_class_issue10788_TestInterface_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
clazz = (*env)->FindClass(env, "issue10788/TestInterface");
mid_TestInterface_DoSomeWork = (*env)->GetMethodID(env, clazz, "doSomeWork", "(Lissue10788/TestStruct;)V");
mid_TestInterface_MultipleUnnamedParams = (*env)->GetMethodID(env, clazz, "multipleUnnamedParams", "(JLjava/lang/String;J)V");
}
JNIEXPORT jint JNICALL
Java_issue10788_TestStruct__1_1New(JNIEnv *env, jclass clazz) {
return new_issue10788_TestStruct();
}
JNIEXPORT void JNICALL
Java_issue10788_TestStruct_setValue(JNIEnv *env, jobject this, jstring v) {
int32_t o = go_seq_to_refnum_go(env, this);
nstring _v = go_seq_from_java_string(env, v);
proxyissue10788_TestStruct_Value_Set(o, _v);
}
JNIEXPORT jstring JNICALL
Java_issue10788_TestStruct_getValue(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
nstring r0 = proxyissue10788_TestStruct_Value_Get(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_issue10788_Issue10788_00024proxyTestInterface_doSomeWork(JNIEnv* env, jobject __this__, jobject s) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _s = go_seq_to_refnum(env, s);
proxyissue10788_TestInterface_DoSomeWork(o, _s);
}
void cproxyissue10788_TestInterface_DoSomeWork(int32_t refnum, int32_t s) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_issue10788_TestInterface, proxy_class_issue10788_TestInterface_cons);
jobject _s = go_seq_from_refnum(env, s, proxy_class_issue10788_TestStruct, proxy_class_issue10788_TestStruct_cons);
(*env)->CallVoidMethod(env, o, mid_TestInterface_DoSomeWork, _s);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_issue10788_Issue10788_00024proxyTestInterface_multipleUnnamedParams(JNIEnv* env, jobject __this__, jlong p0, jstring p1, jlong p2) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nint _p0 = (nint)p0;
nstring _p1 = go_seq_from_java_string(env, p1);
int64_t _p2 = (int64_t)p2;
proxyissue10788_TestInterface_MultipleUnnamedParams(o, _p0, _p1, _p2);
}
void cproxyissue10788_TestInterface_MultipleUnnamedParams(int32_t refnum, nint p0, nstring p1, int64_t p2) {
JNIEnv *env = go_seq_push_local_frame(3);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_issue10788_TestInterface, proxy_class_issue10788_TestInterface_cons);
jlong _p0 = (jlong)p0;
jstring _p1 = go_seq_to_java_string(env, p1);
jlong _p2 = (jlong)p2;
(*env)->CallVoidMethod(env, o, mid_TestInterface_MultipleUnnamedParams, _p0, _p1, _p2);
go_seq_pop_local_frame(env);
}