2016-09-07 18:27:36 +02:00
|
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
|
|
|
|
#include <jni.h>
|
|
|
|
#include "seq.h"
|
|
|
|
#include "classes.h"
|
|
|
|
|
|
|
|
static jclass class_java_lang_Float;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID m_java_lang_Float_toString;
|
2017-01-17 13:05:26 +01:00
|
|
|
static jclass class_java_lang_Long;
|
|
|
|
static jmethodID m_java_lang_Long_toString;
|
2016-09-07 18:27:36 +02:00
|
|
|
static jclass class_java_lang_Object;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID m_java_lang_Object_toString;
|
2016-09-07 18:27:36 +02:00
|
|
|
static jclass class_java_lang_Runnable;
|
|
|
|
static jclass class_java_lang_Character;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID m_java_lang_Character_toString;
|
2016-09-07 18:27:36 +02:00
|
|
|
static jclass class_java_lang_Character_Subset;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID m_java_lang_Character_Subset_toString;
|
2016-09-07 18:27:36 +02:00
|
|
|
|
|
|
|
void init_proxies() {
|
2017-01-17 13:05:26 +01:00
|
|
|
JNIEnv *env = go_seq_push_local_frame(6);
|
2016-09-07 18:27:36 +02:00
|
|
|
jclass clazz;
|
2017-01-27 19:08:31 +01:00
|
|
|
clazz = go_seq_find_class("java/lang/Float");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Float = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
m_java_lang_Float_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
}
|
|
|
|
clazz = go_seq_find_class("java/lang/Long");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Long = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
m_java_lang_Long_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
}
|
|
|
|
clazz = go_seq_find_class("java/lang/Object");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Object = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
m_java_lang_Object_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
}
|
|
|
|
clazz = go_seq_find_class("java/lang/Runnable");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Runnable = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
}
|
|
|
|
clazz = go_seq_find_class("java/lang/Character");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Character = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
m_java_lang_Character_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
}
|
|
|
|
clazz = go_seq_find_class("java/lang/Character$Subset");
|
|
|
|
if (clazz != NULL) {
|
|
|
|
class_java_lang_Character_Subset = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
m_java_lang_Character_Subset_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
}
|
2016-09-07 18:27:36 +02:00
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
}
|
|
|
|
|
2017-01-16 20:10:54 +01:00
|
|
|
ret_nstring cproxy_java_lang_Float_toString(jint this) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(1);
|
|
|
|
// Must be a Java object
|
|
|
|
jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Float_toString);
|
|
|
|
jobject _exc = go_seq_get_exception(env);
|
|
|
|
int32_t _exc_ref = go_seq_to_refnum(env, _exc);
|
|
|
|
if (_exc != NULL) {
|
|
|
|
res = NULL;
|
|
|
|
}
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
ret_nstring __res = {_res, _exc_ref};
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
2017-01-17 13:05:26 +01:00
|
|
|
ret_nstring cproxy_java_lang_Long_toString(jint this) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(1);
|
|
|
|
// Must be a Java object
|
|
|
|
jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Long_toString);
|
|
|
|
jobject _exc = go_seq_get_exception(env);
|
|
|
|
int32_t _exc_ref = go_seq_to_refnum(env, _exc);
|
|
|
|
if (_exc != NULL) {
|
|
|
|
res = NULL;
|
|
|
|
}
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
ret_nstring __res = {_res, _exc_ref};
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
2017-01-16 20:10:54 +01:00
|
|
|
ret_nstring cproxy_java_lang_Object_toString(jint this) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(1);
|
|
|
|
// Must be a Java object
|
|
|
|
jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Object_toString);
|
|
|
|
jobject _exc = go_seq_get_exception(env);
|
|
|
|
int32_t _exc_ref = go_seq_to_refnum(env, _exc);
|
|
|
|
if (_exc != NULL) {
|
|
|
|
res = NULL;
|
|
|
|
}
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
ret_nstring __res = {_res, _exc_ref};
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret_nstring cproxy_java_lang_Character_toString(jint this) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(1);
|
|
|
|
// Must be a Java object
|
|
|
|
jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Character_toString);
|
|
|
|
jobject _exc = go_seq_get_exception(env);
|
|
|
|
int32_t _exc_ref = go_seq_to_refnum(env, _exc);
|
|
|
|
if (_exc != NULL) {
|
|
|
|
res = NULL;
|
|
|
|
}
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
ret_nstring __res = {_res, _exc_ref};
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret_nstring cproxy_java_lang_Character_Subset_toString(jint this) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(1);
|
|
|
|
// Must be a Java object
|
|
|
|
jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Character_Subset_toString);
|
|
|
|
jobject _exc = go_seq_get_exception(env);
|
|
|
|
int32_t _exc_ref = go_seq_to_refnum(env, _exc);
|
|
|
|
if (_exc != NULL) {
|
|
|
|
res = NULL;
|
|
|
|
}
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
ret_nstring __res = {_res, _exc_ref};
|
|
|
|
return __res;
|
|
|
|
}
|
|
|
|
|
2016-09-07 18:27:36 +02:00
|
|
|
// JNI functions for the Go <=> Java bridge.
|
|
|
|
// gobind -lang=java java
|
|
|
|
//
|
|
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
|
|
|
|
#include <android/log.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "seq.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
#include "java.h"
|
|
|
|
|
|
|
|
jclass proxy_class_java_F;
|
|
|
|
jmethodID proxy_class_java_F_cons;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID mid_F_ToString;
|
2017-01-17 13:05:26 +01:00
|
|
|
jclass proxy_class_java_L;
|
|
|
|
jmethodID proxy_class_java_L_cons;
|
|
|
|
static jmethodID mid_L_ToString;
|
2016-09-07 18:27:36 +02:00
|
|
|
jclass proxy_class_java_O;
|
|
|
|
jmethodID proxy_class_java_O_cons;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID mid_O_ToString;
|
2016-09-07 18:27:36 +02:00
|
|
|
jclass proxy_class_java_R;
|
|
|
|
jmethodID proxy_class_java_R_cons;
|
|
|
|
jclass proxy_class_java_S;
|
|
|
|
jmethodID proxy_class_java_S_cons;
|
2017-01-16 20:10:54 +01:00
|
|
|
static jmethodID mid_S_ToString;
|
2016-09-07 18:27:36 +02:00
|
|
|
|
|
|
|
JNIEXPORT void JNICALL
|
2017-01-01 22:43:46 +01:00
|
|
|
Java_java_Java__1init(JNIEnv *env, jclass _unused) {
|
2016-09-07 18:27:36 +02:00
|
|
|
jclass clazz;
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/Java$proxyF");
|
2016-09-07 18:27:36 +02:00
|
|
|
proxy_class_java_F = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
proxy_class_java_F_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/F");
|
2017-01-16 20:10:54 +01:00
|
|
|
mid_F_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
|
2016-09-07 18:27:36 +02:00
|
|
|
|
2017-01-17 13:05:26 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/Java$proxyL");
|
|
|
|
proxy_class_java_L = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
proxy_class_java_L_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
|
|
|
|
clazz = (*env)->FindClass(env, "java/L");
|
|
|
|
mid_L_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
|
|
|
|
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/Java$proxyO");
|
2016-09-07 18:27:36 +02:00
|
|
|
proxy_class_java_O = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
proxy_class_java_O_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/O");
|
2017-01-16 20:10:54 +01:00
|
|
|
mid_O_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
|
2016-09-07 18:27:36 +02:00
|
|
|
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/Java$proxyR");
|
2016-09-07 18:27:36 +02:00
|
|
|
proxy_class_java_R = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
proxy_class_java_R_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/R");
|
2016-09-07 18:27:36 +02:00
|
|
|
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/Java$proxyS");
|
2016-09-07 18:27:36 +02:00
|
|
|
proxy_class_java_S = (*env)->NewGlobalRef(env, clazz);
|
|
|
|
proxy_class_java_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
|
2017-01-01 22:43:46 +01:00
|
|
|
clazz = (*env)->FindClass(env, "java/S");
|
2017-01-16 20:10:54 +01:00
|
|
|
mid_S_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
|
2016-09-07 18:27:36 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-01-16 20:10:54 +01:00
|
|
|
JNIEXPORT jstring JNICALL
|
|
|
|
Java_java_Java_00024proxyF_toString(JNIEnv* env, jobject __this__) {
|
|
|
|
int32_t o = go_seq_to_refnum_go(env, __this__);
|
|
|
|
nstring r0 = proxyjava_F_ToString(o);
|
|
|
|
jstring _r0 = go_seq_to_java_string(env, r0);
|
|
|
|
return _r0;
|
|
|
|
}
|
|
|
|
|
|
|
|
nstring cproxyjava_F_ToString(int32_t refnum) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(0);
|
|
|
|
jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_F, proxy_class_java_F_cons);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, o, mid_F_ToString);
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
return _res;
|
|
|
|
}
|
|
|
|
|
2017-01-17 13:05:26 +01:00
|
|
|
JNIEXPORT jstring JNICALL
|
|
|
|
Java_java_Java_00024proxyL_toString(JNIEnv* env, jobject __this__) {
|
|
|
|
int32_t o = go_seq_to_refnum_go(env, __this__);
|
|
|
|
nstring r0 = proxyjava_L_ToString(o);
|
|
|
|
jstring _r0 = go_seq_to_java_string(env, r0);
|
|
|
|
return _r0;
|
|
|
|
}
|
|
|
|
|
|
|
|
nstring cproxyjava_L_ToString(int32_t refnum) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(0);
|
|
|
|
jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_L, proxy_class_java_L_cons);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, o, mid_L_ToString);
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
return _res;
|
|
|
|
}
|
|
|
|
|
2017-01-16 20:10:54 +01:00
|
|
|
JNIEXPORT jstring JNICALL
|
|
|
|
Java_java_Java_00024proxyO_toString(JNIEnv* env, jobject __this__) {
|
|
|
|
int32_t o = go_seq_to_refnum_go(env, __this__);
|
|
|
|
nstring r0 = proxyjava_O_ToString(o);
|
|
|
|
jstring _r0 = go_seq_to_java_string(env, r0);
|
|
|
|
return _r0;
|
|
|
|
}
|
|
|
|
|
|
|
|
nstring cproxyjava_O_ToString(int32_t refnum) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(0);
|
|
|
|
jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_O, proxy_class_java_O_cons);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, o, mid_O_ToString);
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
return _res;
|
|
|
|
}
|
|
|
|
|
|
|
|
JNIEXPORT jstring JNICALL
|
|
|
|
Java_java_Java_00024proxyS_toString(JNIEnv* env, jobject __this__) {
|
|
|
|
int32_t o = go_seq_to_refnum_go(env, __this__);
|
|
|
|
nstring r0 = proxyjava_S_ToString(o);
|
|
|
|
jstring _r0 = go_seq_to_java_string(env, r0);
|
|
|
|
return _r0;
|
|
|
|
}
|
|
|
|
|
|
|
|
nstring cproxyjava_S_ToString(int32_t refnum) {
|
|
|
|
JNIEnv *env = go_seq_push_local_frame(0);
|
|
|
|
jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_S, proxy_class_java_S_cons);
|
|
|
|
jstring res = (*env)->CallObjectMethod(env, o, mid_S_ToString);
|
|
|
|
nstring _res = go_seq_from_java_string(env, res);
|
|
|
|
go_seq_pop_local_frame(env);
|
|
|
|
return _res;
|
|
|
|
}
|
|
|
|
|