github.com/F4RD1N/gomobile@v1.0.1/bind/testdata/underscores.java.c.golden (about) 1 // Code generated by gobind. DO NOT EDIT. 2 3 // JNI functions for the Go <=> Java bridge. 4 // 5 // autogenerated by gobind -lang=java underscores 6 7 #include <android/log.h> 8 #include <stdint.h> 9 #include "seq.h" 10 #include "_cgo_export.h" 11 #include "underscore_pkg.h" 12 13 jclass proxy_class_underscore_pkg_Underscore_struct; 14 jmethodID proxy_class_underscore_pkg_Underscore_struct_cons; 15 16 JNIEXPORT void JNICALL 17 Java_underscore_1pkg_Underscore_1pkg__1init(JNIEnv *env, jclass _unused) { 18 jclass clazz; 19 clazz = (*env)->FindClass(env, "underscore_pkg/Underscore_struct"); 20 proxy_class_underscore_pkg_Underscore_struct = (*env)->NewGlobalRef(env, clazz); 21 proxy_class_underscore_pkg_Underscore_struct_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); 22 } 23 24 JNIEXPORT void JNICALL 25 Java_underscore_1pkg_Underscore_1pkg_underscore_1func(JNIEnv* env, jclass _clazz) { 26 proxyunderscore_pkg__Underscore_func(); 27 } 28 29 JNIEXPORT jint JNICALL 30 Java_underscore_1pkg_Underscore_1struct__1_1New(JNIEnv *env, jclass clazz) { 31 return new_underscore_pkg_Underscore_struct(); 32 } 33 34 JNIEXPORT void JNICALL 35 Java_underscore_1pkg_Underscore_1struct_setUnderscore_1field(JNIEnv *env, jobject this, jstring v) { 36 int32_t o = go_seq_to_refnum_go(env, this); 37 nstring _v = go_seq_from_java_string(env, v); 38 proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(o, _v); 39 } 40 41 JNIEXPORT jstring JNICALL 42 Java_underscore_1pkg_Underscore_1struct_getUnderscore_1field(JNIEnv *env, jobject this) { 43 int32_t o = go_seq_to_refnum_go(env, this); 44 nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(o); 45 jstring _r0 = go_seq_to_java_string(env, r0); 46 return _r0; 47 } 48 49 JNIEXPORT void JNICALL 50 Java_underscore_1pkg_Underscore_1pkg_setUnderscore_1var(JNIEnv *env, jclass clazz, jlong v) { 51 nint _v = (nint)v; 52 var_setunderscore_pkg_Underscore_var(_v); 53 } 54 55 JNIEXPORT jlong JNICALL 56 Java_underscore_1pkg_Underscore_1pkg_getUnderscore_1var(JNIEnv *env, jclass clazz) { 57 nint r0 = var_getunderscore_pkg_Underscore_var(); 58 jlong _r0 = (jlong)r0; 59 return _r0; 60 } 61