java.java.c.golden 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. // Code generated by gobind. DO NOT EDIT.
  2. #include <jni.h>
  3. #include "seq.h"
  4. #include "classes.h"
  5. static jclass class_java_lang_Float;
  6. static jmethodID m_java_lang_Float_toString;
  7. static jclass class_java_lang_Long;
  8. static jmethodID m_java_lang_Long_toString;
  9. static jclass class_java_lang_Object;
  10. static jmethodID m_java_lang_Object_toString;
  11. static jclass class_java_lang_Runnable;
  12. void init_proxies() {
  13. JNIEnv *env = go_seq_push_local_frame(4);
  14. jclass clazz;
  15. clazz = go_seq_find_class("java/lang/Float");
  16. if (clazz != NULL) {
  17. class_java_lang_Float = (*env)->NewGlobalRef(env, clazz);
  18. m_java_lang_Float_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
  19. }
  20. clazz = go_seq_find_class("java/lang/Long");
  21. if (clazz != NULL) {
  22. class_java_lang_Long = (*env)->NewGlobalRef(env, clazz);
  23. m_java_lang_Long_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
  24. }
  25. clazz = go_seq_find_class("java/lang/Object");
  26. if (clazz != NULL) {
  27. class_java_lang_Object = (*env)->NewGlobalRef(env, clazz);
  28. m_java_lang_Object_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;");
  29. }
  30. clazz = go_seq_find_class("java/lang/Runnable");
  31. if (clazz != NULL) {
  32. class_java_lang_Runnable = (*env)->NewGlobalRef(env, clazz);
  33. }
  34. go_seq_pop_local_frame(env);
  35. }
  36. ret_nstring cproxy_java_lang_Float_toString(jint this) {
  37. JNIEnv *env = go_seq_push_local_frame(1);
  38. // Must be a Java object
  39. jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
  40. jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Float_toString);
  41. jobject _exc = go_seq_get_exception(env);
  42. int32_t _exc_ref = go_seq_to_refnum(env, _exc);
  43. if (_exc != NULL) {
  44. res = NULL;
  45. }
  46. nstring _res = go_seq_from_java_string(env, res);
  47. go_seq_pop_local_frame(env);
  48. ret_nstring __res = {_res, _exc_ref};
  49. return __res;
  50. }
  51. ret_nstring cproxy_java_lang_Long_toString(jint this) {
  52. JNIEnv *env = go_seq_push_local_frame(1);
  53. // Must be a Java object
  54. jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
  55. jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Long_toString);
  56. jobject _exc = go_seq_get_exception(env);
  57. int32_t _exc_ref = go_seq_to_refnum(env, _exc);
  58. if (_exc != NULL) {
  59. res = NULL;
  60. }
  61. nstring _res = go_seq_from_java_string(env, res);
  62. go_seq_pop_local_frame(env);
  63. ret_nstring __res = {_res, _exc_ref};
  64. return __res;
  65. }
  66. ret_nstring cproxy_java_lang_Object_toString(jint this) {
  67. JNIEnv *env = go_seq_push_local_frame(1);
  68. // Must be a Java object
  69. jobject _this = go_seq_from_refnum(env, this, NULL, NULL);
  70. jstring res = (*env)->CallObjectMethod(env, _this, m_java_lang_Object_toString);
  71. jobject _exc = go_seq_get_exception(env);
  72. int32_t _exc_ref = go_seq_to_refnum(env, _exc);
  73. if (_exc != NULL) {
  74. res = NULL;
  75. }
  76. nstring _res = go_seq_from_java_string(env, res);
  77. go_seq_pop_local_frame(env);
  78. ret_nstring __res = {_res, _exc_ref};
  79. return __res;
  80. }
  81. // Code generated by gobind. DO NOT EDIT.
  82. // JNI functions for the Go <=> Java bridge.
  83. //
  84. // autogenerated by gobind -lang=java java
  85. #include <android/log.h>
  86. #include <stdint.h>
  87. #include "seq.h"
  88. #include "_cgo_export.h"
  89. #include "java.h"
  90. jclass proxy_class_java_F;
  91. jmethodID proxy_class_java_F_cons;
  92. static jmethodID mid_F_ToString;
  93. jclass proxy_class_java_L;
  94. jmethodID proxy_class_java_L_cons;
  95. static jmethodID mid_L_ToString;
  96. jclass proxy_class_java_O;
  97. jmethodID proxy_class_java_O_cons;
  98. static jmethodID mid_O_ToString;
  99. jclass proxy_class_java_R;
  100. jmethodID proxy_class_java_R_cons;
  101. JNIEXPORT void JNICALL
  102. Java_java_Java__1init(JNIEnv *env, jclass _unused) {
  103. jclass clazz;
  104. clazz = (*env)->FindClass(env, "java/Java$proxyF");
  105. proxy_class_java_F = (*env)->NewGlobalRef(env, clazz);
  106. proxy_class_java_F_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
  107. clazz = (*env)->FindClass(env, "java/F");
  108. mid_F_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
  109. clazz = (*env)->FindClass(env, "java/Java$proxyL");
  110. proxy_class_java_L = (*env)->NewGlobalRef(env, clazz);
  111. proxy_class_java_L_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
  112. clazz = (*env)->FindClass(env, "java/L");
  113. mid_L_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
  114. clazz = (*env)->FindClass(env, "java/Java$proxyO");
  115. proxy_class_java_O = (*env)->NewGlobalRef(env, clazz);
  116. proxy_class_java_O_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
  117. clazz = (*env)->FindClass(env, "java/O");
  118. mid_O_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;");
  119. clazz = (*env)->FindClass(env, "java/Java$proxyR");
  120. proxy_class_java_R = (*env)->NewGlobalRef(env, clazz);
  121. proxy_class_java_R_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V");
  122. clazz = (*env)->FindClass(env, "java/R");
  123. }
  124. JNIEXPORT jstring JNICALL
  125. Java_java_Java_00024proxyF_toString(JNIEnv* env, jobject __this__) {
  126. int32_t o = go_seq_to_refnum_go(env, __this__);
  127. nstring r0 = proxyjava_F_ToString(o);
  128. jstring _r0 = go_seq_to_java_string(env, r0);
  129. return _r0;
  130. }
  131. nstring cproxyjava_F_ToString(int32_t refnum) {
  132. JNIEnv *env = go_seq_push_local_frame(0);
  133. jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_F, proxy_class_java_F_cons);
  134. jstring res = (*env)->CallObjectMethod(env, o, mid_F_ToString);
  135. nstring _res = go_seq_from_java_string(env, res);
  136. go_seq_pop_local_frame(env);
  137. return _res;
  138. }
  139. JNIEXPORT jstring JNICALL
  140. Java_java_Java_00024proxyL_toString(JNIEnv* env, jobject __this__) {
  141. int32_t o = go_seq_to_refnum_go(env, __this__);
  142. nstring r0 = proxyjava_L_ToString(o);
  143. jstring _r0 = go_seq_to_java_string(env, r0);
  144. return _r0;
  145. }
  146. nstring cproxyjava_L_ToString(int32_t refnum) {
  147. JNIEnv *env = go_seq_push_local_frame(0);
  148. jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_L, proxy_class_java_L_cons);
  149. jstring res = (*env)->CallObjectMethod(env, o, mid_L_ToString);
  150. nstring _res = go_seq_from_java_string(env, res);
  151. go_seq_pop_local_frame(env);
  152. return _res;
  153. }
  154. JNIEXPORT jstring JNICALL
  155. Java_java_Java_00024proxyO_toString(JNIEnv* env, jobject __this__) {
  156. int32_t o = go_seq_to_refnum_go(env, __this__);
  157. nstring r0 = proxyjava_O_ToString(o);
  158. jstring _r0 = go_seq_to_java_string(env, r0);
  159. return _r0;
  160. }
  161. nstring cproxyjava_O_ToString(int32_t refnum) {
  162. JNIEnv *env = go_seq_push_local_frame(0);
  163. jobject o = go_seq_from_refnum(env, refnum, proxy_class_java_O, proxy_class_java_O_cons);
  164. jstring res = (*env)->CallObjectMethod(env, o, mid_O_ToString);
  165. nstring _res = go_seq_from_java_string(env, res);
  166. go_seq_pop_local_frame(env);
  167. return _res;
  168. }