repo_id
stringclasses
927 values
file_path
stringlengths
99
214
content
stringlengths
2
4.15M
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package issue10788 type TestStruct struct { Value string } type TestInterface interface { DoSomeWork(s *TestStruct) MultipleUnnamedParams(_ int, p0 string, 日本 int64) }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "universe.h" jclass proxy_class__error; jmethodID proxy_class__error_cons; static jmethodID mid_error_Error; JNIEXPORT void JNICALL Java_go_Universe__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "go/Universe$proxyerror"); proxy_class__error = (*env)->NewGlobalRef(env, clazz); proxy_class__error_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/lang/Throwable"); mid_error_Error = (*env)->GetMethodID(env, clazz, "getMessage", "()Ljava/lang/String;"); } JNIEXPORT jstring JNICALL Java_go_Universe_00024proxyerror_error(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); nstring r0 = proxy_error_Error(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } nstring cproxy_error_Error(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class__error, proxy_class__error_cons); jstring res = (*env)->CallObjectMethod(env, o, mid_error_Error); nstring _res = go_seq_from_java_string(env, res); go_seq_pop_local_frame(env); return _res; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue12328 #ifndef __Issue12328_H__ #define __Issue12328_H__ #include <jni.h> extern jclass proxy_class_issue12328_T; extern jmethodID proxy_class_issue12328_T_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package vars. // // autogenerated by gobind -lang=go vars package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "vars.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "vars" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export new_vars_S func new_vars_S() C.int32_t { return C.int32_t(_seq.ToRefNum(new(vars.S))) } type proxyvars_I _seq.Ref func (p *proxyvars_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } //export var_setvars_ABool func var_setvars_ABool(v C.char) { _v := v != 0 vars.ABool = _v } //export var_getvars_ABool func var_getvars_ABool() C.char { v := vars.ABool var _v C.char = 0 if v { _v = 1 } return _v } //export var_setvars_AFloat func var_setvars_AFloat(v C.double) { _v := float64(v) vars.AFloat = _v } //export var_getvars_AFloat func var_getvars_AFloat() C.double { v := vars.AFloat _v := C.double(v) return _v } //export var_setvars_AFloat32 func var_setvars_AFloat32(v C.float) { _v := float32(v) vars.AFloat32 = _v } //export var_getvars_AFloat32 func var_getvars_AFloat32() C.float { v := vars.AFloat32 _v := C.float(v) return _v } //export var_setvars_AFloat64 func var_setvars_AFloat64(v C.double) { _v := float64(v) vars.AFloat64 = _v } //export var_getvars_AFloat64 func var_getvars_AFloat64() C.double { v := vars.AFloat64 _v := C.double(v) return _v } //export var_setvars_AString func var_setvars_AString(v C.nstring) { _v := decodeString(v) vars.AString = _v } //export var_getvars_AString func var_getvars_AString() C.nstring { v := vars.AString _v := encodeString(v) return _v } //export var_setvars_AStructPtr func var_setvars_AStructPtr(v C.int32_t) { // Must be a Go object var _v *vars.S if _v_ref := _seq.FromRefNum(int32(v)); _v_ref != nil { _v = _v_ref.Get().(*vars.S) } vars.AStructPtr = _v } //export var_getvars_AStructPtr func var_getvars_AStructPtr() C.int32_t { v := vars.AStructPtr var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export var_setvars_AnInt func var_setvars_AnInt(v C.nint) { _v := int(v) vars.AnInt = _v } //export var_getvars_AnInt func var_getvars_AnInt() C.nint { v := vars.AnInt _v := C.nint(v) return _v } //export var_setvars_AnInt16 func var_setvars_AnInt16(v C.int16_t) { _v := int16(v) vars.AnInt16 = _v } //export var_getvars_AnInt16 func var_getvars_AnInt16() C.int16_t { v := vars.AnInt16 _v := C.int16_t(v) return _v } //export var_setvars_AnInt32 func var_setvars_AnInt32(v C.int32_t) { _v := int32(v) vars.AnInt32 = _v } //export var_getvars_AnInt32 func var_getvars_AnInt32() C.int32_t { v := vars.AnInt32 _v := C.int32_t(v) return _v } //export var_setvars_AnInt64 func var_setvars_AnInt64(v C.int64_t) { _v := int64(v) vars.AnInt64 = _v } //export var_getvars_AnInt64 func var_getvars_AnInt64() C.int64_t { v := vars.AnInt64 _v := C.int64_t(v) return _v } //export var_setvars_AnInt8 func var_setvars_AnInt8(v C.int8_t) { _v := int8(v) vars.AnInt8 = _v } //export var_getvars_AnInt8 func var_getvars_AnInt8() C.int8_t { v := vars.AnInt8 _v := C.int8_t(v) return _v } //export var_setvars_AnInterface func var_setvars_AnInterface(v C.int32_t) { var _v vars.I _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(vars.I) } else { // foreign object _v = (*proxyvars_I)(_v_ref) } } vars.AnInterface = _v } //export var_getvars_AnInterface func var_getvars_AnInterface() C.int32_t { v := vars.AnInterface var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class issue10788.TestStruct is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue10788 package issue10788; import go.Seq; public final class TestStruct implements Seq.Proxy { static { Issue10788.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } TestStruct(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public TestStruct() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native String getValue(); public final native void setValue(String v); @Override public boolean equals(Object o) { if (o == null || !(o instanceof TestStruct)) { return false; } TestStruct that = (TestStruct)o; String thisValue = getValue(); String thatValue = that.getValue(); if (thisValue == null) { if (thatValue != null) { return false; } } else if (!thisValue.equals(thatValue)) { return false; } return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {getValue()}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("TestStruct").append("{"); b.append("Value:").append(getValue()).append(","); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class issue10788.TestInterface is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue10788 package issue10788; import go.Seq; public interface TestInterface { public void doSomeWork(TestStruct s); public void multipleUnnamedParams(long p0, String p1, long p2); } // Code generated by gobind. DO NOT EDIT. // Java class issue10788.Issue10788 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue10788 package issue10788; import go.Seq; public abstract class Issue10788 { static { Seq.touch(); // for loading the native library _init(); } private Issue10788() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyTestInterface implements Seq.Proxy, TestInterface { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyTestInterface(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void doSomeWork(TestStruct s); public native void multipleUnnamedParams(long p0, String p1, long p2); } }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class doc.NoDoc is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java doc package doc; import go.Seq; /** * A generic comment with &lt;HTML&gt;. */ public final class NoDoc implements Seq.Proxy { static { Doc.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } NoDoc(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public NoDoc() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof NoDoc)) { return false; } NoDoc that = (NoDoc)o; return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("NoDoc").append("{"); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class doc.S is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java doc package doc; import go.Seq; /** * S is a struct. */ public final class S implements Seq.Proxy { static { Doc.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } /** * NewS is a constructor. */ public S() { this.refnum = __NewS(); Seq.trackGoRef(refnum, this); } private static native int __NewS(); S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } /** * SF is a field. */ public final native String getSF(); /** * SF is a field. */ public final native void setSF(String v); /** * Anonymous field. */ public final native S2 getS2(); /** * Anonymous field. */ public final native void setS2(S2 v); /** * Multiple fields. */ public final native String getF1(); /** * Multiple fields. */ public final native void setF1(String v); /** * Multiple fields. */ public final native String getF2(); /** * Multiple fields. */ public final native void setF2(String v); /** * After is another method. */ public native void after(); public native void before(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof S)) { return false; } S that = (S)o; String thisSF = getSF(); String thatSF = that.getSF(); if (thisSF == null) { if (thatSF != null) { return false; } } else if (!thisSF.equals(thatSF)) { return false; } S2 thisS2 = getS2(); S2 thatS2 = that.getS2(); if (thisS2 == null) { if (thatS2 != null) { return false; } } else if (!thisS2.equals(thatS2)) { return false; } String thisF1 = getF1(); String thatF1 = that.getF1(); if (thisF1 == null) { if (thatF1 != null) { return false; } } else if (!thisF1.equals(thatF1)) { return false; } String thisF2 = getF2(); String thatF2 = that.getF2(); if (thisF2 == null) { if (thatF2 != null) { return false; } } else if (!thisF2.equals(thatF2)) { return false; } return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {getSF(), getS2(), getF1(), getF2()}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("S").append("{"); b.append("SF:").append(getSF()).append(","); b.append("S2:").append(getS2()).append(","); b.append("F1:").append(getF1()).append(","); b.append("F2:").append(getF2()).append(","); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class doc.S2 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java doc package doc; import go.Seq; /** * S2 is a struct. */ public final class S2 implements Seq.Proxy { static { Doc.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } S2(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public S2() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof S2)) { return false; } S2 that = (S2)o; return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("S2").append("{"); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class doc.I is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java doc package doc; import go.Seq; /** * I is an interface. */ public interface I { /** * IM is a method. */ public void im(); } // Code generated by gobind. DO NOT EDIT. // Java class doc.Doc is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java doc package doc; import go.Seq; public abstract class Doc { static { Seq.touch(); // for loading the native library _init(); } private Doc() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyI implements Seq.Proxy, I { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void im(); } /** * C is a constant. */ public static final boolean C = true; /** * A group of vars. */ public static native void setNoDocVar(double v); /** * A group of vars. */ public static native double getNoDocVar(); /** * A specific var. */ public static native void setSpecific(String v); /** * A specific var. */ public static native String getSpecific(); /** * V is a var. */ public static native void setV(String v); /** * V is a var. */ public static native String getV(); /** * F is a function. */ public static native void f(); /** * NewS is a constructor. */ public static native S newS(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.go
package vars var ( AString = "String" AnInt = -1 AnInt8 int8 = 8 AnInt16 int16 = 16 AnInt32 int32 = 32 AnInt64 int64 = 64 AFloat = -2.0 AFloat32 float32 = 32.0 AFloat64 float64 = 64.0 ABool = true AStructPtr *S AnInterface I ) type S struct{} type I interface{}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java -javapkg=com.example customprefix #ifndef __Customprefix_H__ #define __Customprefix_H__ #include <jni.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.objc.m.golden
// Objective-C API for talking to ignore Go package. // gobind -lang=objc ignore // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Ignore.objc.h" @implementation IgnoreS { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_ignore_S()); } return self; } // skipped unsupported field F with type interface{} // skipped method S.Argument with unsupported parameter or return types // skipped method S.Result with unsupported parameter or return types @end @implementation IgnoreI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types @end // skipped const Cuint with unsupported type: uint // skipped const Cuint32 with unsupported type: uint32 // skipped const Cuint64 with unsupported type: uint64 // skipped const NamedConst with unsupported type: ignore.NamedString @implementation Ignore // skipped variable C128 with unsupported type: complex128 // skipped variable C64 with unsupported type: complex64 // skipped variable Uint with unsupported type: uint // skipped variable Uint32 with unsupported type: uint32 // skipped variable Uint64 with unsupported type: uint64 // skipped variable V with unsupported type: interface{} // skipped variable Var with unsupported type: interface{} @end // skipped function Argument with unsupported parameter or return types // skipped function Result with unsupported parameter or return types // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java try #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "try.h" JNIEXPORT void JNICALL Java_try_1_Try__1init(JNIEnv *env, jclass _unused) { jclass clazz; } JNIEXPORT jstring JNICALL Java_try_1_Try_this_1(JNIEnv* env, jclass _clazz) { nstring r0 = proxytry__This(); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/java.java.h.golden
// Code generated by gobind. DO NOT EDIT. #include <jni.h> #include "seq.h" extern void init_proxies(); typedef struct ret_jint { jint res; jint exc; } ret_jint; typedef struct ret_jboolean { jboolean res; jint exc; } ret_jboolean; typedef struct ret_jshort { jshort res; jint exc; } ret_jshort; typedef struct ret_jchar { jchar res; jint exc; } ret_jchar; typedef struct ret_jbyte { jbyte res; jint exc; } ret_jbyte; typedef struct ret_jlong { jlong res; jint exc; } ret_jlong; typedef struct ret_jfloat { jfloat res; jint exc; } ret_jfloat; typedef struct ret_jdouble { jdouble res; jint exc; } ret_jdouble; typedef struct ret_nstring { nstring res; jint exc; } ret_nstring; typedef struct ret_nbyteslice { nbyteslice res; jint exc; } ret_nbyteslice; extern ret_nstring cproxy_java_lang_Float_toString(jint this); extern ret_nstring cproxy_java_lang_Long_toString(jint this); extern ret_nstring cproxy_java_lang_Object_toString(jint this); // Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java java #ifndef __Java_H__ #define __Java_H__ #include <jni.h> extern jclass proxy_class_java_F; extern jmethodID proxy_class_java_F_cons; nstring cproxyjava_F_ToString(int32_t refnum); extern jclass proxy_class_java_L; extern jmethodID proxy_class_java_L_cons; nstring cproxyjava_L_ToString(int32_t refnum); extern jclass proxy_class_java_O; extern jmethodID proxy_class_java_O_cons; nstring cproxyjava_O_ToString(int32_t refnum); extern jclass proxy_class_java_R; extern jmethodID proxy_class_java_R_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.objc.go.h.golden
// Objective-C API for talking to issue12328 Go package. // gobind -lang=objc issue12328 // // File is generated by gobind. Do not edit. #ifndef __GO_issue12328_H__ #define __GO_issue12328_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.objc.m.golden
// Objective-C API for talking to interfaces Go package. // gobind -lang=objc interfaces // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Interfaces.objc.h" @implementation InterfacesError { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (BOOL)err:(NSError* _Nullable* _Nullable)error { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyinterfaces_Error_Err(refnum); Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(r0); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } return (_error == nil); } @end @implementation InterfacesI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (int32_t)rand { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyinterfaces_I_Rand(refnum); int32_t _ret0_ = (int32_t)r0; return _ret0_; } @end @implementation InterfacesI1 { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)j { int32_t refnum = go_seq_go_to_refnum(self._ref); proxyinterfaces_I1_J(refnum); } @end @implementation InterfacesI2 { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)g { int32_t refnum = go_seq_go_to_refnum(self._ref); proxyinterfaces_I2_G(refnum); } @end @implementation InterfacesI3 { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (InterfacesI1* _Nullable)f { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyinterfaces_I3_F(refnum); InterfacesI1* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[InterfacesI1 alloc] initWithRef:_ret0__ref]; } } return _ret0_; } @end @implementation InterfacesInterfaces { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)someMethod { int32_t refnum = go_seq_go_to_refnum(self._ref); proxyinterfaces_Interfaces_SomeMethod(refnum); } @end @implementation InterfacesLargerI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)anotherFunc { int32_t refnum = go_seq_go_to_refnum(self._ref); proxyinterfaces_LargerI_AnotherFunc(refnum); } - (int32_t)rand { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyinterfaces_LargerI_Rand(refnum); int32_t _ret0_ = (int32_t)r0; return _ret0_; } @end @implementation InterfacesSameI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (int32_t)rand { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyinterfaces_SameI_Rand(refnum); int32_t _ret0_ = (int32_t)r0; return _ret0_; } @end @implementation InterfacesWithParam { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)hasParam:(BOOL)p0 { int32_t refnum = go_seq_go_to_refnum(self._ref); char _p0 = (char)p0; proxyinterfaces_WithParam_HasParam(refnum, _p0); } @end int32_t InterfacesAdd3(id<InterfacesI> _Nullable r) { int32_t _r; if ([r conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> r_proxy = (id<goSeqRefInterface>)(r); _r = go_seq_go_to_refnum(r_proxy._ref); } else { _r = go_seq_to_refnum(r); } int32_t r0 = proxyinterfaces__Add3(_r); int32_t _ret0_ = (int32_t)r0; return _ret0_; } BOOL InterfacesCallErr(id<InterfacesError> _Nullable e, NSError* _Nullable* _Nullable error) { int32_t _e; if ([e conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> e_proxy = (id<goSeqRefInterface>)(e); _e = go_seq_go_to_refnum(e_proxy._ref); } else { _e = go_seq_to_refnum(e); } int32_t r0 = proxyinterfaces__CallErr(_e); Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(r0); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } return (_error == nil); } id<InterfacesI> _Nullable InterfacesSeven(void) { int32_t r0 = proxyinterfaces__Seven(); InterfacesI* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[InterfacesI alloc] initWithRef:_ret0__ref]; } } return _ret0_; } int32_t cproxyinterfaces_Error_Err(int32_t refnum) { @autoreleasepool { InterfacesError* o = go_seq_objc_from_refnum(refnum); NSError* error = nil; BOOL returnVal = [o err:&error]; NSError *_error = nil; if (!returnVal) { _error = error; } int32_t __error; if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error); __error = go_seq_go_to_refnum(_error_proxy._ref); } else { __error = go_seq_to_refnum(_error); } return __error; } } int32_t cproxyinterfaces_I_Rand(int32_t refnum) { @autoreleasepool { InterfacesI* o = go_seq_objc_from_refnum(refnum); int32_t ret0_; ret0_ = [o rand]; int32_t _ret0_ = (int32_t)ret0_; return _ret0_; } } void cproxyinterfaces_I1_J(int32_t refnum) { @autoreleasepool { InterfacesI1* o = go_seq_objc_from_refnum(refnum); [o j]; } } void cproxyinterfaces_I2_G(int32_t refnum) { @autoreleasepool { InterfacesI2* o = go_seq_objc_from_refnum(refnum); [o g]; } } int32_t cproxyinterfaces_I3_F(int32_t refnum) { @autoreleasepool { InterfacesI3* o = go_seq_objc_from_refnum(refnum); InterfacesI1* _Nullable ret0_; ret0_ = [o f]; int32_t _ret0_; if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_); _ret0_ = go_seq_go_to_refnum(ret0__proxy._ref); } else { _ret0_ = go_seq_to_refnum(ret0_); } return _ret0_; } } void cproxyinterfaces_Interfaces_SomeMethod(int32_t refnum) { @autoreleasepool { InterfacesInterfaces* o = go_seq_objc_from_refnum(refnum); [o someMethod]; } } void cproxyinterfaces_LargerI_AnotherFunc(int32_t refnum) { @autoreleasepool { InterfacesLargerI* o = go_seq_objc_from_refnum(refnum); [o anotherFunc]; } } int32_t cproxyinterfaces_LargerI_Rand(int32_t refnum) { @autoreleasepool { InterfacesLargerI* o = go_seq_objc_from_refnum(refnum); int32_t ret0_; ret0_ = [o rand]; int32_t _ret0_ = (int32_t)ret0_; return _ret0_; } } int32_t cproxyinterfaces_SameI_Rand(int32_t refnum) { @autoreleasepool { InterfacesSameI* o = go_seq_objc_from_refnum(refnum); int32_t ret0_; ret0_ = [o rand]; int32_t _ret0_ = (int32_t)ret0_; return _ret0_; } } void cproxyinterfaces_WithParam_HasParam(int32_t refnum, char p0) { @autoreleasepool { InterfacesWithParam* o = go_seq_objc_from_refnum(refnum); BOOL _p0 = p0 ? YES : NO; [o hasParam:_p0]; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java ignore #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "ignore.h" jclass proxy_class_ignore_I; jmethodID proxy_class_ignore_I_cons; // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types jclass proxy_class_ignore_S; jmethodID proxy_class_ignore_S_cons; JNIEXPORT void JNICALL Java_ignore_Ignore__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "ignore/S"); proxy_class_ignore_S = (*env)->NewGlobalRef(env, clazz); proxy_class_ignore_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "ignore/Ignore$proxyI"); proxy_class_ignore_I = (*env)->NewGlobalRef(env, clazz); proxy_class_ignore_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "ignore/I"); // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types } // skipped function Argument with unsupported parameter or return types // skipped function Result with unsupported parameter or return types JNIEXPORT jint JNICALL Java_ignore_S__1_1New(JNIEnv *env, jclass clazz) { return new_ignore_S(); } // skipped function S.Argument with unsupported parameter or return types // skipped function S.Result with unsupported parameter or return types // skipped field S with unsupported type: interface{} // skipped function I.Argument with unsupported parameter or return types // skipped method I with unsupported parameter or return types // skipped function I.Result with unsupported parameter or return types // skipped method I with unsupported parameter or return types // skipped variable C128 with unsupported type: complex128 // skipped variable C64 with unsupported type: complex64 // skipped variable Uint with unsupported type: uint // skipped variable Uint32 with unsupported type: uint32 // skipped variable Uint64 with unsupported type: uint64 // skipped variable V with unsupported type: interface{} // skipped variable Var with unsupported type: interface{}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.objc.go.h.golden
// Objective-C API for talking to issue29559 Go package. // gobind -lang=objc issue29559 // // File is generated by gobind. Do not edit. #ifndef __GO_issue29559_H__ #define __GO_issue29559_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class try_.Try is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java try package try_; import go.Seq; public abstract class Try { static { Seq.touch(); // for loading the native library _init(); } private Try() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); public static native String this_(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.objc.go.h.golden
// Objective-C API for talking to interfaces Go package. // gobind -lang=objc interfaces // // File is generated by gobind. Do not edit. #ifndef __GO_interfaces_H__ #define __GO_interfaces_H__ #include <stdint.h> #include <objc/objc.h> int32_t cproxyinterfaces_Error_Err(int32_t refnum); int32_t cproxyinterfaces_I_Rand(int32_t refnum); int32_t cproxyinterfaces_I3_F(int32_t refnum); void cproxyinterfaces_Interfaces_SomeMethod(int32_t refnum); void cproxyinterfaces_LargerI_AnotherFunc(int32_t refnum); int32_t cproxyinterfaces_LargerI_Rand(int32_t refnum); int32_t cproxyinterfaces_SameI_Rand(int32_t refnum); void cproxyinterfaces_WithParam_HasParam(int32_t refnum, char p0); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package universe. // // autogenerated by gobind -lang=go package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "universe.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxy_error_Error func proxy_error_Error(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(error) res_0 := v.Error() _res_0 := encodeString(res_0) return _res_0 } type proxy_error _seq.Ref func (p *proxy_error) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_error) Error() string { res := C.cproxy_error_Error(C.int32_t(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package ignore. // // autogenerated by gobind -lang=go ignore package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "ignore.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "ignore" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum // skipped field S.F with unsupported type: interface{} // skipped method S.Argument with unsupported parameter or return types // skipped method S.Result with unsupported parameter or return types //export new_ignore_S func new_ignore_S() C.int32_t { return C.int32_t(_seq.ToRefNum(new(ignore.S))) } // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types type proxyignore_I _seq.Ref func (p *proxyignore_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } // skipped method I.Argument with unsupported parameter or result types // skipped method I.Result with unsupported parameter or result types // skipped variable C128 with unsupported type complex128 // skipped variable C64 with unsupported type complex64 // skipped variable Uint with unsupported type uint // skipped variable Uint32 with unsupported type uint32 // skipped variable Uint64 with unsupported type uint64 // skipped variable V with unsupported type interface{} // skipped variable Var with unsupported type interface{} // skipped function Argument with unsupported parameter or result types // skipped function Result with unsupported parameter or result types
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.objc.h.golden
// Objective-C API for talking to issue12328 Go package. // gobind -lang=objc issue12328 // // File is generated by gobind. Do not edit. #ifndef __Issue12328_H__ #define __Issue12328_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class Issue12328T; @interface Issue12328T : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; @property (nonatomic) NSError* _Nullable err; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class com.example.customprefix.Customprefix is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java -javapkg=com.example customprefix package com.example.customprefix; import go.Seq; public abstract class Customprefix { static { Seq.touch(); // for loading the native library _init(); } private Customprefix() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); public static native void f(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package structs. // // autogenerated by gobind -lang=go structs package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "structs.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "structs" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxystructs_S_X_Set func proxystructs_S_X_Set(refnum C.int32_t, v C.double) { ref := _seq.FromRefNum(int32(refnum)) _v := float64(v) ref.Get().(*structs.S).X = _v } //export proxystructs_S_X_Get func proxystructs_S_X_Get(refnum C.int32_t) C.double { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S).X _v := C.double(v) return _v } //export proxystructs_S_Y_Set func proxystructs_S_Y_Set(refnum C.int32_t, v C.double) { ref := _seq.FromRefNum(int32(refnum)) _v := float64(v) ref.Get().(*structs.S).Y = _v } //export proxystructs_S_Y_Get func proxystructs_S_Y_Get(refnum C.int32_t) C.double { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S).Y _v := C.double(v) return _v } //export proxystructs_S_Identity func proxystructs_S_Identity(refnum C.int32_t) (C.int32_t, C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S) res_0, res_1 := v.Identity() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } var _res_1 C.int32_t = _seq.NullRefNum if res_1 != nil { _res_1 = C.int32_t(_seq.ToRefNum(res_1)) } return _res_0, _res_1 } //export proxystructs_S_Sum func proxystructs_S_Sum(refnum C.int32_t) C.double { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S) res_0 := v.Sum() _res_0 := C.double(res_0) return _res_0 } //export new_structs_S func new_structs_S() C.int32_t { return C.int32_t(_seq.ToRefNum(new(structs.S))) } //export proxystructs_S2_M func proxystructs_S2_M(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S2) v.M() } //export proxystructs_S2_String func proxystructs_S2_String(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.S2) res_0 := v.String() _res_0 := encodeString(res_0) return _res_0 } //export new_structs_S2 func new_structs_S2() C.int32_t { return C.int32_t(_seq.ToRefNum(new(structs.S2))) } //export proxystructs_Structs_M func proxystructs_Structs_M(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*structs.Structs) v.M() } //export new_structs_Structs func new_structs_Structs() C.int32_t { return C.int32_t(_seq.ToRefNum(new(structs.Structs))) } //export proxystructs_I_M func proxystructs_I_M(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(structs.I) v.M() } type proxystructs_I _seq.Ref func (p *proxystructs_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxystructs_I) M() { C.cproxystructs_I_M(C.int32_t(p.Bind_proxy_refnum__())) } //export proxystructs__Identity func proxystructs__Identity(param_s C.int32_t) C.int32_t { // Must be a Go object var _param_s *structs.S if _param_s_ref := _seq.FromRefNum(int32(param_s)); _param_s_ref != nil { _param_s = _param_s_ref.Get().(*structs.S) } res_0 := structs.Identity(_param_s) var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 } //export proxystructs__IdentityWithError func proxystructs__IdentityWithError(param_s C.int32_t) (C.int32_t, C.int32_t) { // Must be a Go object var _param_s *structs.S if _param_s_ref := _seq.FromRefNum(int32(param_s)); _param_s_ref != nil { _param_s = _param_s_ref.Get().(*structs.S) } res_0, res_1 := structs.IdentityWithError(_param_s) var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } var _res_1 C.int32_t = _seq.NullRefNum if res_1 != nil { _res_1 = C.int32_t(_seq.ToRefNum(res_1)) } return _res_0, _res_1 }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class vars.S is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java vars package vars; import go.Seq; public final class S implements Seq.Proxy, I { static { Vars.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public S() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof S)) { return false; } S that = (S)o; return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("S").append("{"); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class vars.I is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java vars package vars; import go.Seq; public interface I { } // Code generated by gobind. DO NOT EDIT. // Java class vars.Vars is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java vars package vars; import go.Seq; public abstract class Vars { static { Seq.touch(); // for loading the native library _init(); } private Vars() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyI implements Seq.Proxy, I { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } } public static native void setABool(boolean v); public static native boolean getABool(); public static native void setAFloat(double v); public static native double getAFloat(); public static native void setAFloat32(float v); public static native float getAFloat32(); public static native void setAFloat64(double v); public static native double getAFloat64(); public static native void setAString(String v); public static native String getAString(); public static native void setAStructPtr(S v); public static native S getAStructPtr(); public static native void setAnInt(long v); public static native long getAnInt(); public static native void setAnInt16(short v); public static native short getAnInt16(); public static native void setAnInt32(int v); public static native int getAnInt32(); public static native void setAnInt64(long v); public static native long getAnInt64(); public static native void setAnInt8(byte v); public static native byte getAnInt8(); public static native void setAnInterface(I v); public static native I getAnInterface(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java vars #ifndef __Vars_H__ #define __Vars_H__ #include <jni.h> extern jclass proxy_class_vars_I; extern jmethodID proxy_class_vars_I_cons; extern jclass proxy_class_vars_S; extern jmethodID proxy_class_vars_S_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.objc.h.golden
// Objective-C API for talking to issue29559 Go package. // gobind -lang=objc issue29559 // // File is generated by gobind. Do not edit. #ifndef __Issue29559_H__ #define __Issue29559_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" FOUNDATION_EXPORT void Issue29559TakesAString(NSString* _Nullable s); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.objc.m.golden
// Objective-C API for talking to doc Go package. // gobind -lang=objc doc // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Doc.objc.h" @implementation DocNoDoc { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_doc_NoDoc()); } return self; } @end @implementation DocS { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (instancetype)init { self = [super init]; if (!self) return nil; int32_t refnum = proxydoc__NewS(); __ref = go_seq_from_refnum(refnum); return self; } - (NSString* _Nonnull)sf { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxydoc_S_SF_Get(refnum); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } - (void)setSF:(NSString* _Nonnull)v { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _v = go_seq_from_objc_string(v); proxydoc_S_SF_Set(refnum, _v); } - (DocS2* _Nullable)s2 { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxydoc_S_S2_Get(refnum); DocS2* _r0 = nil; GoSeqRef* _r0_ref = go_seq_from_refnum(r0); if (_r0_ref != NULL) { _r0 = _r0_ref.obj; if (_r0 == nil) { _r0 = [[DocS2 alloc] initWithRef:_r0_ref]; } } return _r0; } - (void)setS2:(DocS2* _Nullable)v { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t _v; if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v); _v = go_seq_go_to_refnum(v_proxy._ref); } else { _v = go_seq_to_refnum(v); } proxydoc_S_S2_Set(refnum, _v); } - (NSString* _Nonnull)f1 { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxydoc_S_F1_Get(refnum); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } - (void)setF1:(NSString* _Nonnull)v { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _v = go_seq_from_objc_string(v); proxydoc_S_F1_Set(refnum, _v); } - (NSString* _Nonnull)f2 { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxydoc_S_F2_Get(refnum); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } - (void)setF2:(NSString* _Nonnull)v { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _v = go_seq_from_objc_string(v); proxydoc_S_F2_Set(refnum, _v); } - (void)after { int32_t refnum = go_seq_go_to_refnum(self._ref); proxydoc_S_After(refnum); } - (void)before { int32_t refnum = go_seq_go_to_refnum(self._ref); proxydoc_S_Before(refnum); } @end @implementation DocS2 { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_doc_S2()); } return self; } @end @implementation DocI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)im { int32_t refnum = go_seq_go_to_refnum(self._ref); proxydoc_I_IM(refnum); } @end const BOOL DocC = YES; @implementation Doc + (void) setNoDocVar:(double)v { double _v = (double)v; var_setdoc_NoDocVar(_v); } + (double) noDocVar { double r0 = var_getdoc_NoDocVar(); double _r0 = (double)r0; return _r0; } + (void) setSpecific:(NSString* _Nonnull)v { nstring _v = go_seq_from_objc_string(v); var_setdoc_Specific(_v); } + (NSString* _Nonnull) specific { nstring r0 = var_getdoc_Specific(); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } + (void) setV:(NSString* _Nonnull)v { nstring _v = go_seq_from_objc_string(v); var_setdoc_V(_v); } + (NSString* _Nonnull) v { nstring r0 = var_getdoc_V(); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } @end void DocF(void) { proxydoc__F(); } DocS* _Nullable DocNewS(void) { int32_t r0 = proxydoc__NewS(); DocS* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[DocS alloc] initWithRef:_ret0__ref]; } } return _ret0_; } void cproxydoc_I_IM(int32_t refnum) { @autoreleasepool { DocI* o = go_seq_objc_from_refnum(refnum); [o im]; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package interfaces type I interface { Rand() int32 } type SameI interface { Rand() int32 } type LargerI interface { Rand() int32 AnotherFunc() } func Add3(r I) int32 { return r.Rand() + r.Rand() + r.Rand() } // chosen by fair dice roll. // guaranteed to be random. type seven struct{} func (seven) Rand() int32 { return 7 } func Seven() I { return seven{} } type WithParam interface { HasParam(p bool) } type Error interface { Err() error } func CallErr(e Error) error { return e.Err() } // not implementable type I1 interface { J() H() *seven // not bound } // not implementable type I2 interface { f() G() } // implementable // (the implementor has to find a source of I1s) type I3 interface { F() I1 } // not bound func F() seven { return seven{} } func G(u seven) {} // Interfaces is an interface with the same name as its package. type Interfaces interface { SomeMethod() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue12328 #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "issue12328.h" jclass proxy_class_issue12328_T; jmethodID proxy_class_issue12328_T_cons; JNIEXPORT void JNICALL Java_issue12328_Issue12328__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "issue12328/T"); proxy_class_issue12328_T = (*env)->NewGlobalRef(env, clazz); proxy_class_issue12328_T_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); } JNIEXPORT jint JNICALL Java_issue12328_T__1_1New(JNIEnv *env, jclass clazz) { return new_issue12328_T(); } JNIEXPORT void JNICALL Java_issue12328_T_setErr(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxyissue12328_T_Err_Set(o, _v); } JNIEXPORT jobject JNICALL Java_issue12328_T_getErr(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxyissue12328_T_Err_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons); return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.objc.h.golden
// Objective-C API for talking to underscores Go package. // gobind -lang=objc underscores // // File is generated by gobind. Do not edit. #ifndef __Underscore_pkg_H__ #define __Underscore_pkg_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class Underscore_pkgUnderscore_struct; @interface Underscore_pkgUnderscore_struct : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; @property (nonatomic) NSString* _Nonnull underscore_field; @end @interface Underscore_pkg : NSObject + (long) underscore_var; + (void) setUnderscore_var:(long)v; @end FOUNDATION_EXPORT void Underscore_pkgUnderscore_func(void); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/classes.go.golden
// Code generated by gobind. DO NOT EDIT. package Runnable import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Runnable proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Runnable. Cast func(v interface{}) Java.Java_lang_Runnable ) // Code generated by gobind. DO NOT EDIT. package lang import "Java" const _ = Java.Dummy type Runnable Java.Java_lang_Runnable type Object Java.Java_lang_Object type System Java.Java_lang_System // Code generated by gobind. DO NOT EDIT. package InputStream import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.io.InputStream proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.io.InputStream. Cast func(v interface{}) Java.Java_io_InputStream ) // Code generated by gobind. DO NOT EDIT. package io import "Java" const _ = Java.Dummy type InputStream Java.Java_io_InputStream type Console Java.Java_io_Console // Code generated by gobind. DO NOT EDIT. package Future import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.concurrent.Future proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.concurrent.Future. Cast func(v interface{}) Java.Java_util_concurrent_Future ) // Code generated by gobind. DO NOT EDIT. package concurrent import "Java" const _ = Java.Dummy type Future Java.Java_util_concurrent_Future type TimeUnit Java.Java_util_concurrent_TimeUnit // Code generated by gobind. DO NOT EDIT. package Object import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Object proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Object. Cast func(v interface{}) Java.Java_lang_Object ) // Code generated by gobind. DO NOT EDIT. package TimeUnit import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.concurrent.TimeUnit proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.concurrent.TimeUnit. Cast func(v interface{}) Java.Java_util_concurrent_TimeUnit ) // Code generated by gobind. DO NOT EDIT. package Spliterators import "Java" const _ = Java.Dummy const () var ( Iterator func(a0 Java.Java_util_Spliterator) Java.Java_util_Iterator // Cast takes a proxy for a Java object and converts it to a java.util.Spliterators proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Spliterators. Cast func(v interface{}) Java.Java_util_Spliterators ) // Code generated by gobind. DO NOT EDIT. package util import "Java" const _ = Java.Dummy type Spliterators Java.Java_util_Spliterators type Iterator Java.Java_util_Iterator type Spliterator Java.Java_util_Spliterator // Code generated by gobind. DO NOT EDIT. package System import "Java" const _ = Java.Dummy const () var ( Console func() Java.Java_io_Console // Cast takes a proxy for a Java object and converts it to a java.lang.System proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.System. Cast func(v interface{}) Java.Java_lang_System ) // Code generated by gobind. DO NOT EDIT. package Future import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.Future proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.Future. Cast func(v interface{}) Java.Java_Future ) // Code generated by gobind. DO NOT EDIT. package java import "Java" const _ = Java.Dummy type Future Java.Java_Future type InputStream Java.Java_InputStream type Object Java.Java_Object type Runnable Java.Java_Runnable // Code generated by gobind. DO NOT EDIT. package InputStream import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.InputStream proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.InputStream. Cast func(v interface{}) Java.Java_InputStream ) // Code generated by gobind. DO NOT EDIT. package Object import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.Object proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.Object. Cast func(v interface{}) Java.Java_Object ) // Code generated by gobind. DO NOT EDIT. package Runnable import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.Runnable proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.Runnable. Cast func(v interface{}) Java.Java_Runnable ) // Code generated by gobind. DO NOT EDIT. package Iterator import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.Iterator proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Iterator. Cast func(v interface{}) Java.Java_util_Iterator ) // Code generated by gobind. DO NOT EDIT. package Spliterator import "Java" const _ = Java.Dummy type OfInt Java.Java_util_Spliterator_OfInt type OfLong Java.Java_util_Spliterator_OfLong type OfDouble Java.Java_util_Spliterator_OfDouble const ( ORDERED = 16 DISTINCT = 1 SORTED = 4 SIZED = 64 NONNULL = 256 IMMUTABLE = 1024 CONCURRENT = 4096 SUBSIZED = 16384 ) var ( // Cast takes a proxy for a Java object and converts it to a java.util.Spliterator proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Spliterator. Cast func(v interface{}) Java.Java_util_Spliterator ) // Code generated by gobind. DO NOT EDIT. package OfInt import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfInt proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.PrimitiveIterator.OfInt. Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfInt ) // Code generated by gobind. DO NOT EDIT. package PrimitiveIterator import "Java" const _ = Java.Dummy type OfInt Java.Java_util_PrimitiveIterator_OfInt type OfLong Java.Java_util_PrimitiveIterator_OfLong type OfDouble Java.Java_util_PrimitiveIterator_OfDouble // Code generated by gobind. DO NOT EDIT. package OfInt import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfInt proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Spliterator.OfInt. Cast func(v interface{}) Java.Java_util_Spliterator_OfInt ) // Code generated by gobind. DO NOT EDIT. package OfLong import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfLong proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.PrimitiveIterator.OfLong. Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfLong ) // Code generated by gobind. DO NOT EDIT. package OfLong import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfLong proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Spliterator.OfLong. Cast func(v interface{}) Java.Java_util_Spliterator_OfLong ) // Code generated by gobind. DO NOT EDIT. package OfDouble import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfDouble proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.PrimitiveIterator.OfDouble. Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfDouble ) // Code generated by gobind. DO NOT EDIT. package OfDouble import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfDouble proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.util.Spliterator.OfDouble. Cast func(v interface{}) Java.Java_util_Spliterator_OfDouble ) // Code generated by gobind. DO NOT EDIT. package Console import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.io.Console proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.io.Console. Cast func(v interface{}) Java.Java_io_Console ) // Code generated by gobind. DO NOT EDIT. package Java // Used to silence this package not used errors const Dummy = 0 type Java_lang_Runnable interface { Run() } type Java_io_InputStream interface { Read(a0 ...interface{}) (int32, error) ToString() string } type Java_util_concurrent_Future interface { Get(a0 ...interface{}) (Java_lang_Object, error) } type Java_lang_Object interface { ToString() string } type Java_util_concurrent_TimeUnit interface { ToString() string } type Java_util_Spliterators interface { ToString() string } type Java_lang_System interface { ToString() string } type Java_Future interface { Get(a0 ...interface{}) (Java_lang_Object, error) Super() Java_Future // Unwrap returns the Go object this Java instance // is wrapping. // The return value is a java.Future, but the delclared type is // interface{} to avoid import cycles. Unwrap() interface{} } type Java_InputStream interface { Read(a0 ...interface{}) (int32, error) ToString() string Super() Java_InputStream // Unwrap returns the Go object this Java instance // is wrapping. // The return value is a java.InputStream, but the delclared type is // interface{} to avoid import cycles. Unwrap() interface{} } type Java_Object interface { ToString() string Super() Java_Object // Unwrap returns the Go object this Java instance // is wrapping. // The return value is a java.Object, but the delclared type is // interface{} to avoid import cycles. Unwrap() interface{} } type Java_Runnable interface { Run() Super() Java_Runnable // Unwrap returns the Go object this Java instance // is wrapping. // The return value is a java.Runnable, but the delclared type is // interface{} to avoid import cycles. Unwrap() interface{} } type Java_util_Iterator interface { } type Java_util_Spliterator interface { } type Java_util_PrimitiveIterator_OfInt interface { } type Java_util_Spliterator_OfInt interface { } type Java_util_PrimitiveIterator_OfLong interface { } type Java_util_Spliterator_OfLong interface { } type Java_util_PrimitiveIterator_OfDouble interface { } type Java_util_Spliterator_OfDouble interface { } type Java_io_Console interface { Flush() error ToString() string } // Code generated by gobind. DO NOT EDIT. package main /* #include <stdlib.h> // for free() #include <jni.h> #include "seq.h" #include "classes.h" */ import "C" import ( "Java" _seq "golang.org/x/mobile/bind/seq" ) import "Java/java/lang/Runnable" import "Java/java/io/InputStream" import "Java/java/util/concurrent/Future" import "Java/java/lang/Object" import "Java/java/util/concurrent/TimeUnit" import "Java/java/util/Spliterators" import "Java/java/lang/System" import "Java/java/Future" import "Java/java/InputStream" import "Java/java/Object" import "Java/java/Runnable" import "Java/java/util/Iterator" import "Java/java/util/Spliterator" import "Java/java/util/PrimitiveIterator/OfInt" import "Java/java/util/Spliterator/OfInt" import "Java/java/util/PrimitiveIterator/OfLong" import "Java/java/util/Spliterator/OfLong" import "Java/java/util/PrimitiveIterator/OfDouble" import "Java/java/util/Spliterator/OfDouble" import "Java/java/io/Console" import "testdata" import "unsafe" import "reflect" import "fmt" type proxy interface{ Bind_proxy_refnum__() int32 } // Suppress unused package error var _ = _seq.FromRefNum const _ = Java.Dummy //export initClasses func initClasses() { C.init_proxies() init_java_lang_Runnable() init_java_io_InputStream() init_java_util_concurrent_Future() init_java_lang_Object() init_java_util_concurrent_TimeUnit() init_java_util_Spliterators() init_java_lang_System() init_java_Future() init_java_InputStream() init_java_Object() init_java_Runnable() init_java_util_Iterator() init_java_util_Spliterator() init_java_util_PrimitiveIterator_OfInt() init_java_util_Spliterator_OfInt() init_java_util_PrimitiveIterator_OfLong() init_java_util_Spliterator_OfLong() init_java_util_PrimitiveIterator_OfDouble() init_java_util_Spliterator_OfDouble() init_java_io_Console() } var class_java_lang_Runnable C.jclass func init_java_lang_Runnable() { cls := C.CString("java/lang/Runnable") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Runnable = clazz Runnable.Cast = func(v interface{}) Java.Java_lang_Runnable { t := reflect.TypeOf((*proxy_class_java_lang_Runnable)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Runnable) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Runnable) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Runnable")) } return cv } } type proxy_class_java_lang_Runnable _seq.Ref func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_Runnable) Run() { res := C.cproxy_java_lang_Runnable_run(C.jint(p.Bind_proxy_refnum__())) var _exc error _exc_ref := _seq.FromRefNum(int32(res)) if _exc_ref != nil { if res < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } } var class_java_io_InputStream C.jclass func init_java_io_InputStream() { cls := C.CString("java/io/InputStream") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_io_InputStream = clazz InputStream.Cast = func(v interface{}) Java.Java_io_InputStream { t := reflect.TypeOf((*proxy_class_java_io_InputStream)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_io_InputStream) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_io_InputStream) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.io.InputStream")) } return cv } } type proxy_class_java_io_InputStream _seq.Ref func (p *proxy_class_java_io_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_io_InputStream) Read(a0 ...interface{}) (int32, error) { switch 0 + len(a0) { case 0: res := C.cproxy_java_io_InputStream_read__(C.jint(p.Bind_proxy_refnum__())) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 1: _a0, ok0 := a0[0].([]byte) if ok0 { __a0 := fromSlice(_a0, false) res := C.cproxy_java_io_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } case 3: _a0, ok0 := a0[0].([]byte) _a1, ok1 := a0[1].(int32) _a2, ok2 := a0[2].(int32) if ok0 && ok1 && ok2 { __a0 := fromSlice(_a0, false) __a1 := C.jint(_a1) __a2 := C.jint(_a2) res := C.cproxy_java_io_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.io.InputStream.read that matched the arguments") } func (p *proxy_class_java_io_InputStream) ToString() string { res := C.cproxy_java_io_InputStream_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_util_concurrent_Future C.jclass func init_java_util_concurrent_Future() { cls := C.CString("java/util/concurrent/Future") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_concurrent_Future = clazz Future.Cast = func(v interface{}) Java.Java_util_concurrent_Future { t := reflect.TypeOf((*proxy_class_java_util_concurrent_Future)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_concurrent_Future) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_concurrent_Future) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.concurrent.Future")) } return cv } } type proxy_class_java_util_concurrent_Future _seq.Ref func (p *proxy_class_java_util_concurrent_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_util_concurrent_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) { switch 0 + len(a0) { case 0: res := C.cproxy_java_util_concurrent_Future_get__(C.jint(p.Bind_proxy_refnum__())) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 2: _a0, ok0 := a0[0].(int64) _a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit) if ok0 && ok1 { __a0 := C.jlong(_a0) var __a1 C.jint = _seq.NullRefNum if _a1 != nil { __a1 = C.jint(_seq.ToRefNum(_a1)) } res := C.cproxy_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.util.concurrent.Future.get that matched the arguments") } var class_java_lang_Object C.jclass func init_java_lang_Object() { cls := C.CString("java/lang/Object") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Object = clazz Object.Cast = func(v interface{}) Java.Java_lang_Object { t := reflect.TypeOf((*proxy_class_java_lang_Object)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Object) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Object) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Object")) } return cv } } type proxy_class_java_lang_Object _seq.Ref func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_Object) ToString() string { res := C.cproxy_java_lang_Object_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_util_concurrent_TimeUnit C.jclass func init_java_util_concurrent_TimeUnit() { cls := C.CString("java/util/concurrent/TimeUnit") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_concurrent_TimeUnit = clazz TimeUnit.Cast = func(v interface{}) Java.Java_util_concurrent_TimeUnit { t := reflect.TypeOf((*proxy_class_java_util_concurrent_TimeUnit)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_concurrent_TimeUnit) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_concurrent_TimeUnit) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.concurrent.TimeUnit")) } return cv } } type proxy_class_java_util_concurrent_TimeUnit _seq.Ref func (p *proxy_class_java_util_concurrent_TimeUnit) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_util_concurrent_TimeUnit) ToString() string { res := C.cproxy_java_util_concurrent_TimeUnit_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_util_Spliterators C.jclass func init_java_util_Spliterators() { cls := C.CString("java/util/Spliterators") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Spliterators = clazz Spliterators.Iterator = func(a0 Java.Java_util_Spliterator) Java.Java_util_Iterator { { var __a0 C.jint = _seq.NullRefNum if a0 != nil { __a0 = C.jint(_seq.ToRefNum(a0)) } res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2(__a0) var _res Java.Java_util_Iterator _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_util_Iterator) } else { // foreign object _res = (*proxy_class_java_util_Iterator)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } { _a0, ok0 := a0.(Java.Java_util_Spliterator_OfInt) if ok0 { var __a0 C.jint = _seq.NullRefNum if _a0 != nil { __a0 = C.jint(_seq.ToRefNum(_a0)) } res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2(__a0) var _res Java.Java_util_PrimitiveIterator_OfInt _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfInt) } else { // foreign object _res = (*proxy_class_java_util_PrimitiveIterator_OfInt)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } } { _a0, ok0 := a0.(Java.Java_util_Spliterator_OfLong) if ok0 { var __a0 C.jint = _seq.NullRefNum if _a0 != nil { __a0 = C.jint(_seq.ToRefNum(_a0)) } res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2(__a0) var _res Java.Java_util_PrimitiveIterator_OfLong _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfLong) } else { // foreign object _res = (*proxy_class_java_util_PrimitiveIterator_OfLong)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } } { _a0, ok0 := a0.(Java.Java_util_Spliterator_OfDouble) if ok0 { var __a0 C.jint = _seq.NullRefNum if _a0 != nil { __a0 = C.jint(_seq.ToRefNum(_a0)) } res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2(__a0) var _res Java.Java_util_PrimitiveIterator_OfDouble _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfDouble) } else { // foreign object _res = (*proxy_class_java_util_PrimitiveIterator_OfDouble)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } } panic("no overloaded method found for java.util.Spliterators.iterator that matched the arguments") } Spliterators.Cast = func(v interface{}) Java.Java_util_Spliterators { t := reflect.TypeOf((*proxy_class_java_util_Spliterators)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterators) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Spliterators) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterators")) } return cv } } type proxy_class_java_util_Spliterators _seq.Ref func (p *proxy_class_java_util_Spliterators) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_util_Spliterators) ToString() string { res := C.cproxy_java_util_Spliterators_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_lang_System C.jclass func init_java_lang_System() { cls := C.CString("java/lang/System") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_System = clazz System.Console = func() Java.Java_io_Console { res := C.cproxy_s_java_lang_System_console() var _res Java.Java_io_Console _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_io_Console) } else { // foreign object _res = (*proxy_class_java_io_Console)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } System.Cast = func(v interface{}) Java.Java_lang_System { t := reflect.TypeOf((*proxy_class_java_lang_System)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_System) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_System) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.System")) } return cv } } type proxy_class_java_lang_System _seq.Ref func (p *proxy_class_java_lang_System) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_System) ToString() string { res := C.cproxy_java_lang_System_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_Future C.jclass func init_java_Future() { cls := C.CString("java/Future") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_Future = clazz Future.Cast = func(v interface{}) Java.Java_Future { t := reflect.TypeOf((*proxy_class_java_Future)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Future) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_Future) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.Future")) } return cv } } type proxy_class_java_Future _seq.Ref func (p *proxy_class_java_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) { switch 0 + len(a0) { case 0: res := C.cproxy_java_Future_get__(C.jint(p.Bind_proxy_refnum__())) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 2: _a0, ok0 := a0[0].(int64) _a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit) if ok0 && ok1 { __a0 := C.jlong(_a0) var __a1 C.jint = _seq.NullRefNum if _a1 != nil { __a1 = C.jint(_seq.ToRefNum(_a1)) } res := C.cproxy_java_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.Future.get that matched the arguments") } func (p *proxy_class_java_Future) Super() Java.Java_Future { return &super_java_Future{p} } type super_java_Future struct{ *proxy_class_java_Future } func (p *proxy_class_java_Future) Unwrap() interface{} { goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__())) return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Future) } func (p *super_java_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) { switch 0 + len(a0) { case 0: res := C.csuper_java_Future_get__(C.jint(p.Bind_proxy_refnum__())) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 2: _a0, ok0 := a0[0].(int64) _a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit) if ok0 && ok1 { __a0 := C.jlong(_a0) var __a1 C.jint = _seq.NullRefNum if _a1 != nil { __a1 = C.jint(_seq.ToRefNum(_a1)) } res := C.csuper_java_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1) var _res Java.Java_lang_Object _res_ref := _seq.FromRefNum(int32(res.res)) if _res_ref != nil { if res.res < 0 { // go object _res = _res_ref.Get().(Java.Java_lang_Object) } else { // foreign object _res = (*proxy_class_java_lang_Object)(_res_ref) } } var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.Future.get that matched the arguments") } var class_java_InputStream C.jclass func init_java_InputStream() { cls := C.CString("java/InputStream") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_InputStream = clazz InputStream.Cast = func(v interface{}) Java.Java_InputStream { t := reflect.TypeOf((*proxy_class_java_InputStream)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_InputStream) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_InputStream) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.InputStream")) } return cv } } type proxy_class_java_InputStream _seq.Ref func (p *proxy_class_java_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_InputStream) Read(a0 ...interface{}) (int32, error) { switch 0 + len(a0) { case 0: res := C.cproxy_java_InputStream_read__(C.jint(p.Bind_proxy_refnum__())) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 1: _a0, ok0 := a0[0].([]byte) if ok0 { __a0 := fromSlice(_a0, false) res := C.cproxy_java_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } case 3: _a0, ok0 := a0[0].([]byte) _a1, ok1 := a0[1].(int32) _a2, ok2 := a0[2].(int32) if ok0 && ok1 && ok2 { __a0 := fromSlice(_a0, false) __a1 := C.jint(_a1) __a2 := C.jint(_a2) res := C.cproxy_java_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.InputStream.read that matched the arguments") } func (p *proxy_class_java_InputStream) ToString() string { res := C.cproxy_java_InputStream_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } func (p *proxy_class_java_InputStream) Super() Java.Java_InputStream { return &super_java_InputStream{p} } type super_java_InputStream struct{ *proxy_class_java_InputStream } func (p *proxy_class_java_InputStream) Unwrap() interface{} { goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__())) return _seq.FromRefNum(int32(goRefnum)).Get().(*java.InputStream) } func (p *super_java_InputStream) Read(a0 ...interface{}) (int32, error) { switch 0 + len(a0) { case 0: res := C.csuper_java_InputStream_read__(C.jint(p.Bind_proxy_refnum__())) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc case 1: _a0, ok0 := a0[0].([]byte) if ok0 { __a0 := fromSlice(_a0, false) res := C.csuper_java_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } case 3: _a0, ok0 := a0[0].([]byte) _a1, ok1 := a0[1].(int32) _a2, ok2 := a0[2].(int32) if ok0 && ok1 && ok2 { __a0 := fromSlice(_a0, false) __a1 := C.jint(_a1) __a2 := C.jint(_a2) res := C.csuper_java_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2) _res := int32(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _res, _exc } } panic("no overloaded method found for java.InputStream.read that matched the arguments") } func (p *super_java_InputStream) ToString() string { res := C.csuper_java_InputStream_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_Object C.jclass func init_java_Object() { cls := C.CString("java/Object") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_Object = clazz Object.Cast = func(v interface{}) Java.Java_Object { t := reflect.TypeOf((*proxy_class_java_Object)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Object) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_Object) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.Object")) } return cv } } type proxy_class_java_Object _seq.Ref func (p *proxy_class_java_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_Object) ToString() string { res := C.cproxy_java_Object_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } func (p *proxy_class_java_Object) Super() Java.Java_Object { return &super_java_Object{p} } type super_java_Object struct{ *proxy_class_java_Object } func (p *proxy_class_java_Object) Unwrap() interface{} { goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__())) return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Object) } func (p *super_java_Object) ToString() string { res := C.csuper_java_Object_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_Runnable C.jclass func init_java_Runnable() { cls := C.CString("java/Runnable") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_Runnable = clazz Runnable.Cast = func(v interface{}) Java.Java_Runnable { t := reflect.TypeOf((*proxy_class_java_Runnable)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Runnable) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_Runnable) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.Runnable")) } return cv } } type proxy_class_java_Runnable _seq.Ref func (p *proxy_class_java_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_Runnable) Run() { res := C.cproxy_java_Runnable_run(C.jint(p.Bind_proxy_refnum__())) var _exc error _exc_ref := _seq.FromRefNum(int32(res)) if _exc_ref != nil { if res < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } } func (p *proxy_class_java_Runnable) Super() Java.Java_Runnable { return &super_java_Runnable{p} } type super_java_Runnable struct{ *proxy_class_java_Runnable } func (p *proxy_class_java_Runnable) Unwrap() interface{} { goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__())) return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Runnable) } func (p *super_java_Runnable) Run() { res := C.csuper_java_Runnable_run(C.jint(p.Bind_proxy_refnum__())) var _exc error _exc_ref := _seq.FromRefNum(int32(res)) if _exc_ref != nil { if res < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } } var class_java_util_Iterator C.jclass func init_java_util_Iterator() { cls := C.CString("java/util/Iterator") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Iterator = clazz Iterator.Cast = func(v interface{}) Java.Java_util_Iterator { t := reflect.TypeOf((*proxy_class_java_util_Iterator)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Iterator) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Iterator) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Iterator")) } return cv } } type proxy_class_java_util_Iterator _seq.Ref func (p *proxy_class_java_util_Iterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_Spliterator C.jclass func init_java_util_Spliterator() { cls := C.CString("java/util/Spliterator") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Spliterator = clazz Spliterator.Cast = func(v interface{}) Java.Java_util_Spliterator { t := reflect.TypeOf((*proxy_class_java_util_Spliterator)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Spliterator) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator")) } return cv } } type proxy_class_java_util_Spliterator _seq.Ref func (p *proxy_class_java_util_Spliterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_PrimitiveIterator_OfInt C.jclass func init_java_util_PrimitiveIterator_OfInt() { cls := C.CString("java/util/PrimitiveIterator$OfInt") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_PrimitiveIterator_OfInt = clazz OfInt.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfInt { t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfInt)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfInt) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfInt) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfInt")) } return cv } } type proxy_class_java_util_PrimitiveIterator_OfInt _seq.Ref func (p *proxy_class_java_util_PrimitiveIterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_Spliterator_OfInt C.jclass func init_java_util_Spliterator_OfInt() { cls := C.CString("java/util/Spliterator$OfInt") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Spliterator_OfInt = clazz OfInt.Cast = func(v interface{}) Java.Java_util_Spliterator_OfInt { t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfInt)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfInt) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfInt) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfInt")) } return cv } } type proxy_class_java_util_Spliterator_OfInt _seq.Ref func (p *proxy_class_java_util_Spliterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_PrimitiveIterator_OfLong C.jclass func init_java_util_PrimitiveIterator_OfLong() { cls := C.CString("java/util/PrimitiveIterator$OfLong") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_PrimitiveIterator_OfLong = clazz OfLong.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfLong { t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfLong)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfLong) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfLong) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfLong")) } return cv } } type proxy_class_java_util_PrimitiveIterator_OfLong _seq.Ref func (p *proxy_class_java_util_PrimitiveIterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_Spliterator_OfLong C.jclass func init_java_util_Spliterator_OfLong() { cls := C.CString("java/util/Spliterator$OfLong") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Spliterator_OfLong = clazz OfLong.Cast = func(v interface{}) Java.Java_util_Spliterator_OfLong { t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfLong)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfLong) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfLong) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfLong")) } return cv } } type proxy_class_java_util_Spliterator_OfLong _seq.Ref func (p *proxy_class_java_util_Spliterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_PrimitiveIterator_OfDouble C.jclass func init_java_util_PrimitiveIterator_OfDouble() { cls := C.CString("java/util/PrimitiveIterator$OfDouble") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_PrimitiveIterator_OfDouble = clazz OfDouble.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfDouble { t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfDouble)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfDouble) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfDouble) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfDouble")) } return cv } } type proxy_class_java_util_PrimitiveIterator_OfDouble _seq.Ref func (p *proxy_class_java_util_PrimitiveIterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_util_Spliterator_OfDouble C.jclass func init_java_util_Spliterator_OfDouble() { cls := C.CString("java/util/Spliterator$OfDouble") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_util_Spliterator_OfDouble = clazz OfDouble.Cast = func(v interface{}) Java.Java_util_Spliterator_OfDouble { t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfDouble)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfDouble) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfDouble) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfDouble")) } return cv } } type proxy_class_java_util_Spliterator_OfDouble _seq.Ref func (p *proxy_class_java_util_Spliterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } var class_java_io_Console C.jclass func init_java_io_Console() { cls := C.CString("java/io/Console") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_io_Console = clazz Console.Cast = func(v interface{}) Java.Java_io_Console { t := reflect.TypeOf((*proxy_class_java_io_Console)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_io_Console) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_io_Console) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.io.Console")) } return cv } } type proxy_class_java_io_Console _seq.Ref func (p *proxy_class_java_io_Console) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_io_Console) Flush() error { res := C.cproxy_java_io_Console_flush(C.jint(p.Bind_proxy_refnum__())) var _exc error _exc_ref := _seq.FromRefNum(int32(res)) if _exc_ref != nil { if res < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } return _exc } func (p *proxy_class_java_io_Console) ToString() string { res := C.cproxy_java_io_Console_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } // Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package java. // // autogenerated by gobind -lang=go classes package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "java.h" */ import "C" import ( java_1 "Java/java" "Java/java/io" "Java/java/lang" "Java/java/util/concurrent" "classes" _seq "golang.org/x/mobile/bind/seq" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyjava_Future_Future_Set func proxyjava_Future_Future_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v concurrent.Future _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(concurrent.Future) } else { // foreign object _v = (*proxy_class_java_util_concurrent_Future)(_v_ref) } } ref.Get().(*java.Future).Future = _v } //export proxyjava_Future_Future_Get func proxyjava_Future_Future_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Future).Future var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyjava_Future_Get func proxyjava_Future_Get(refnum C.int32_t) (C.int32_t, C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Future) res_0, res_1 := v.Get() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } var _res_1 C.int32_t = _seq.NullRefNum if res_1 != nil { _res_1 = C.int32_t(_seq.ToRefNum(res_1)) } return _res_0, _res_1 } //export proxyjava_Future_Get_ func proxyjava_Future_Get_(refnum C.int32_t, param_p0 C.int64_t, param_p1 C.int32_t) (C.int32_t, C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Future) _param_p0 := int64(param_p0) var _param_p1 concurrent.TimeUnit _param_p1_ref := _seq.FromRefNum(int32(param_p1)) if _param_p1_ref != nil { if param_p1 < 0 { // go object _param_p1 = _param_p1_ref.Get().(concurrent.TimeUnit) } else { // foreign object _param_p1 = (*proxy_class_java_util_concurrent_TimeUnit)(_param_p1_ref) } } res_0, res_1 := v.Get_(_param_p0, _param_p1) var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } var _res_1 C.int32_t = _seq.NullRefNum if res_1 != nil { _res_1 = C.int32_t(_seq.ToRefNum(res_1)) } return _res_0, _res_1 } //export new_java_Future func new_java_Future() C.int32_t { return C.int32_t(_seq.ToRefNum(new(java.Future))) } //export proxyjava_InputStream_InputStream_Set func proxyjava_InputStream_InputStream_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v io.InputStream _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(io.InputStream) } else { // foreign object _v = (*proxy_class_java_io_InputStream)(_v_ref) } } ref.Get().(*java.InputStream).InputStream = _v } //export proxyjava_InputStream_InputStream_Get func proxyjava_InputStream_InputStream_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.InputStream).InputStream var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyjava_InputStream_Read func proxyjava_InputStream_Read(refnum C.int32_t) (C.int32_t, C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.InputStream) res_0, res_1 := v.Read() _res_0 := C.int32_t(res_0) var _res_1 C.int32_t = _seq.NullRefNum if res_1 != nil { _res_1 = C.int32_t(_seq.ToRefNum(res_1)) } return _res_0, _res_1 } //export new_java_InputStream func new_java_InputStream() C.int32_t { return C.int32_t(_seq.ToRefNum(new(java.InputStream))) } //export proxyjava_Object_Object_Set func proxyjava_Object_Object_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v lang.Object _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(lang.Object) } else { // foreign object _v = (*proxy_class_java_lang_Object)(_v_ref) } } ref.Get().(*java.Object).Object = _v } //export proxyjava_Object_Object_Get func proxyjava_Object_Object_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Object).Object var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export new_java_Object func new_java_Object() C.int32_t { return C.int32_t(_seq.ToRefNum(new(java.Object))) } //export proxyjava_Runnable_Runnable_Set func proxyjava_Runnable_Runnable_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v lang.Runnable _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(lang.Runnable) } else { // foreign object _v = (*proxy_class_java_lang_Runnable)(_v_ref) } } ref.Get().(*java.Runnable).Runnable = _v } //export proxyjava_Runnable_Runnable_Get func proxyjava_Runnable_Runnable_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Runnable).Runnable var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyjava_Runnable_Run func proxyjava_Runnable_Run(refnum C.int32_t, param_this C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*java.Runnable) var _param_this java_1.Runnable _param_this_ref := _seq.FromRefNum(int32(param_this)) if _param_this_ref != nil { if param_this < 0 { // go object _param_this = _param_this_ref.Get().(java_1.Runnable) } else { // foreign object _param_this = (*proxy_class_java_Runnable)(_param_this_ref) } } v.Run(_param_this) } //export new_java_Runnable func new_java_Runnable() C.int32_t { return C.int32_t(_seq.ToRefNum(new(java.Runnable))) } //export proxyjava__NewInputStream func proxyjava__NewInputStream() C.int32_t { res_0 := java.NewInputStream() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class ignore.S is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java ignore package ignore; import go.Seq; public final class S implements Seq.Proxy, I { static { Ignore.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public S() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); // skipped field S.F with unsupported type: interface{} // skipped method S.Argument with unsupported parameter or return types // skipped method S.Result with unsupported parameter or return types @Override public boolean equals(Object o) { if (o == null || !(o instanceof S)) { return false; } S that = (S)o; // skipped field S.F with unsupported type: interface{} return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("S").append("{"); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class ignore.I is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java ignore package ignore; import go.Seq; public interface I { // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types } // Code generated by gobind. DO NOT EDIT. // Java class ignore.Ignore is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java ignore package ignore; import go.Seq; public abstract class Ignore { static { Seq.touch(); // for loading the native library _init(); } private Ignore() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyI implements Seq.Proxy, I { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types } // skipped const Cuint with unsupported type: uint // skipped const Cuint32 with unsupported type: uint32 // skipped const Cuint64 with unsupported type: uint64 // skipped const NamedConst with unsupported type: ignore.NamedString // skipped variable C128 with unsupported type: complex128 // skipped variable C64 with unsupported type: complex64 // skipped variable Uint with unsupported type: uint // skipped variable Uint32 with unsupported type: uint32 // skipped variable Uint64 with unsupported type: uint64 // skipped variable V with unsupported type: interface{} // skipped variable Var with unsupported type: interface{} // skipped function Argument with unsupported parameter or return types // skipped function Result with unsupported parameter or return types }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.objc.h.golden
// Objective-C API for talking to issue12403 Go package. // gobind -lang=objc issue12403 // // File is generated by gobind. Do not edit. #ifndef __Issue12403_H__ #define __Issue12403_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @protocol Issue12403Parsable; @class Issue12403Parsable; @protocol Issue12403Parsable <NSObject> - (NSString* _Nonnull)fromJSON:(NSString* _Nullable)jstr; - (NSString* _Nonnull)toJSON:(NSError* _Nullable* _Nullable)error; @end @class Issue12403Parsable; @interface Issue12403Parsable : NSObject <goSeqRefInterface, Issue12403Parsable> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (NSString* _Nonnull)fromJSON:(NSString* _Nullable)jstr; - (NSString* _Nonnull)toJSON:(NSError* _Nullable* _Nullable)error; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package keywords type KeywordCaller interface { Abstract() Assert() Boolean() Break() Byte() Case() Catch() Char() Class() Const() Continue() Default() Do() Double() Else() Enum() Extends() Final() Finally() Float() For() Goto() If() Implements() Import() Instanceof() Int() Interface() Long() Native() New() Package() Private() Protected() Public() Return() Short() Static() Strictfp() Super() Switch() Synchronized() This() Throw() Throws() Transient() Try() Void() Volatile() While() False() Null() True() Bool() Nil() } func Const(id string) {} func Static(strictfp string) {}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class interfaces.Error is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public interface Error { public void err() throws Exception; } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.I is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public interface I { public int rand(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.I1 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; /** * not implementable */ public interface I1 { public void j(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.I2 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; /** * not implementable */ public interface I2 { public void g(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.I3 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; /** * implementable (the implementor has to find a source of I1s) */ public interface I3 { public I1 f(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.Interfaces_ is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; /** * Interfaces is an interface with the same name as its package. */ public interface Interfaces_ { public void someMethod(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.LargerI is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public interface LargerI extends I, SameI { public void anotherFunc(); public int rand(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.SameI is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public interface SameI { public int rand(); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.WithParam is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public interface WithParam { public void hasParam(boolean p0); } // Code generated by gobind. DO NOT EDIT. // Java class interfaces.Interfaces is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java interfaces package interfaces; import go.Seq; public abstract class Interfaces { static { Seq.touch(); // for loading the native library _init(); } private Interfaces() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyError implements Seq.Proxy, Error { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyError(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void err() throws Exception; } private static final class proxyI implements Seq.Proxy, I { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native int rand(); } private static final class proxyI1 implements Seq.Proxy, I1 { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI1(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void j(); } private static final class proxyI2 implements Seq.Proxy, I2 { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI2(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void g(); } private static final class proxyI3 implements Seq.Proxy, I3 { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI3(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native I1 f(); } private static final class proxyInterfaces implements Seq.Proxy, Interfaces_ { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyInterfaces(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void someMethod(); } private static final class proxyLargerI implements Seq.Proxy, LargerI { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyLargerI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void anotherFunc(); public native int rand(); } private static final class proxySameI implements Seq.Proxy, SameI { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxySameI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native int rand(); } private static final class proxyWithParam implements Seq.Proxy, WithParam { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyWithParam(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void hasParam(boolean p0); } public static native int add3(I r); public static native void callErr(Error e) throws Exception; public static native I seven(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // package doc tests that Go documentation is transferred // to the generated code. package doc // F is a function. func F() {} // C is a constant. const C = true // V is a var. var V string // A group of vars. var ( // A specific var. Specific string NoDocVar float64 ) // Before is a method. func (_ *S) Before() {} // S is a struct. type S struct { // SF is a field. SF string // blank (unexported) field. _ string // Anonymous field. *S2 // Multiple fields. F1, F2 string } // After is another method. func (_ *S) After() {} // A generic comment with <HTML>. type ( // S2 is a struct. S2 struct{} NoDoc struct{} ) // NewS is a constructor. func NewS() *S { return nil } // I is an interface. type I interface { // IM is a method. IM() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/basictypes.objc.go.h.golden
// Objective-C API for talking to basictypes Go package. // gobind -lang=objc basictypes // // File is generated by gobind. Do not edit. #ifndef __GO_basictypes_H__ #define __GO_basictypes_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package keywords. // // autogenerated by gobind -lang=go keywords package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "keywords.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "keywords" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxykeywords_KeywordCaller_Abstract func proxykeywords_KeywordCaller_Abstract(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Abstract() } //export proxykeywords_KeywordCaller_Assert func proxykeywords_KeywordCaller_Assert(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Assert() } //export proxykeywords_KeywordCaller_Bool func proxykeywords_KeywordCaller_Bool(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Bool() } //export proxykeywords_KeywordCaller_Boolean func proxykeywords_KeywordCaller_Boolean(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Boolean() } //export proxykeywords_KeywordCaller_Break func proxykeywords_KeywordCaller_Break(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Break() } //export proxykeywords_KeywordCaller_Byte func proxykeywords_KeywordCaller_Byte(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Byte() } //export proxykeywords_KeywordCaller_Case func proxykeywords_KeywordCaller_Case(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Case() } //export proxykeywords_KeywordCaller_Catch func proxykeywords_KeywordCaller_Catch(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Catch() } //export proxykeywords_KeywordCaller_Char func proxykeywords_KeywordCaller_Char(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Char() } //export proxykeywords_KeywordCaller_Class func proxykeywords_KeywordCaller_Class(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Class() } //export proxykeywords_KeywordCaller_Const func proxykeywords_KeywordCaller_Const(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Const() } //export proxykeywords_KeywordCaller_Continue func proxykeywords_KeywordCaller_Continue(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Continue() } //export proxykeywords_KeywordCaller_Default func proxykeywords_KeywordCaller_Default(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Default() } //export proxykeywords_KeywordCaller_Do func proxykeywords_KeywordCaller_Do(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Do() } //export proxykeywords_KeywordCaller_Double func proxykeywords_KeywordCaller_Double(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Double() } //export proxykeywords_KeywordCaller_Else func proxykeywords_KeywordCaller_Else(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Else() } //export proxykeywords_KeywordCaller_Enum func proxykeywords_KeywordCaller_Enum(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Enum() } //export proxykeywords_KeywordCaller_Extends func proxykeywords_KeywordCaller_Extends(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Extends() } //export proxykeywords_KeywordCaller_False func proxykeywords_KeywordCaller_False(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.False() } //export proxykeywords_KeywordCaller_Final func proxykeywords_KeywordCaller_Final(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Final() } //export proxykeywords_KeywordCaller_Finally func proxykeywords_KeywordCaller_Finally(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Finally() } //export proxykeywords_KeywordCaller_Float func proxykeywords_KeywordCaller_Float(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Float() } //export proxykeywords_KeywordCaller_For func proxykeywords_KeywordCaller_For(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.For() } //export proxykeywords_KeywordCaller_Goto func proxykeywords_KeywordCaller_Goto(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Goto() } //export proxykeywords_KeywordCaller_If func proxykeywords_KeywordCaller_If(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.If() } //export proxykeywords_KeywordCaller_Implements func proxykeywords_KeywordCaller_Implements(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Implements() } //export proxykeywords_KeywordCaller_Import func proxykeywords_KeywordCaller_Import(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Import() } //export proxykeywords_KeywordCaller_Instanceof func proxykeywords_KeywordCaller_Instanceof(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Instanceof() } //export proxykeywords_KeywordCaller_Int func proxykeywords_KeywordCaller_Int(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Int() } //export proxykeywords_KeywordCaller_Interface func proxykeywords_KeywordCaller_Interface(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Interface() } //export proxykeywords_KeywordCaller_Long func proxykeywords_KeywordCaller_Long(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Long() } //export proxykeywords_KeywordCaller_Native func proxykeywords_KeywordCaller_Native(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Native() } //export proxykeywords_KeywordCaller_New func proxykeywords_KeywordCaller_New(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.New() } //export proxykeywords_KeywordCaller_Nil func proxykeywords_KeywordCaller_Nil(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Nil() } //export proxykeywords_KeywordCaller_Null func proxykeywords_KeywordCaller_Null(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Null() } //export proxykeywords_KeywordCaller_Package func proxykeywords_KeywordCaller_Package(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Package() } //export proxykeywords_KeywordCaller_Private func proxykeywords_KeywordCaller_Private(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Private() } //export proxykeywords_KeywordCaller_Protected func proxykeywords_KeywordCaller_Protected(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Protected() } //export proxykeywords_KeywordCaller_Public func proxykeywords_KeywordCaller_Public(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Public() } //export proxykeywords_KeywordCaller_Return func proxykeywords_KeywordCaller_Return(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Return() } //export proxykeywords_KeywordCaller_Short func proxykeywords_KeywordCaller_Short(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Short() } //export proxykeywords_KeywordCaller_Static func proxykeywords_KeywordCaller_Static(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Static() } //export proxykeywords_KeywordCaller_Strictfp func proxykeywords_KeywordCaller_Strictfp(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Strictfp() } //export proxykeywords_KeywordCaller_Super func proxykeywords_KeywordCaller_Super(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Super() } //export proxykeywords_KeywordCaller_Switch func proxykeywords_KeywordCaller_Switch(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Switch() } //export proxykeywords_KeywordCaller_Synchronized func proxykeywords_KeywordCaller_Synchronized(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Synchronized() } //export proxykeywords_KeywordCaller_This func proxykeywords_KeywordCaller_This(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.This() } //export proxykeywords_KeywordCaller_Throw func proxykeywords_KeywordCaller_Throw(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Throw() } //export proxykeywords_KeywordCaller_Throws func proxykeywords_KeywordCaller_Throws(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Throws() } //export proxykeywords_KeywordCaller_Transient func proxykeywords_KeywordCaller_Transient(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Transient() } //export proxykeywords_KeywordCaller_True func proxykeywords_KeywordCaller_True(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.True() } //export proxykeywords_KeywordCaller_Try func proxykeywords_KeywordCaller_Try(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Try() } //export proxykeywords_KeywordCaller_Void func proxykeywords_KeywordCaller_Void(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Void() } //export proxykeywords_KeywordCaller_Volatile func proxykeywords_KeywordCaller_Volatile(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.Volatile() } //export proxykeywords_KeywordCaller_While func proxykeywords_KeywordCaller_While(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(keywords.KeywordCaller) v.While() } type proxykeywords_KeywordCaller _seq.Ref func (p *proxykeywords_KeywordCaller) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxykeywords_KeywordCaller) Abstract() { C.cproxykeywords_KeywordCaller_Abstract(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Assert() { C.cproxykeywords_KeywordCaller_Assert(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Bool() { C.cproxykeywords_KeywordCaller_Bool(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Boolean() { C.cproxykeywords_KeywordCaller_Boolean(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Break() { C.cproxykeywords_KeywordCaller_Break(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Byte() { C.cproxykeywords_KeywordCaller_Byte(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Case() { C.cproxykeywords_KeywordCaller_Case(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Catch() { C.cproxykeywords_KeywordCaller_Catch(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Char() { C.cproxykeywords_KeywordCaller_Char(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Class() { C.cproxykeywords_KeywordCaller_Class(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Const() { C.cproxykeywords_KeywordCaller_Const(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Continue() { C.cproxykeywords_KeywordCaller_Continue(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Default() { C.cproxykeywords_KeywordCaller_Default(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Do() { C.cproxykeywords_KeywordCaller_Do(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Double() { C.cproxykeywords_KeywordCaller_Double(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Else() { C.cproxykeywords_KeywordCaller_Else(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Enum() { C.cproxykeywords_KeywordCaller_Enum(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Extends() { C.cproxykeywords_KeywordCaller_Extends(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) False() { C.cproxykeywords_KeywordCaller_False(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Final() { C.cproxykeywords_KeywordCaller_Final(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Finally() { C.cproxykeywords_KeywordCaller_Finally(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Float() { C.cproxykeywords_KeywordCaller_Float(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) For() { C.cproxykeywords_KeywordCaller_For(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Goto() { C.cproxykeywords_KeywordCaller_Goto(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) If() { C.cproxykeywords_KeywordCaller_If(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Implements() { C.cproxykeywords_KeywordCaller_Implements(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Import() { C.cproxykeywords_KeywordCaller_Import(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Instanceof() { C.cproxykeywords_KeywordCaller_Instanceof(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Int() { C.cproxykeywords_KeywordCaller_Int(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Interface() { C.cproxykeywords_KeywordCaller_Interface(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Long() { C.cproxykeywords_KeywordCaller_Long(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Native() { C.cproxykeywords_KeywordCaller_Native(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) New() { C.cproxykeywords_KeywordCaller_New(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Nil() { C.cproxykeywords_KeywordCaller_Nil(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Null() { C.cproxykeywords_KeywordCaller_Null(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Package() { C.cproxykeywords_KeywordCaller_Package(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Private() { C.cproxykeywords_KeywordCaller_Private(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Protected() { C.cproxykeywords_KeywordCaller_Protected(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Public() { C.cproxykeywords_KeywordCaller_Public(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Return() { C.cproxykeywords_KeywordCaller_Return(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Short() { C.cproxykeywords_KeywordCaller_Short(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Static() { C.cproxykeywords_KeywordCaller_Static(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Strictfp() { C.cproxykeywords_KeywordCaller_Strictfp(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Super() { C.cproxykeywords_KeywordCaller_Super(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Switch() { C.cproxykeywords_KeywordCaller_Switch(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Synchronized() { C.cproxykeywords_KeywordCaller_Synchronized(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) This() { C.cproxykeywords_KeywordCaller_This(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Throw() { C.cproxykeywords_KeywordCaller_Throw(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Throws() { C.cproxykeywords_KeywordCaller_Throws(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Transient() { C.cproxykeywords_KeywordCaller_Transient(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) True() { C.cproxykeywords_KeywordCaller_True(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Try() { C.cproxykeywords_KeywordCaller_Try(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Void() { C.cproxykeywords_KeywordCaller_Void(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) Volatile() { C.cproxykeywords_KeywordCaller_Volatile(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxykeywords_KeywordCaller) While() { C.cproxykeywords_KeywordCaller_While(C.int32_t(p.Bind_proxy_refnum__())) } //export proxykeywords__Const func proxykeywords__Const(param_id C.nstring) { _param_id := decodeString(param_id) keywords.Const(_param_id) } //export proxykeywords__Static func proxykeywords__Static(param_strictfp C.nstring) { _param_strictfp := decodeString(param_strictfp) keywords.Static(_param_strictfp) }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.objc.h.golden
// Objective-C API for talking to Go package. // gobind -lang=objc // // File is generated by gobind. Do not edit. #ifndef __Universe_H__ #define __Universe_H__ @import Foundation; #include "ref.h" @protocol Universeerror; @class Universeerror; @protocol Universeerror <NSObject> - (NSString* _Nonnull)error; @end @class Universeerror; @interface Universeerror : NSError <goSeqRefInterface, Universeerror> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (NSString* _Nonnull)error; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.objc.h.golden
// Objective-C API for talking to structs Go package. // gobind -lang=objc structs // // File is generated by gobind. Do not edit. #ifndef __Structs_H__ #define __Structs_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class StructsS; @class StructsS2; @class StructsStructs; @protocol StructsI; @class StructsI; @protocol StructsI <NSObject> - (void)m; @end @interface StructsS : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; @property (nonatomic) double x; @property (nonatomic) double y; - (StructsS* _Nullable)identity:(NSError* _Nullable* _Nullable)error; - (double)sum; @end @interface StructsS2 : NSObject <goSeqRefInterface, StructsI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; - (void)m; - (NSString* _Nonnull)string; @end /** * Structs is a struct with the same name as its package. */ @interface StructsStructs : NSObject <goSeqRefInterface, StructsI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; - (void)m; @end FOUNDATION_EXPORT StructsS* _Nullable StructsIdentity(StructsS* _Nullable s); FOUNDATION_EXPORT StructsS* _Nullable StructsIdentityWithError(StructsS* _Nullable s, NSError* _Nullable* _Nullable error); @class StructsI; @interface StructsI : NSObject <goSeqRefInterface, StructsI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)m; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.objc.m.golden
// Objective-C API for talking to issue29559 Go package. // gobind -lang=objc issue29559 // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Issue29559.objc.h" void Issue29559TakesAString(NSString* _Nullable s) { nstring _s = go_seq_from_objc_string(s); proxyissue29559__TakesAString(_s); } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.objc.h.golden
// Objective-C API for talking to issue10788 Go package. // gobind -lang=objc issue10788 // // File is generated by gobind. Do not edit. #ifndef __Issue10788_H__ #define __Issue10788_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class Issue10788TestStruct; @protocol Issue10788TestInterface; @class Issue10788TestInterface; @protocol Issue10788TestInterface <NSObject> - (void)doSomeWork:(Issue10788TestStruct* _Nullable)s; - (void)multipleUnnamedParams:(long)p0 p1:(NSString* _Nullable)p1 日本:(int64_t)日本; @end @interface Issue10788TestStruct : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; @property (nonatomic) NSString* _Nonnull value; @end @class Issue10788TestInterface; @interface Issue10788TestInterface : NSObject <goSeqRefInterface, Issue10788TestInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)doSomeWork:(Issue10788TestStruct* _Nullable)s; - (void)multipleUnnamedParams:(long)p0 p1:(NSString* _Nullable)p1 日本:(int64_t)日本; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.objc.m.golden
// Objective-C API for talking to issue12328 Go package. // gobind -lang=objc issue12328 // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Issue12328.objc.h" @implementation Issue12328T { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_issue12328_T()); } return self; } - (NSError* _Nullable)err { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t r0 = proxyissue12328_T_Err_Get(refnum); Universeerror* _r0 = nil; GoSeqRef* _r0_ref = go_seq_from_refnum(r0); if (_r0_ref != NULL) { _r0 = _r0_ref.obj; if (_r0 == nil) { _r0 = [[Universeerror alloc] initWithRef:_r0_ref]; } } return _r0; } - (void)setErr:(NSError* _Nullable)v { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t _v; if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v); _v = go_seq_go_to_refnum(v_proxy._ref); } else { _v = go_seq_to_refnum(v); } proxyissue12328_T_Err_Set(refnum, _v); } @end __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java doc #ifndef __Doc_H__ #define __Doc_H__ #include <jni.h> extern jclass proxy_class_doc_I; extern jmethodID proxy_class_doc_I_cons; void cproxydoc_I_IM(int32_t refnum); extern jclass proxy_class_doc_NoDoc; extern jmethodID proxy_class_doc_NoDoc_cons; extern jclass proxy_class_doc_S; extern jmethodID proxy_class_doc_S_cons; extern jclass proxy_class_doc_S2; extern jmethodID proxy_class_doc_S2_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/objc.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package objc import ( "ObjC/Foundation" ) type ( S Foundation.NSString D Foundation.NSDate O Foundation.NSObjectC )
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.objc.m.golden
// Objective-C API for talking to vars Go package. // gobind -lang=objc vars // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Vars.objc.h" @implementation VarsS { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_vars_S()); } return self; } @end @implementation VarsI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } @end @implementation Vars + (void) setABool:(BOOL)v { char _v = (char)v; var_setvars_ABool(_v); } + (BOOL) aBool { char r0 = var_getvars_ABool(); BOOL _r0 = r0 ? YES : NO; return _r0; } + (void) setAFloat:(double)v { double _v = (double)v; var_setvars_AFloat(_v); } + (double) aFloat { double r0 = var_getvars_AFloat(); double _r0 = (double)r0; return _r0; } + (void) setAFloat32:(float)v { float _v = (float)v; var_setvars_AFloat32(_v); } + (float) aFloat32 { float r0 = var_getvars_AFloat32(); float _r0 = (float)r0; return _r0; } + (void) setAFloat64:(double)v { double _v = (double)v; var_setvars_AFloat64(_v); } + (double) aFloat64 { double r0 = var_getvars_AFloat64(); double _r0 = (double)r0; return _r0; } + (void) setAString:(NSString* _Nonnull)v { nstring _v = go_seq_from_objc_string(v); var_setvars_AString(_v); } + (NSString* _Nonnull) aString { nstring r0 = var_getvars_AString(); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } + (void) setAStructPtr:(VarsS* _Nullable)v { int32_t _v; if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v); _v = go_seq_go_to_refnum(v_proxy._ref); } else { _v = go_seq_to_refnum(v); } var_setvars_AStructPtr(_v); } + (VarsS* _Nullable) aStructPtr { int32_t r0 = var_getvars_AStructPtr(); VarsS* _r0 = nil; GoSeqRef* _r0_ref = go_seq_from_refnum(r0); if (_r0_ref != NULL) { _r0 = _r0_ref.obj; if (_r0 == nil) { _r0 = [[VarsS alloc] initWithRef:_r0_ref]; } } return _r0; } + (void) setAnInt:(long)v { nint _v = (nint)v; var_setvars_AnInt(_v); } + (long) anInt { nint r0 = var_getvars_AnInt(); long _r0 = (long)r0; return _r0; } + (void) setAnInt16:(int16_t)v { int16_t _v = (int16_t)v; var_setvars_AnInt16(_v); } + (int16_t) anInt16 { int16_t r0 = var_getvars_AnInt16(); int16_t _r0 = (int16_t)r0; return _r0; } + (void) setAnInt32:(int32_t)v { int32_t _v = (int32_t)v; var_setvars_AnInt32(_v); } + (int32_t) anInt32 { int32_t r0 = var_getvars_AnInt32(); int32_t _r0 = (int32_t)r0; return _r0; } + (void) setAnInt64:(int64_t)v { int64_t _v = (int64_t)v; var_setvars_AnInt64(_v); } + (int64_t) anInt64 { int64_t r0 = var_getvars_AnInt64(); int64_t _r0 = (int64_t)r0; return _r0; } + (void) setAnInt8:(int8_t)v { int8_t _v = (int8_t)v; var_setvars_AnInt8(_v); } + (int8_t) anInt8 { int8_t r0 = var_getvars_AnInt8(); int8_t _r0 = (int8_t)r0; return _r0; } + (void) setAnInterface:(id<VarsI> _Nullable)v { int32_t _v; if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v); _v = go_seq_go_to_refnum(v_proxy._ref); } else { _v = go_seq_to_refnum(v); } var_setvars_AnInterface(_v); } + (id<VarsI> _Nullable) anInterface { int32_t r0 = var_getvars_AnInterface(); VarsI* _r0 = nil; GoSeqRef* _r0_ref = go_seq_from_refnum(r0); if (_r0_ref != NULL) { _r0 = _r0_ref.obj; if (_r0 == nil) { _r0 = [[VarsI alloc] initWithRef:_r0_ref]; } } return _r0; } @end __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class go.error is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java package go; import go.Seq; public interface error { public String error(); } // Code generated by gobind. DO NOT EDIT. // Java class go.Universe is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java package go; import go.Seq; public abstract class Universe { static { Seq.touch(); // for loading the native library _init(); } private Universe() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyerror extends Exception implements Seq.Proxy, error { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyerror(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } @Override public String getMessage() { return error(); } public native String error(); } }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.objc.m.golden
// Objective-C API for talking to structs Go package. // gobind -lang=objc structs // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Structs.objc.h" @implementation StructsS { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_structs_S()); } return self; } - (double)x { int32_t refnum = go_seq_go_to_refnum(self._ref); double r0 = proxystructs_S_X_Get(refnum); double _r0 = (double)r0; return _r0; } - (void)setX:(double)v { int32_t refnum = go_seq_go_to_refnum(self._ref); double _v = (double)v; proxystructs_S_X_Set(refnum, _v); } - (double)y { int32_t refnum = go_seq_go_to_refnum(self._ref); double r0 = proxystructs_S_Y_Get(refnum); double _r0 = (double)r0; return _r0; } - (void)setY:(double)v { int32_t refnum = go_seq_go_to_refnum(self._ref); double _v = (double)v; proxystructs_S_Y_Set(refnum, _v); } - (StructsS* _Nullable)identity:(NSError* _Nullable* _Nullable)error { int32_t refnum = go_seq_go_to_refnum(self._ref); struct proxystructs_S_Identity_return res = proxystructs_S_Identity(refnum); StructsS* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(res.r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[StructsS alloc] initWithRef:_ret0__ref]; } } Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(res.r1); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } if (_error != nil) { return nil; } return _ret0_; } - (double)sum { int32_t refnum = go_seq_go_to_refnum(self._ref); double r0 = proxystructs_S_Sum(refnum); double _ret0_ = (double)r0; return _ret0_; } @end @implementation StructsS2 { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_structs_S2()); } return self; } - (void)m { int32_t refnum = go_seq_go_to_refnum(self._ref); proxystructs_S2_M(refnum); } - (NSString* _Nonnull)string { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxystructs_S2_String(refnum); NSString *_ret0_ = go_seq_to_objc_string(r0); return _ret0_; } @end @implementation StructsStructs { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_structs_Structs()); } return self; } - (void)m { int32_t refnum = go_seq_go_to_refnum(self._ref); proxystructs_Structs_M(refnum); } @end @implementation StructsI { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)m { int32_t refnum = go_seq_go_to_refnum(self._ref); proxystructs_I_M(refnum); } @end StructsS* _Nullable StructsIdentity(StructsS* _Nullable s) { int32_t _s; if ([s conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> s_proxy = (id<goSeqRefInterface>)(s); _s = go_seq_go_to_refnum(s_proxy._ref); } else { _s = go_seq_to_refnum(s); } int32_t r0 = proxystructs__Identity(_s); StructsS* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[StructsS alloc] initWithRef:_ret0__ref]; } } return _ret0_; } StructsS* _Nullable StructsIdentityWithError(StructsS* _Nullable s, NSError* _Nullable* _Nullable error) { int32_t _s; if ([s conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> s_proxy = (id<goSeqRefInterface>)(s); _s = go_seq_go_to_refnum(s_proxy._ref); } else { _s = go_seq_to_refnum(s); } struct proxystructs__IdentityWithError_return res = proxystructs__IdentityWithError(_s); StructsS* _ret0_ = nil; GoSeqRef* _ret0__ref = go_seq_from_refnum(res.r0); if (_ret0__ref != NULL) { _ret0_ = _ret0__ref.obj; if (_ret0_ == nil) { _ret0_ = [[StructsS alloc] initWithRef:_ret0__ref]; } } Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(res.r1); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } if (_error != nil) { return nil; } return _ret0_; } void cproxystructs_I_M(int32_t refnum) { @autoreleasepool { StructsI* o = go_seq_objc_from_refnum(refnum); [o m]; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue12403 #ifndef __Issue12403_H__ #define __Issue12403_H__ #include <jni.h> extern jclass proxy_class_issue12403_Parsable; extern jmethodID proxy_class_issue12403_Parsable_cons; nstring cproxyissue12403_Parsable_FromJSON(int32_t refnum, nstring jstr); typedef struct cproxyissue12403_Parsable_ToJSON_return { nstring r0; int32_t r1; } cproxyissue12403_Parsable_ToJSON_return; struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java doc #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "doc.h" jclass proxy_class_doc_I; jmethodID proxy_class_doc_I_cons; static jmethodID mid_I_IM; jclass proxy_class_doc_NoDoc; jmethodID proxy_class_doc_NoDoc_cons; jclass proxy_class_doc_S; jmethodID proxy_class_doc_S_cons; jclass proxy_class_doc_S2; jmethodID proxy_class_doc_S2_cons; JNIEXPORT void JNICALL Java_doc_Doc__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "doc/NoDoc"); proxy_class_doc_NoDoc = (*env)->NewGlobalRef(env, clazz); proxy_class_doc_NoDoc_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "doc/S"); proxy_class_doc_S = (*env)->NewGlobalRef(env, clazz); proxy_class_doc_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "doc/S2"); proxy_class_doc_S2 = (*env)->NewGlobalRef(env, clazz); proxy_class_doc_S2_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "doc/Doc$proxyI"); proxy_class_doc_I = (*env)->NewGlobalRef(env, clazz); proxy_class_doc_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "doc/I"); mid_I_IM = (*env)->GetMethodID(env, clazz, "im", "()V"); } JNIEXPORT void JNICALL Java_doc_Doc_f(JNIEnv* env, jclass _clazz) { proxydoc__F(); } JNIEXPORT jobject JNICALL Java_doc_Doc_newS(JNIEnv* env, jclass _clazz) { int32_t r0 = proxydoc__NewS(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_doc_S, proxy_class_doc_S_cons); return _r0; } JNIEXPORT jint JNICALL Java_doc_NoDoc__1_1New(JNIEnv *env, jclass clazz) { return new_doc_NoDoc(); } JNIEXPORT jint JNICALL Java_doc_S__1_1NewS(JNIEnv *env, jclass clazz) { int32_t refnum = proxydoc__NewS(); return refnum; } JNIEXPORT void JNICALL Java_doc_S_after(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxydoc_S_After(o); } JNIEXPORT void JNICALL Java_doc_S_before(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxydoc_S_Before(o); } JNIEXPORT void JNICALL Java_doc_S_setSF(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); proxydoc_S_SF_Set(o, _v); } JNIEXPORT jstring JNICALL Java_doc_S_getSF(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); nstring r0 = proxydoc_S_SF_Get(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT void JNICALL Java_doc_S_setS2(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxydoc_S_S2_Set(o, _v); } JNIEXPORT jobject JNICALL Java_doc_S_getS2(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxydoc_S_S2_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_doc_S2, proxy_class_doc_S2_cons); return _r0; } JNIEXPORT void JNICALL Java_doc_S_setF1(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); proxydoc_S_F1_Set(o, _v); } JNIEXPORT jstring JNICALL Java_doc_S_getF1(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); nstring r0 = proxydoc_S_F1_Get(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT void JNICALL Java_doc_S_setF2(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); proxydoc_S_F2_Set(o, _v); } JNIEXPORT jstring JNICALL Java_doc_S_getF2(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); nstring r0 = proxydoc_S_F2_Get(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT jint JNICALL Java_doc_S2__1_1New(JNIEnv *env, jclass clazz) { return new_doc_S2(); } JNIEXPORT void JNICALL Java_doc_Doc_00024proxyI_im(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxydoc_I_IM(o); } void cproxydoc_I_IM(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_doc_I, proxy_class_doc_I_cons); (*env)->CallVoidMethod(env, o, mid_I_IM); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_doc_Doc_setNoDocVar(JNIEnv *env, jclass clazz, jdouble v) { double _v = (double)v; var_setdoc_NoDocVar(_v); } JNIEXPORT jdouble JNICALL Java_doc_Doc_getNoDocVar(JNIEnv *env, jclass clazz) { double r0 = var_getdoc_NoDocVar(); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT void JNICALL Java_doc_Doc_setSpecific(JNIEnv *env, jclass clazz, jstring v) { nstring _v = go_seq_from_java_string(env, v); var_setdoc_Specific(_v); } JNIEXPORT jstring JNICALL Java_doc_Doc_getSpecific(JNIEnv *env, jclass clazz) { nstring r0 = var_getdoc_Specific(); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT void JNICALL Java_doc_Doc_setV(JNIEnv *env, jclass clazz, jstring v) { nstring _v = go_seq_from_java_string(env, v); var_setdoc_V(_v); } JNIEXPORT jstring JNICALL Java_doc_Doc_getV(JNIEnv *env, jclass clazz) { nstring r0 = var_getdoc_V(); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/basictypes.objc.h.golden
// Objective-C API for talking to basictypes Go package. // gobind -lang=objc basictypes // // File is generated by gobind. Do not edit. #ifndef __Basictypes_H__ #define __Basictypes_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" FOUNDATION_EXPORT const BOOL BasictypesABool; FOUNDATION_EXPORT const double BasictypesAFloat; FOUNDATION_EXPORT NSString* _Nonnull const BasictypesALongString; FOUNDATION_EXPORT const int32_t BasictypesARune; FOUNDATION_EXPORT NSString* _Nonnull const BasictypesAString; FOUNDATION_EXPORT const int64_t BasictypesAnInt; FOUNDATION_EXPORT const int64_t BasictypesAnInt2; FOUNDATION_EXPORT BOOL BasictypesBool(BOOL p0); FOUNDATION_EXPORT NSData* _Nullable BasictypesByteArrays(NSData* _Nullable x); FOUNDATION_EXPORT BOOL BasictypesError(NSError* _Nullable* _Nullable error); FOUNDATION_EXPORT BOOL BasictypesErrorPair(long* _Nullable ret0_, NSError* _Nullable* _Nullable error); FOUNDATION_EXPORT void BasictypesInts(int8_t x, int16_t y, int32_t z, int64_t t, long u); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.objc.m.golden
// Objective-C API for talking to issue10788 Go package. // gobind -lang=objc issue10788 // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Issue10788.objc.h" @implementation Issue10788TestStruct { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_issue10788_TestStruct()); } return self; } - (NSString* _Nonnull)value { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxyissue10788_TestStruct_Value_Get(refnum); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } - (void)setValue:(NSString* _Nonnull)v { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _v = go_seq_from_objc_string(v); proxyissue10788_TestStruct_Value_Set(refnum, _v); } @end @implementation Issue10788TestInterface { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (void)doSomeWork:(Issue10788TestStruct* _Nullable)s { int32_t refnum = go_seq_go_to_refnum(self._ref); int32_t _s; if ([s conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> s_proxy = (id<goSeqRefInterface>)(s); _s = go_seq_go_to_refnum(s_proxy._ref); } else { _s = go_seq_to_refnum(s); } proxyissue10788_TestInterface_DoSomeWork(refnum, _s); } - (void)multipleUnnamedParams:(long)p0 p1:(NSString* _Nullable)p1 日本:(int64_t)日本 { int32_t refnum = go_seq_go_to_refnum(self._ref); nint _p0 = (nint)p0; nstring _p1 = go_seq_from_objc_string(p1); int64_t _日本 = (int64_t)日本; proxyissue10788_TestInterface_MultipleUnnamedParams(refnum, _p0, _p1, _日本); } @end void cproxyissue10788_TestInterface_DoSomeWork(int32_t refnum, int32_t s) { @autoreleasepool { Issue10788TestInterface* o = go_seq_objc_from_refnum(refnum); Issue10788TestStruct* _s = nil; GoSeqRef* _s_ref = go_seq_from_refnum(s); if (_s_ref != NULL) { _s = _s_ref.obj; if (_s == nil) { _s = [[Issue10788TestStruct alloc] initWithRef:_s_ref]; } } [o doSomeWork:_s]; } } void cproxyissue10788_TestInterface_MultipleUnnamedParams(int32_t refnum, nint p0, nstring p1, int64_t 日本) { @autoreleasepool { Issue10788TestInterface* o = go_seq_objc_from_refnum(refnum); long _p0 = (long)p0; NSString *_p1 = go_seq_to_objc_string(p1); int64_t _日本 = (int64_t)日本; [o multipleUnnamedParams:_p0 p1:_p1 日本:_日本]; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/classes.java.c.golden
// Code generated by gobind. DO NOT EDIT. #include <jni.h> #include "seq.h" #include "classes.h" static jclass class_java_lang_Runnable; static jmethodID m_java_lang_Runnable_run; static jclass class_java_io_InputStream; static jmethodID m_java_io_InputStream_read__; static jmethodID m_java_io_InputStream_read___3B; static jmethodID m_java_io_InputStream_read___3BII; static jmethodID m_java_io_InputStream_toString; static jclass class_java_util_concurrent_Future; static jmethodID m_java_util_concurrent_Future_get__; static jmethodID m_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2; static jclass class_java_lang_Object; static jmethodID m_java_lang_Object_toString; static jclass class_java_util_concurrent_TimeUnit; static jmethodID m_java_util_concurrent_TimeUnit_toString; static jclass class_java_util_Spliterators; static jmethodID m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2; static jmethodID m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2; static jmethodID m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2; static jmethodID m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2; static jmethodID m_java_util_Spliterators_toString; ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2(jint a0) { JNIEnv *env = go_seq_push_local_frame(1); jobject _a0 = go_seq_from_refnum(env, a0, NULL, NULL); jobject res = (*env)->CallStaticObjectMethod(env, class_java_util_Spliterators, m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2(jint a0) { JNIEnv *env = go_seq_push_local_frame(1); jobject _a0 = go_seq_from_refnum(env, a0, NULL, NULL); jobject res = (*env)->CallStaticObjectMethod(env, class_java_util_Spliterators, m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2(jint a0) { JNIEnv *env = go_seq_push_local_frame(1); jobject _a0 = go_seq_from_refnum(env, a0, NULL, NULL); jobject res = (*env)->CallStaticObjectMethod(env, class_java_util_Spliterators, m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2(jint a0) { JNIEnv *env = go_seq_push_local_frame(1); jobject _a0 = go_seq_from_refnum(env, a0, NULL, NULL); jobject res = (*env)->CallStaticObjectMethod(env, class_java_util_Spliterators, m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } static jclass class_java_lang_System; static jmethodID m_s_java_lang_System_console; static jmethodID m_java_lang_System_toString; ret_jint cproxy_s_java_lang_System_console() { JNIEnv *env = go_seq_push_local_frame(0); jobject res = (*env)->CallStaticObjectMethod(env, class_java_lang_System, m_s_java_lang_System_console); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } static jclass class_java_Future; static jclass sclass_java_Future; static jmethodID m_java_Future_get__; static jmethodID sm_java_Future_get__; static jmethodID m_java_Future_get__JLjava_util_concurrent_TimeUnit_2; static jmethodID sm_java_Future_get__JLjava_util_concurrent_TimeUnit_2; static jclass class_java_InputStream; static jclass sclass_java_InputStream; static jmethodID m_java_InputStream_read__; static jmethodID sm_java_InputStream_read__; static jmethodID m_java_InputStream_read___3B; static jmethodID sm_java_InputStream_read___3B; static jmethodID m_java_InputStream_read___3BII; static jmethodID sm_java_InputStream_read___3BII; static jmethodID m_java_InputStream_toString; static jmethodID sm_java_InputStream_toString; static jclass class_java_Object; static jclass sclass_java_Object; static jmethodID m_java_Object_toString; static jmethodID sm_java_Object_toString; static jclass class_java_Runnable; static jclass sclass_java_Runnable; static jmethodID m_java_Runnable_run; static jmethodID sm_java_Runnable_run; static jclass class_java_util_Iterator; static jclass class_java_util_Spliterator; static jclass class_java_util_PrimitiveIterator_OfInt; static jclass class_java_util_Spliterator_OfInt; static jclass class_java_util_PrimitiveIterator_OfLong; static jclass class_java_util_Spliterator_OfLong; static jclass class_java_util_PrimitiveIterator_OfDouble; static jclass class_java_util_Spliterator_OfDouble; static jclass class_java_io_Console; static jmethodID m_java_io_Console_flush; static jmethodID m_java_io_Console_toString; void init_proxies() { JNIEnv *env = go_seq_push_local_frame(20); jclass clazz; clazz = go_seq_find_class("java/lang/Runnable"); if (clazz != NULL) { class_java_lang_Runnable = (*env)->NewGlobalRef(env, clazz); m_java_lang_Runnable_run = go_seq_get_method_id(clazz, "run", "()V"); } clazz = go_seq_find_class("java/io/InputStream"); if (clazz != NULL) { class_java_io_InputStream = (*env)->NewGlobalRef(env, clazz); m_java_io_InputStream_read__ = go_seq_get_method_id(clazz, "read", "()I"); m_java_io_InputStream_read___3B = go_seq_get_method_id(clazz, "read", "([B)I"); m_java_io_InputStream_read___3BII = go_seq_get_method_id(clazz, "read", "([BII)I"); m_java_io_InputStream_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/util/concurrent/Future"); if (clazz != NULL) { class_java_util_concurrent_Future = (*env)->NewGlobalRef(env, clazz); m_java_util_concurrent_Future_get__ = go_seq_get_method_id(clazz, "get", "()Ljava/lang/Object;"); m_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2 = go_seq_get_method_id(clazz, "get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;"); } 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/util/concurrent/TimeUnit"); if (clazz != NULL) { class_java_util_concurrent_TimeUnit = (*env)->NewGlobalRef(env, clazz); m_java_util_concurrent_TimeUnit_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/util/Spliterators"); if (clazz != NULL) { class_java_util_Spliterators = (*env)->NewGlobalRef(env, clazz); m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2 = go_seq_get_static_method_id(clazz, "iterator", "(Ljava/util/Spliterator;)Ljava/util/Iterator;"); m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2 = go_seq_get_static_method_id(clazz, "iterator", "(Ljava/util/Spliterator$OfInt;)Ljava/util/PrimitiveIterator$OfInt;"); m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2 = go_seq_get_static_method_id(clazz, "iterator", "(Ljava/util/Spliterator$OfLong;)Ljava/util/PrimitiveIterator$OfLong;"); m_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2 = go_seq_get_static_method_id(clazz, "iterator", "(Ljava/util/Spliterator$OfDouble;)Ljava/util/PrimitiveIterator$OfDouble;"); m_java_util_Spliterators_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/lang/System"); if (clazz != NULL) { class_java_lang_System = (*env)->NewGlobalRef(env, clazz); m_s_java_lang_System_console = go_seq_get_static_method_id(clazz, "console", "()Ljava/io/Console;"); m_java_lang_System_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/Future"); if (clazz != NULL) { class_java_Future = (*env)->NewGlobalRef(env, clazz); sclass_java_Future = (*env)->GetSuperclass(env, clazz); sclass_java_Future = (*env)->NewGlobalRef(env, sclass_java_Future); m_java_Future_get__ = go_seq_get_method_id(clazz, "get", "()Ljava/lang/Object;"); sm_java_Future_get__ = go_seq_get_method_id(sclass_java_Future, "get", "()Ljava/lang/Object;"); m_java_Future_get__JLjava_util_concurrent_TimeUnit_2 = go_seq_get_method_id(clazz, "get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;"); sm_java_Future_get__JLjava_util_concurrent_TimeUnit_2 = go_seq_get_method_id(sclass_java_Future, "get", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;"); } clazz = go_seq_find_class("java/InputStream"); if (clazz != NULL) { class_java_InputStream = (*env)->NewGlobalRef(env, clazz); sclass_java_InputStream = (*env)->GetSuperclass(env, clazz); sclass_java_InputStream = (*env)->NewGlobalRef(env, sclass_java_InputStream); m_java_InputStream_read__ = go_seq_get_method_id(clazz, "read", "()I"); sm_java_InputStream_read__ = go_seq_get_method_id(sclass_java_InputStream, "read", "()I"); m_java_InputStream_read___3B = go_seq_get_method_id(clazz, "read", "([B)I"); sm_java_InputStream_read___3B = go_seq_get_method_id(sclass_java_InputStream, "read", "([B)I"); m_java_InputStream_read___3BII = go_seq_get_method_id(clazz, "read", "([BII)I"); sm_java_InputStream_read___3BII = go_seq_get_method_id(sclass_java_InputStream, "read", "([BII)I"); m_java_InputStream_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); sm_java_InputStream_toString = go_seq_get_method_id(sclass_java_InputStream, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/Object"); if (clazz != NULL) { class_java_Object = (*env)->NewGlobalRef(env, clazz); sclass_java_Object = (*env)->GetSuperclass(env, clazz); sclass_java_Object = (*env)->NewGlobalRef(env, sclass_java_Object); m_java_Object_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); sm_java_Object_toString = go_seq_get_method_id(sclass_java_Object, "toString", "()Ljava/lang/String;"); } clazz = go_seq_find_class("java/Runnable"); if (clazz != NULL) { class_java_Runnable = (*env)->NewGlobalRef(env, clazz); sclass_java_Runnable = (*env)->GetSuperclass(env, clazz); sclass_java_Runnable = (*env)->NewGlobalRef(env, sclass_java_Runnable); m_java_Runnable_run = go_seq_get_method_id(clazz, "run", "()V"); sm_java_Runnable_run = go_seq_get_method_id(sclass_java_Runnable, "run", "()V"); } clazz = go_seq_find_class("java/util/Iterator"); if (clazz != NULL) { class_java_util_Iterator = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/Spliterator"); if (clazz != NULL) { class_java_util_Spliterator = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/PrimitiveIterator$OfInt"); if (clazz != NULL) { class_java_util_PrimitiveIterator_OfInt = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/Spliterator$OfInt"); if (clazz != NULL) { class_java_util_Spliterator_OfInt = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/PrimitiveIterator$OfLong"); if (clazz != NULL) { class_java_util_PrimitiveIterator_OfLong = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/Spliterator$OfLong"); if (clazz != NULL) { class_java_util_Spliterator_OfLong = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/PrimitiveIterator$OfDouble"); if (clazz != NULL) { class_java_util_PrimitiveIterator_OfDouble = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/util/Spliterator$OfDouble"); if (clazz != NULL) { class_java_util_Spliterator_OfDouble = (*env)->NewGlobalRef(env, clazz); } clazz = go_seq_find_class("java/io/Console"); if (clazz != NULL) { class_java_io_Console = (*env)->NewGlobalRef(env, clazz); m_java_io_Console_flush = go_seq_get_method_id(clazz, "flush", "()V"); m_java_io_Console_toString = go_seq_get_method_id(clazz, "toString", "()Ljava/lang/String;"); } go_seq_pop_local_frame(env); } jint cproxy_java_lang_Runnable_run(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); (*env)->CallVoidMethod(env, _this, m_java_lang_Runnable_run); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); go_seq_pop_local_frame(env); return _exc_ref; } ret_jint cproxy_java_io_InputStream_read__(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); jint res = (*env)->CallIntMethod(env, _this, m_java_io_InputStream_read__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_io_InputStream_read___3B(jint this, nbyteslice a0) { JNIEnv *env = go_seq_push_local_frame(2); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint res = (*env)->CallIntMethod(env, _this, m_java_io_InputStream_read___3B, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_io_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2) { JNIEnv *env = go_seq_push_local_frame(4); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint _a1 = a1; jint _a2 = a2; jint res = (*env)->CallIntMethod(env, _this, m_java_io_InputStream_read___3BII, _a0, _a1, _a2); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_nstring cproxy_java_io_InputStream_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_io_InputStream_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_jint cproxy_java_util_concurrent_Future_get__(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); jobject res = (*env)->CallObjectMethod(env, _this, m_java_util_concurrent_Future_get__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1) { JNIEnv *env = go_seq_push_local_frame(3); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jlong _a0 = a0; jobject _a1 = go_seq_from_refnum(env, a1, NULL, NULL); jobject res = (*env)->CallObjectMethod(env, _this, m_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2, _a0, _a1); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } 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_util_concurrent_TimeUnit_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_util_concurrent_TimeUnit_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_util_Spliterators_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_util_Spliterators_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_System_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_System_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_jint cproxy_java_Future_get__(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); jobject res = (*env)->CallObjectMethod(env, _this, m_java_Future_get__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint csuper_java_Future_get__(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); jobject res = (*env)->CallNonvirtualObjectMethod(env, _this, sclass_java_Future, sm_java_Future_get__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1) { JNIEnv *env = go_seq_push_local_frame(3); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jlong _a0 = a0; jobject _a1 = go_seq_from_refnum(env, a1, NULL, NULL); jobject res = (*env)->CallObjectMethod(env, _this, m_java_Future_get__JLjava_util_concurrent_TimeUnit_2, _a0, _a1); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint csuper_java_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1) { JNIEnv *env = go_seq_push_local_frame(3); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jlong _a0 = a0; jobject _a1 = go_seq_from_refnum(env, a1, NULL, NULL); jobject res = (*env)->CallNonvirtualObjectMethod(env, _this, sclass_java_Future, sm_java_Future_get__JLjava_util_concurrent_TimeUnit_2, _a0, _a1); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = NULL; } jint _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_InputStream_read__(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); jint res = (*env)->CallIntMethod(env, _this, m_java_InputStream_read__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint csuper_java_InputStream_read__(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); jint res = (*env)->CallNonvirtualIntMethod(env, _this, sclass_java_InputStream, sm_java_InputStream_read__); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_InputStream_read___3B(jint this, nbyteslice a0) { JNIEnv *env = go_seq_push_local_frame(2); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint res = (*env)->CallIntMethod(env, _this, m_java_InputStream_read___3B, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint csuper_java_InputStream_read___3B(jint this, nbyteslice a0) { JNIEnv *env = go_seq_push_local_frame(2); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint res = (*env)->CallNonvirtualIntMethod(env, _this, sclass_java_InputStream, sm_java_InputStream_read___3B, _a0); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint cproxy_java_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2) { JNIEnv *env = go_seq_push_local_frame(4); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint _a1 = a1; jint _a2 = a2; jint res = (*env)->CallIntMethod(env, _this, m_java_InputStream_read___3BII, _a0, _a1, _a2); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_jint csuper_java_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2) { JNIEnv *env = go_seq_push_local_frame(4); // Must be a Java object jobject _this = go_seq_from_refnum(env, this, NULL, NULL); jbyteArray _a0 = go_seq_to_java_bytearray(env, a0, 0); jint _a1 = a1; jint _a2 = a2; jint res = (*env)->CallNonvirtualIntMethod(env, _this, sclass_java_InputStream, sm_java_InputStream_read___3BII, _a0, _a1, _a2); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); if (_exc != NULL) { res = 0; } jint _res = res; go_seq_pop_local_frame(env); ret_jint __res = {_res, _exc_ref}; return __res; } ret_nstring cproxy_java_InputStream_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_InputStream_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 csuper_java_InputStream_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)->CallNonvirtualObjectMethod(env, _this, sclass_java_InputStream, sm_java_InputStream_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_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_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 csuper_java_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)->CallNonvirtualObjectMethod(env, _this, sclass_java_Object, sm_java_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; } jint cproxy_java_Runnable_run(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); (*env)->CallVoidMethod(env, _this, m_java_Runnable_run); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); go_seq_pop_local_frame(env); return _exc_ref; } jint csuper_java_Runnable_run(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); (*env)->CallNonvirtualVoidMethod(env, _this, sclass_java_Runnable, sm_java_Runnable_run); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); go_seq_pop_local_frame(env); return _exc_ref; } jint cproxy_java_io_Console_flush(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); (*env)->CallVoidMethod(env, _this, m_java_io_Console_flush); jobject _exc = go_seq_get_exception(env); int32_t _exc_ref = go_seq_to_refnum(env, _exc); go_seq_pop_local_frame(env); return _exc_ref; } ret_nstring cproxy_java_io_Console_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_io_Console_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; } // Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java classes #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "java.h" jclass proxy_class_java_Future; jmethodID proxy_class_java_Future_cons; jclass proxy_class_java_InputStream; jmethodID proxy_class_java_InputStream_cons; jclass proxy_class_java_Object; jmethodID proxy_class_java_Object_cons; jclass proxy_class_java_Runnable; jmethodID proxy_class_java_Runnable_cons; JNIEXPORT void JNICALL Java_java_Java__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "java/Future"); proxy_class_java_Future = (*env)->NewGlobalRef(env, clazz); proxy_class_java_Future_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/Object"); proxy_class_java_Object = (*env)->NewGlobalRef(env, clazz); proxy_class_java_Object_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/Runnable"); proxy_class_java_Runnable = (*env)->NewGlobalRef(env, clazz); proxy_class_java_Runnable_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); } JNIEXPORT jobject JNICALL Java_java_Java_newInputStream(JNIEnv* env, jclass _clazz) { int32_t r0 = proxyjava__NewInputStream(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_java_InputStream, proxy_class_java_InputStream_cons); return _r0; } JNIEXPORT jint JNICALL Java_java_Future__1_1New(JNIEnv *env, jclass clazz) { return new_java_Future(); } JNIEXPORT jobject JNICALL Java_java_Future_get__(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); struct proxyjava_Future_Get_return res = proxyjava_Future_Get(o); jobject _r0 = go_seq_from_refnum(env, res.r0, NULL, NULL); jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT jobject JNICALL Java_java_Future_get__JLjava_util_concurrent_TimeUnit_2(JNIEnv* env, jobject __this__, jlong p0, jobject p1) { int32_t o = go_seq_to_refnum_go(env, __this__); int64_t _p0 = (int64_t)p0; int32_t _p1 = go_seq_to_refnum(env, p1); struct proxyjava_Future_Get__return res = proxyjava_Future_Get_(o, _p0, _p1); jobject _r0 = go_seq_from_refnum(env, res.r0, NULL, NULL); jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT void JNICALL Java_java_Future_setFuture(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxyjava_Future_Future_Set(o, _v); } JNIEXPORT jobject JNICALL Java_java_Future_getFuture(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxyjava_Future_Future_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, NULL, NULL); return _r0; } JNIEXPORT jint JNICALL Java_java_InputStream__1_1NewInputStream(JNIEnv *env, jclass clazz) { int32_t refnum = proxyjava__NewInputStream(); return refnum; } JNIEXPORT jint JNICALL Java_java_InputStream_read__(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); struct proxyjava_InputStream_Read_return res = proxyjava_InputStream_Read(o); jint _r0 = (jint)res.r0; jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT void JNICALL Java_java_InputStream_setInputStream(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxyjava_InputStream_InputStream_Set(o, _v); } JNIEXPORT jobject JNICALL Java_java_InputStream_getInputStream(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxyjava_InputStream_InputStream_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, NULL, NULL); return _r0; } JNIEXPORT jint JNICALL Java_java_Object__1_1New(JNIEnv *env, jclass clazz) { return new_java_Object(); } JNIEXPORT void JNICALL Java_java_Object_setObject(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxyjava_Object_Object_Set(o, _v); } JNIEXPORT jobject JNICALL Java_java_Object_getObject(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxyjava_Object_Object_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, NULL, NULL); return _r0; } JNIEXPORT jint JNICALL Java_java_Runnable__1_1New(JNIEnv *env, jclass clazz) { return new_java_Runnable(); } JNIEXPORT void JNICALL Java_java_Runnable_run(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t _this_ = go_seq_to_refnum(env, __this__); proxyjava_Runnable_Run(o, _this_); } JNIEXPORT void JNICALL Java_java_Runnable_setRunnable(JNIEnv *env, jobject this, jobject v) { int32_t o = go_seq_to_refnum_go(env, this); int32_t _v = go_seq_to_refnum(env, v); proxyjava_Runnable_Runnable_Set(o, _v); } JNIEXPORT jobject JNICALL Java_java_Runnable_getRunnable(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); int32_t r0 = proxyjava_Runnable_Runnable_Get(o); jobject _r0 = go_seq_from_refnum(env, r0, NULL, NULL); return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/objcw.go.golden
// Code generated by gobind. DO NOT EDIT. package ObjC // Used to silence this package not used errors const Dummy = 0 type Foundation_NSDate interface { Hash() uint Description() string } type Foundation_NSObjectC interface { Hash() uint Description() string } type Foundation_NSObjectP interface { Hash() uint Description() string } type Foundation_NSSet interface { Hash() uint Description() string } type Foundation_NSMutableString interface { Hash() uint Description() string DataUsingEncoding(encoding uint) []byte } type UIKit_UIResponder interface { Hash() uint Description() string } type UIKit_UIPressesEvent interface { Hash() uint Description() string } type NetworkExtension_NEPacket interface { Hash() uint Description() string } type Objc_GoNSDate interface { Hash() uint Description() string Super() Objc_GoNSDate } type Objc_GoNSObject interface { Hash() uint Description() string Super() Objc_GoNSObject } type Objc_GoUIResponder interface { Hash() uint Description() string Super() Objc_GoUIResponder } // Code generated by gobind. DO NOT EDIT. package main // #include "interfaces.h" import "C" import "ObjC" import _seq "golang.org/x/mobile/bind/seq" import "ObjC/Foundation/NSMutableString" import "ObjC/NetworkExtension/NEPacket" type proxy interface{ Bind_proxy_refnum__() int32 } // Suppress unused package error var _ = _seq.FromRefNum const _ = ObjC.Dummy func init() { } type proxy_class_NSDate _seq.Ref func (p *proxy_class_NSDate) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NSDate) Hash() uint { res := C.cproxy_NSDate_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NSDate) Description() string { res := C.cproxy_NSDate_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_NSObjectC _seq.Ref func (p *proxy_class_NSObjectC) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NSObjectC) Hash() uint { res := C.cproxy_NSObjectC_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NSObjectC) Description() string { res := C.cproxy_NSObjectC_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_NSObjectP _seq.Ref func (p *proxy_class_NSObjectP) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NSObjectP) Hash() uint { res := C.cproxy_NSObjectP_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NSObjectP) Description() string { res := C.cproxy_NSObjectP_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_NSSet _seq.Ref func (p *proxy_class_NSSet) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NSSet) Hash() uint { res := C.cproxy_NSSet_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NSSet) Description() string { res := C.cproxy_NSSet_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { NSMutableString.NewWithData = func(data []byte, encoding uint) ObjC.Foundation_NSMutableString { _data := fromSlice(data, false) _encoding := C.ulong(encoding) res := C.cproxy_s_NSMutableString_NewWithData(_data, _encoding) var _res ObjC.Foundation_NSMutableString _res_ref := _seq.FromRefNum(int32(res)) if _res_ref != nil { if res < 0 { // go object _res = _res_ref.Get().(ObjC.Foundation_NSMutableString) } else { // foreign object _res = (*proxy_class_NSMutableString)(_res_ref) } } return _res } } type proxy_class_NSMutableString _seq.Ref func (p *proxy_class_NSMutableString) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NSMutableString) Hash() uint { res := C.cproxy_NSMutableString_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NSMutableString) Description() string { res := C.cproxy_NSMutableString_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func (p *proxy_class_NSMutableString) DataUsingEncoding(encoding uint) []byte { _encoding := C.ulong(encoding) res := C.cproxy_NSMutableString_DataUsingEncoding(C.int(p.Bind_proxy_refnum__()), _encoding) _res := toSlice(res, true) return _res } func init() { } type proxy_class_UIResponder _seq.Ref func (p *proxy_class_UIResponder) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_UIResponder) Hash() uint { res := C.cproxy_UIResponder_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_UIResponder) Description() string { res := C.cproxy_UIResponder_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_UIPressesEvent _seq.Ref func (p *proxy_class_UIPressesEvent) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_UIPressesEvent) Hash() uint { res := C.cproxy_UIPressesEvent_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_UIPressesEvent) Description() string { res := C.cproxy_UIPressesEvent_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { NEPacket.NewWithData = func(data []byte, protocolFamily uint8) ObjC.NetworkExtension_NEPacket { _data := fromSlice(data, false) _protocolFamily := C.uchar(protocolFamily) res := C.cproxy_s_NEPacket_NewWithData(_data, _protocolFamily) var _res ObjC.NetworkExtension_NEPacket _res_ref := _seq.FromRefNum(int32(res)) if _res_ref != nil { if res < 0 { // go object _res = _res_ref.Get().(ObjC.NetworkExtension_NEPacket) } else { // foreign object _res = (*proxy_class_NEPacket)(_res_ref) } } return _res } } type proxy_class_NEPacket _seq.Ref func (p *proxy_class_NEPacket) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_NEPacket) Hash() uint { res := C.cproxy_NEPacket_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_NEPacket) Description() string { res := C.cproxy_NEPacket_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_GoNSDate _seq.Ref func (p *proxy_class_GoNSDate) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_GoNSDate) Hash() uint { res := C.cproxy_GoNSDate_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_GoNSDate) Description() string { res := C.cproxy_GoNSDate_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func (p *proxy_class_GoNSDate) Super() ObjC.Objc_GoNSDate { return &super_GoNSDate{p} } type super_GoNSDate struct{ *proxy_class_GoNSDate } func (p *super_GoNSDate) Hash() uint { res := C.csuper_GoNSDate_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *super_GoNSDate) Description() string { res := C.csuper_GoNSDate_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_GoNSObject _seq.Ref func (p *proxy_class_GoNSObject) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_GoNSObject) Hash() uint { res := C.cproxy_GoNSObject_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_GoNSObject) Description() string { res := C.cproxy_GoNSObject_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func (p *proxy_class_GoNSObject) Super() ObjC.Objc_GoNSObject { return &super_GoNSObject{p} } type super_GoNSObject struct{ *proxy_class_GoNSObject } func (p *super_GoNSObject) Hash() uint { res := C.csuper_GoNSObject_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *super_GoNSObject) Description() string { res := C.csuper_GoNSObject_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func init() { } type proxy_class_GoUIResponder _seq.Ref func (p *proxy_class_GoUIResponder) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_GoUIResponder) Hash() uint { res := C.cproxy_GoUIResponder_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *proxy_class_GoUIResponder) Description() string { res := C.cproxy_GoUIResponder_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } func (p *proxy_class_GoUIResponder) Super() ObjC.Objc_GoUIResponder { return &super_GoUIResponder{p} } type super_GoUIResponder struct{ *proxy_class_GoUIResponder } func (p *super_GoUIResponder) Hash() uint { res := C.csuper_GoUIResponder_Hash(C.int(p.Bind_proxy_refnum__())) _res := uint(res) return _res } func (p *super_GoUIResponder) Description() string { res := C.csuper_GoUIResponder_Description(C.int(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } // Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package objc. // // autogenerated by gobind -lang=go objcw package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "objc.h" */ import "C" import ( "ObjC/Foundation" "ObjC/UIKit" _seq "golang.org/x/mobile/bind/seq" "objcw" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyobjc_GoNSDate_NSDate_Set func proxyobjc_GoNSDate_NSDate_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v Foundation.NSDate _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(Foundation.NSDate) } else { // foreign object _v = (*proxy_class_NSDate)(_v_ref) } } ref.Get().(*objc.GoNSDate).NSDate = _v } //export proxyobjc_GoNSDate_NSDate_Get func proxyobjc_GoNSDate_NSDate_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoNSDate).NSDate var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyobjc_GoNSDate_Hash func proxyobjc_GoNSDate_Hash(refnum C.int32_t, param_this C.int32_t) C.nint { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoNSDate) var _param_this Foundation.NSDate _param_this_ref := _seq.FromRefNum(int32(param_this)) if _param_this_ref != nil { if param_this < 0 { // go object _param_this = _param_this_ref.Get().(Foundation.NSDate) } else { // foreign object _param_this = (*proxy_class_NSDate)(_param_this_ref) } } res_0 := v.Hash(_param_this) _res_0 := C.nint(res_0) return _res_0 } //export new_objc_GoNSDate func new_objc_GoNSDate() C.int32_t { return C.int32_t(_seq.ToRefNum(new(objc.GoNSDate))) } //export proxyobjc_GoNSObject_C_Set func proxyobjc_GoNSObject_C_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v Foundation.NSObjectC _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(Foundation.NSObjectC) } else { // foreign object _v = (*proxy_class_NSObjectC)(_v_ref) } } ref.Get().(*objc.GoNSObject).C = _v } //export proxyobjc_GoNSObject_C_Get func proxyobjc_GoNSObject_C_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoNSObject).C var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyobjc_GoNSObject_P_Set func proxyobjc_GoNSObject_P_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v Foundation.NSObjectP _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(Foundation.NSObjectP) } else { // foreign object _v = (*proxy_class_NSObjectP)(_v_ref) } } ref.Get().(*objc.GoNSObject).P = _v } //export proxyobjc_GoNSObject_P_Get func proxyobjc_GoNSObject_P_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoNSObject).P var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyobjc_GoNSObject_Description func proxyobjc_GoNSObject_Description(refnum C.int32_t, param_this C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoNSObject) var _param_this Foundation.NSObjectC _param_this_ref := _seq.FromRefNum(int32(param_this)) if _param_this_ref != nil { if param_this < 0 { // go object _param_this = _param_this_ref.Get().(Foundation.NSObjectC) } else { // foreign object _param_this = (*proxy_class_NSObjectC)(_param_this_ref) } } res_0 := v.Description(_param_this) _res_0 := encodeString(res_0) return _res_0 } //export new_objc_GoNSObject func new_objc_GoNSObject() C.int32_t { return C.int32_t(_seq.ToRefNum(new(objc.GoNSObject))) } //export proxyobjc_GoUIResponder_UIResponder_Set func proxyobjc_GoUIResponder_UIResponder_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v UIKit.UIResponder _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(UIKit.UIResponder) } else { // foreign object _v = (*proxy_class_UIResponder)(_v_ref) } } ref.Get().(*objc.GoUIResponder).UIResponder = _v } //export proxyobjc_GoUIResponder_UIResponder_Get func proxyobjc_GoUIResponder_UIResponder_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoUIResponder).UIResponder var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxyobjc_GoUIResponder_PressesBegan func proxyobjc_GoUIResponder_PressesBegan(refnum C.int32_t, param_p0 C.int32_t, param_p1 C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*objc.GoUIResponder) var _param_p0 Foundation.NSSet _param_p0_ref := _seq.FromRefNum(int32(param_p0)) if _param_p0_ref != nil { if param_p0 < 0 { // go object _param_p0 = _param_p0_ref.Get().(Foundation.NSSet) } else { // foreign object _param_p0 = (*proxy_class_NSSet)(_param_p0_ref) } } var _param_p1 UIKit.UIPressesEvent _param_p1_ref := _seq.FromRefNum(int32(param_p1)) if _param_p1_ref != nil { if param_p1 < 0 { // go object _param_p1 = _param_p1_ref.Get().(UIKit.UIPressesEvent) } else { // foreign object _param_p1 = (*proxy_class_UIPressesEvent)(_param_p1_ref) } } v.PressesBegan(_param_p0, _param_p1) } //export new_objc_GoUIResponder func new_objc_GoUIResponder() C.int32_t { return C.int32_t(_seq.ToRefNum(new(objc.GoUIResponder))) } //export proxyobjc__CallUcharFunction func proxyobjc__CallUcharFunction() { objc.CallUcharFunction() } //export proxyobjc__CreateReadNSMutableString func proxyobjc__CreateReadNSMutableString() { objc.CreateReadNSMutableString() } //export proxyobjc__DupNSDate func proxyobjc__DupNSDate(param_date C.int32_t) C.int32_t { var _param_date Foundation.NSDate _param_date_ref := _seq.FromRefNum(int32(param_date)) if _param_date_ref != nil { if param_date < 0 { // go object _param_date = _param_date_ref.Get().(Foundation.NSDate) } else { // foreign object _param_date = (*proxy_class_NSDate)(_param_date_ref) } } res_0 := objc.DupNSDate(_param_date) var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class issue29559.Issue29559 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue29559 package issue29559; import go.Seq; public abstract class Issue29559 { static { Seq.touch(); // for loading the native library _init(); } private Issue29559() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); public static native void takesAString(String s); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.objc.m.golden
// Objective-C API for talking to underscores Go package. // gobind -lang=objc underscores // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Underscore_pkg.objc.h" @implementation Underscore_pkgUnderscore_struct { } - (nonnull instancetype)initWithRef:(_Nonnull id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (nonnull instancetype)init { self = [super init]; if (self) { __ref = go_seq_from_refnum(new_underscore_pkg_Underscore_struct()); } return self; } - (NSString* _Nonnull)underscore_field { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(refnum); NSString *_r0 = go_seq_to_objc_string(r0); return _r0; } - (void)setUnderscore_field:(NSString* _Nonnull)v { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _v = go_seq_from_objc_string(v); proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(refnum, _v); } @end @implementation Underscore_pkg + (void) setUnderscore_var:(long)v { nint _v = (nint)v; var_setunderscore_pkg_Underscore_var(_v); } + (long) underscore_var { nint r0 = var_getunderscore_pkg_Underscore_var(); long _r0 = (long)r0; return _r0; } @end void Underscore_pkgUnderscore_func(void) { proxyunderscore_pkg__Underscore_func(); } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package doc. // // autogenerated by gobind -lang=go doc package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "doc.h" */ import "C" import ( "doc" _seq "golang.org/x/mobile/bind/seq" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export new_doc_NoDoc func new_doc_NoDoc() C.int32_t { return C.int32_t(_seq.ToRefNum(new(doc.NoDoc))) } //export proxydoc_S_SF_Set func proxydoc_S_SF_Set(refnum C.int32_t, v C.nstring) { ref := _seq.FromRefNum(int32(refnum)) _v := decodeString(v) ref.Get().(*doc.S).SF = _v } //export proxydoc_S_SF_Get func proxydoc_S_SF_Get(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S).SF _v := encodeString(v) return _v } //export proxydoc_S_S2_Set func proxydoc_S_S2_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) // Must be a Go object var _v *doc.S2 if _v_ref := _seq.FromRefNum(int32(v)); _v_ref != nil { _v = _v_ref.Get().(*doc.S2) } ref.Get().(*doc.S).S2 = _v } //export proxydoc_S_S2_Get func proxydoc_S_S2_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S).S2 var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export proxydoc_S_F1_Set func proxydoc_S_F1_Set(refnum C.int32_t, v C.nstring) { ref := _seq.FromRefNum(int32(refnum)) _v := decodeString(v) ref.Get().(*doc.S).F1 = _v } //export proxydoc_S_F1_Get func proxydoc_S_F1_Get(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S).F1 _v := encodeString(v) return _v } //export proxydoc_S_F2_Set func proxydoc_S_F2_Set(refnum C.int32_t, v C.nstring) { ref := _seq.FromRefNum(int32(refnum)) _v := decodeString(v) ref.Get().(*doc.S).F2 = _v } //export proxydoc_S_F2_Get func proxydoc_S_F2_Get(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S).F2 _v := encodeString(v) return _v } //export proxydoc_S_After func proxydoc_S_After(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S) v.After() } //export proxydoc_S_Before func proxydoc_S_Before(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*doc.S) v.Before() } //export new_doc_S func new_doc_S() C.int32_t { return C.int32_t(_seq.ToRefNum(new(doc.S))) } //export new_doc_S2 func new_doc_S2() C.int32_t { return C.int32_t(_seq.ToRefNum(new(doc.S2))) } //export proxydoc_I_IM func proxydoc_I_IM(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(doc.I) v.IM() } type proxydoc_I _seq.Ref func (p *proxydoc_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxydoc_I) IM() { C.cproxydoc_I_IM(C.int32_t(p.Bind_proxy_refnum__())) } //export var_setdoc_NoDocVar func var_setdoc_NoDocVar(v C.double) { _v := float64(v) doc.NoDocVar = _v } //export var_getdoc_NoDocVar func var_getdoc_NoDocVar() C.double { v := doc.NoDocVar _v := C.double(v) return _v } //export var_setdoc_Specific func var_setdoc_Specific(v C.nstring) { _v := decodeString(v) doc.Specific = _v } //export var_getdoc_Specific func var_getdoc_Specific() C.nstring { v := doc.Specific _v := encodeString(v) return _v } //export var_setdoc_V func var_setdoc_V(v C.nstring) { _v := decodeString(v) doc.V = _v } //export var_getdoc_V func var_getdoc_V() C.nstring { v := doc.V _v := encodeString(v) return _v } //export proxydoc__F func proxydoc__F() { doc.F() } //export proxydoc__NewS func proxydoc__NewS() C.int32_t { res_0 := doc.NewS() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package issue29559. // // autogenerated by gobind -lang=go issue29559 package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "issue29559.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "issue29559" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyissue29559__TakesAString func proxyissue29559__TakesAString(param_s C.nstring) { _param_s := decodeString(param_s) issue29559.TakesAString(_param_s) }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.objc.go.h.golden
// Objective-C API for talking to vars Go package. // gobind -lang=objc vars // // File is generated by gobind. Do not edit. #ifndef __GO_vars_H__ #define __GO_vars_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java keywords #ifndef __Keywords_H__ #define __Keywords_H__ #include <jni.h> extern jclass proxy_class_keywords_KeywordCaller; extern jmethodID proxy_class_keywords_KeywordCaller_cons; void cproxykeywords_KeywordCaller_Abstract(int32_t refnum); void cproxykeywords_KeywordCaller_Assert(int32_t refnum); void cproxykeywords_KeywordCaller_Bool(int32_t refnum); void cproxykeywords_KeywordCaller_Boolean(int32_t refnum); void cproxykeywords_KeywordCaller_Break(int32_t refnum); void cproxykeywords_KeywordCaller_Byte(int32_t refnum); void cproxykeywords_KeywordCaller_Case(int32_t refnum); void cproxykeywords_KeywordCaller_Catch(int32_t refnum); void cproxykeywords_KeywordCaller_Char(int32_t refnum); void cproxykeywords_KeywordCaller_Class(int32_t refnum); void cproxykeywords_KeywordCaller_Const(int32_t refnum); void cproxykeywords_KeywordCaller_Continue(int32_t refnum); void cproxykeywords_KeywordCaller_Default(int32_t refnum); void cproxykeywords_KeywordCaller_Do(int32_t refnum); void cproxykeywords_KeywordCaller_Double(int32_t refnum); void cproxykeywords_KeywordCaller_Else(int32_t refnum); void cproxykeywords_KeywordCaller_Enum(int32_t refnum); void cproxykeywords_KeywordCaller_Extends(int32_t refnum); void cproxykeywords_KeywordCaller_False(int32_t refnum); void cproxykeywords_KeywordCaller_Final(int32_t refnum); void cproxykeywords_KeywordCaller_Finally(int32_t refnum); void cproxykeywords_KeywordCaller_Float(int32_t refnum); void cproxykeywords_KeywordCaller_For(int32_t refnum); void cproxykeywords_KeywordCaller_Goto(int32_t refnum); void cproxykeywords_KeywordCaller_If(int32_t refnum); void cproxykeywords_KeywordCaller_Implements(int32_t refnum); void cproxykeywords_KeywordCaller_Import(int32_t refnum); void cproxykeywords_KeywordCaller_Instanceof(int32_t refnum); void cproxykeywords_KeywordCaller_Int(int32_t refnum); void cproxykeywords_KeywordCaller_Interface(int32_t refnum); void cproxykeywords_KeywordCaller_Long(int32_t refnum); void cproxykeywords_KeywordCaller_Native(int32_t refnum); void cproxykeywords_KeywordCaller_New(int32_t refnum); void cproxykeywords_KeywordCaller_Nil(int32_t refnum); void cproxykeywords_KeywordCaller_Null(int32_t refnum); void cproxykeywords_KeywordCaller_Package(int32_t refnum); void cproxykeywords_KeywordCaller_Private(int32_t refnum); void cproxykeywords_KeywordCaller_Protected(int32_t refnum); void cproxykeywords_KeywordCaller_Public(int32_t refnum); void cproxykeywords_KeywordCaller_Return(int32_t refnum); void cproxykeywords_KeywordCaller_Short(int32_t refnum); void cproxykeywords_KeywordCaller_Static(int32_t refnum); void cproxykeywords_KeywordCaller_Strictfp(int32_t refnum); void cproxykeywords_KeywordCaller_Super(int32_t refnum); void cproxykeywords_KeywordCaller_Switch(int32_t refnum); void cproxykeywords_KeywordCaller_Synchronized(int32_t refnum); void cproxykeywords_KeywordCaller_This(int32_t refnum); void cproxykeywords_KeywordCaller_Throw(int32_t refnum); void cproxykeywords_KeywordCaller_Throws(int32_t refnum); void cproxykeywords_KeywordCaller_Transient(int32_t refnum); void cproxykeywords_KeywordCaller_True(int32_t refnum); void cproxykeywords_KeywordCaller_Try(int32_t refnum); void cproxykeywords_KeywordCaller_Void(int32_t refnum); void cproxykeywords_KeywordCaller_Volatile(int32_t refnum); void cproxykeywords_KeywordCaller_While(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.objc.go.h.golden
// Objective-C API for talking to underscores Go package. // gobind -lang=objc underscores // // File is generated by gobind. Do not edit. #ifndef __GO_underscore_pkg_H__ #define __GO_underscore_pkg_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // package ignore tests that exported, but otherwise // unsupported functions, variables, fields and methods // are ignored by the generators package ignore var Var interface{} type ( NamedString string ) const NamedConst NamedString = "foo" var V interface{} func Argument(_ interface{}) { } func Result() interface{} { return nil } type S struct { F interface{} } type ( F func() ) func (_ *S) Argument(_ interface{}) { } func (_ *S) Result() interface{} { return nil } type I interface { Argument(_ interface{}) Result() interface{} } var ( Uint uint Uint32 uint32 Uint64 uint64 C64 complex64 = 0 C128 complex128 = 0 ) const ( Cuint uint = 0 Cuint32 uint32 = 0 Cuint64 uint64 = 0 )
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class keywords.KeywordCaller is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java keywords package keywords; import go.Seq; public interface KeywordCaller { public void abstract_(); public void assert_(); public void bool(); public void boolean_(); public void break_(); public void byte_(); public void case_(); public void catch_(); public void char_(); public void class_(); public void const_(); public void continue_(); public void default_(); public void do_(); public void double_(); public void else_(); public void enum_(); public void extends_(); public void false_(); public void final_(); public void finally_(); public void float_(); public void for_(); public void goto_(); public void if_(); public void implements_(); public void import_(); public void instanceof_(); public void int_(); public void interface_(); public void long_(); public void native_(); public void new_(); public void nil(); public void null_(); public void package_(); public void private_(); public void protected_(); public void public_(); public void return_(); public void short_(); public void static_(); public void strictfp_(); public void super_(); public void switch_(); public void synchronized_(); public void this_(); public void throw_(); public void throws_(); public void transient_(); public void true_(); public void try_(); public void void_(); public void volatile_(); public void while_(); } // Code generated by gobind. DO NOT EDIT. // Java class keywords.Keywords is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java keywords package keywords; import go.Seq; public abstract class Keywords { static { Seq.touch(); // for loading the native library _init(); } private Keywords() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyKeywordCaller implements Seq.Proxy, KeywordCaller { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyKeywordCaller(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void abstract_(); public native void assert_(); public native void bool(); public native void boolean_(); public native void break_(); public native void byte_(); public native void case_(); public native void catch_(); public native void char_(); public native void class_(); public native void const_(); public native void continue_(); public native void default_(); public native void do_(); public native void double_(); public native void else_(); public native void enum_(); public native void extends_(); public native void false_(); public native void final_(); public native void finally_(); public native void float_(); public native void for_(); public native void goto_(); public native void if_(); public native void implements_(); public native void import_(); public native void instanceof_(); public native void int_(); public native void interface_(); public native void long_(); public native void native_(); public native void new_(); public native void nil(); public native void null_(); public native void package_(); public native void private_(); public native void protected_(); public native void public_(); public native void return_(); public native void short_(); public native void static_(); public native void strictfp_(); public native void super_(); public native void switch_(); public native void synchronized_(); public native void this_(); public native void throw_(); public native void throws_(); public native void transient_(); public native void true_(); public native void try_(); public native void void_(); public native void volatile_(); public native void while_(); } public static native void const_(String id); public static native void static_(String strictfp_); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.objc.m.golden
// Objective-C API for talking to issue12403 Go package. // gobind -lang=objc issue12403 // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Issue12403.objc.h" @implementation Issue12403Parsable { } - (nonnull instancetype)initWithRef:(id)ref { self = [super init]; if (self) { __ref = ref; } return self; } - (NSString* _Nonnull)fromJSON:(NSString* _Nullable)jstr { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring _jstr = go_seq_from_objc_string(jstr); nstring r0 = proxyissue12403_Parsable_FromJSON(refnum, _jstr); NSString *_ret0_ = go_seq_to_objc_string(r0); return _ret0_; } - (NSString* _Nonnull)toJSON:(NSError* _Nullable* _Nullable)error { int32_t refnum = go_seq_go_to_refnum(self._ref); struct proxyissue12403_Parsable_ToJSON_return res = proxyissue12403_Parsable_ToJSON(refnum); NSString *_ret0_ = go_seq_to_objc_string(res.r0); Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(res.r1); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } if (_error != nil) { return nil; } return _ret0_; } @end nstring cproxyissue12403_Parsable_FromJSON(int32_t refnum, nstring jstr) { @autoreleasepool { Issue12403Parsable* o = go_seq_objc_from_refnum(refnum); NSString *_jstr = go_seq_to_objc_string(jstr); NSString* _Nonnull ret0_; ret0_ = [o fromJSON:_jstr]; nstring _ret0_ = go_seq_from_objc_string(ret0_); return _ret0_; } } struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(int32_t refnum) { @autoreleasepool { Issue12403Parsable* o = go_seq_objc_from_refnum(refnum); NSString* _Nonnull ret0_; NSError* error = nil; ret0_ = [o toJSON:&error]; nstring _ret0_ = go_seq_from_objc_string(ret0_); NSError *_error = nil; if (error != nil) { _error = error; } int32_t __error; if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) { id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error); __error = go_seq_go_to_refnum(_error_proxy._ref); } else { __error = go_seq_to_refnum(_error); } cproxyissue12403_Parsable_ToJSON_return _sres = { _ret0_, __error }; return _sres; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.objc.go.h.golden
// Objective-C API for talking to structs Go package. // gobind -lang=objc structs // // File is generated by gobind. Do not edit. #ifndef __GO_structs_H__ #define __GO_structs_H__ #include <stdint.h> #include <objc/objc.h> void cproxystructs_I_M(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package issue12328 type T struct { Err error }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.objc.h.golden
// Objective-C API for talking to interfaces Go package. // gobind -lang=objc interfaces // // File is generated by gobind. Do not edit. #ifndef __Interfaces_H__ #define __Interfaces_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @protocol InterfacesError; @class InterfacesError; @protocol InterfacesI; @class InterfacesI; @protocol InterfacesI1; @protocol InterfacesI2; @protocol InterfacesI3; @class InterfacesI3; @protocol InterfacesInterfaces; @class InterfacesInterfaces; @protocol InterfacesLargerI; @class InterfacesLargerI; @protocol InterfacesSameI; @class InterfacesSameI; @protocol InterfacesWithParam; @class InterfacesWithParam; @protocol InterfacesError <NSObject> - (BOOL)err:(NSError* _Nullable* _Nullable)error; @end @protocol InterfacesI <NSObject> - (int32_t)rand; @end /** * not implementable */ @interface InterfacesI1 : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)j; @end /** * not implementable */ @interface InterfacesI2 : NSObject <goSeqRefInterface> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)g; @end @protocol InterfacesI3 <NSObject> - (InterfacesI1* _Nullable)f; @end @protocol InterfacesInterfaces <NSObject> - (void)someMethod; @end @protocol InterfacesLargerI <NSObject> - (void)anotherFunc; - (int32_t)rand; @end @protocol InterfacesSameI <NSObject> - (int32_t)rand; @end @protocol InterfacesWithParam <NSObject> - (void)hasParam:(BOOL)p0; @end FOUNDATION_EXPORT int32_t InterfacesAdd3(id<InterfacesI> _Nullable r); FOUNDATION_EXPORT BOOL InterfacesCallErr(id<InterfacesError> _Nullable e, NSError* _Nullable* _Nullable error); FOUNDATION_EXPORT id<InterfacesI> _Nullable InterfacesSeven(void); @class InterfacesError; @class InterfacesI; @class InterfacesI3; @class InterfacesInterfaces; @class InterfacesLargerI; @class InterfacesSameI; @class InterfacesWithParam; @interface InterfacesError : NSObject <goSeqRefInterface, InterfacesError> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (BOOL)err:(NSError* _Nullable* _Nullable)error; @end @interface InterfacesI : NSObject <goSeqRefInterface, InterfacesI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (int32_t)rand; @end /** * implementable (the implementor has to find a source of I1s) */ @interface InterfacesI3 : NSObject <goSeqRefInterface, InterfacesI3> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (InterfacesI1* _Nullable)f; @end /** * Interfaces is an interface with the same name as its package. */ @interface InterfacesInterfaces : NSObject <goSeqRefInterface, InterfacesInterfaces> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)someMethod; @end @interface InterfacesLargerI : NSObject <goSeqRefInterface, InterfacesLargerI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)anotherFunc; - (int32_t)rand; @end @interface InterfacesSameI : NSObject <goSeqRefInterface, InterfacesSameI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (int32_t)rand; @end @interface InterfacesWithParam : NSObject <goSeqRefInterface, InterfacesWithParam> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)hasParam:(BOOL)p0; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/basictypes.objc.m.golden
// Objective-C API for talking to basictypes Go package. // gobind -lang=objc basictypes // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Basictypes.objc.h" const BOOL BasictypesABool = YES; const double BasictypesAFloat = 0.2015; NSString* const BasictypesALongString = @"LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString"; const int32_t BasictypesARune = 32; NSString* const BasictypesAString = @"a string"; const int64_t BasictypesAnInt = 7LL; const int64_t BasictypesAnInt2 = 9223372036854775807LL; BOOL BasictypesBool(BOOL p0) { char _p0 = (char)p0; char r0 = proxybasictypes__Bool(_p0); BOOL _ret0_ = r0 ? YES : NO; return _ret0_; } NSData* _Nullable BasictypesByteArrays(NSData* _Nullable x) { nbyteslice _x = go_seq_from_objc_bytearray(x, 0); nbyteslice r0 = proxybasictypes__ByteArrays(_x); if (![x isKindOfClass:[NSMutableData class]]) { free(_x.ptr); } NSData *_ret0_ = go_seq_to_objc_bytearray(r0, 1); return _ret0_; } BOOL BasictypesError(NSError* _Nullable* _Nullable error) { int32_t r0 = proxybasictypes__Error(); Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(r0); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } if (_error != nil && error != nil) { *error = _error; } return (_error == nil); } BOOL BasictypesErrorPair(long* _Nullable ret0_, NSError* _Nullable* _Nullable error) { struct proxybasictypes__ErrorPair_return res = proxybasictypes__ErrorPair(); long _ret0_ = (long)res.r0; Universeerror* _error = nil; GoSeqRef* _error_ref = go_seq_from_refnum(res.r1); if (_error_ref != NULL) { _error = _error_ref.obj; if (_error == nil) { _error = [[Universeerror alloc] initWithRef:_error_ref]; } } *ret0_ = _ret0_; if (_error != nil && error != nil) { *error = _error; } return (_error == nil); } void BasictypesInts(int8_t x, int16_t y, int32_t z, int64_t t, long u) { int8_t _x = (int8_t)x; int16_t _y = (int16_t)y; int32_t _z = (int32_t)z; int64_t _t = (int64_t)t; nint _u = (nint)u; proxybasictypes__Ints(_x, _y, _z, _t, _u); } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class structs.S is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java structs package structs; import go.Seq; public final class S implements Seq.Proxy { static { Structs.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public S() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native double getX(); public final native void setX(double v); public final native double getY(); public final native void setY(double v); public native S identity() throws Exception; public native double sum(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof S)) { return false; } S that = (S)o; double thisX = getX(); double thatX = that.getX(); if (thisX != thatX) { return false; } double thisY = getY(); double thatY = that.getY(); if (thisY != thatY) { return false; } return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {getX(), getY()}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("S").append("{"); b.append("X:").append(getX()).append(","); b.append("Y:").append(getY()).append(","); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class structs.S2 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java structs package structs; import go.Seq; public final class S2 implements Seq.Proxy, I { static { Structs.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } S2(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public S2() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public native void m(); public native String string(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof S2)) { return false; } S2 that = (S2)o; return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { return string(); } } // Code generated by gobind. DO NOT EDIT. // Java class structs.Structs_ is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java structs package structs; import go.Seq; public final class Structs_ implements Seq.Proxy, I { static { Structs.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } Structs_(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public Structs_() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public native void m(); @Override public boolean equals(Object o) { if (o == null || !(o instanceof Structs_)) { return false; } Structs_ that = (Structs_)o; return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("Structs_").append("{"); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class structs.I is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java structs package structs; import go.Seq; public interface I { public void m(); } // Code generated by gobind. DO NOT EDIT. // Java class structs.Structs is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java structs package structs; import go.Seq; public abstract class Structs { static { Seq.touch(); // for loading the native library _init(); } private Structs() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyI implements Seq.Proxy, I { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native void m(); } public static native S identity(S s); public static native S identityWithError(S s) throws Exception; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class issue12403.Parsable is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue12403 package issue12403; import go.Seq; public interface Parsable { public String fromJSON(String jstr); public String toJSON() throws Exception; } // Code generated by gobind. DO NOT EDIT. // Java class issue12403.Issue12403 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue12403 package issue12403; import go.Seq; public abstract class Issue12403 { static { Seq.touch(); // for loading the native library _init(); } private Issue12403() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); private static final class proxyParsable implements Seq.Proxy, Parsable { private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } proxyParsable(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public native String fromJSON(String jstr); public native String toJSON() throws Exception; } }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java interfaces #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "interfaces.h" jclass proxy_class_interfaces_Error; jmethodID proxy_class_interfaces_Error_cons; static jmethodID mid_Error_Err; jclass proxy_class_interfaces_I; jmethodID proxy_class_interfaces_I_cons; static jmethodID mid_I_Rand; jclass proxy_class_interfaces_I1; jmethodID proxy_class_interfaces_I1_cons; static jmethodID mid_I1_J; jclass proxy_class_interfaces_I2; jmethodID proxy_class_interfaces_I2_cons; static jmethodID mid_I2_G; jclass proxy_class_interfaces_I3; jmethodID proxy_class_interfaces_I3_cons; static jmethodID mid_I3_F; jclass proxy_class_interfaces_Interfaces; jmethodID proxy_class_interfaces_Interfaces_cons; static jmethodID mid_Interfaces_SomeMethod; jclass proxy_class_interfaces_LargerI; jmethodID proxy_class_interfaces_LargerI_cons; static jmethodID mid_LargerI_AnotherFunc; static jmethodID mid_LargerI_Rand; jclass proxy_class_interfaces_SameI; jmethodID proxy_class_interfaces_SameI_cons; static jmethodID mid_SameI_Rand; jclass proxy_class_interfaces_WithParam; jmethodID proxy_class_interfaces_WithParam_cons; static jmethodID mid_WithParam_HasParam; JNIEXPORT void JNICALL Java_interfaces_Interfaces__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyError"); proxy_class_interfaces_Error = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_Error_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/Error"); mid_Error_Err = (*env)->GetMethodID(env, clazz, "err", "()V"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyI"); proxy_class_interfaces_I = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/I"); mid_I_Rand = (*env)->GetMethodID(env, clazz, "rand", "()I"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyI1"); proxy_class_interfaces_I1 = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_I1_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/I1"); mid_I1_J = (*env)->GetMethodID(env, clazz, "j", "()V"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyI2"); proxy_class_interfaces_I2 = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_I2_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/I2"); mid_I2_G = (*env)->GetMethodID(env, clazz, "g", "()V"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyI3"); proxy_class_interfaces_I3 = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_I3_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/I3"); mid_I3_F = (*env)->GetMethodID(env, clazz, "f", "()Linterfaces/I1;"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyInterfaces"); proxy_class_interfaces_Interfaces = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_Interfaces_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/Interfaces_"); mid_Interfaces_SomeMethod = (*env)->GetMethodID(env, clazz, "someMethod", "()V"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyLargerI"); proxy_class_interfaces_LargerI = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_LargerI_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/LargerI"); mid_LargerI_AnotherFunc = (*env)->GetMethodID(env, clazz, "anotherFunc", "()V"); mid_LargerI_Rand = (*env)->GetMethodID(env, clazz, "rand", "()I"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxySameI"); proxy_class_interfaces_SameI = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_SameI_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/SameI"); mid_SameI_Rand = (*env)->GetMethodID(env, clazz, "rand", "()I"); clazz = (*env)->FindClass(env, "interfaces/Interfaces$proxyWithParam"); proxy_class_interfaces_WithParam = (*env)->NewGlobalRef(env, clazz); proxy_class_interfaces_WithParam_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "interfaces/WithParam"); mid_WithParam_HasParam = (*env)->GetMethodID(env, clazz, "hasParam", "(Z)V"); } JNIEXPORT jint JNICALL Java_interfaces_Interfaces_add3(JNIEnv* env, jclass _clazz, jobject r) { int32_t _r = go_seq_to_refnum(env, r); int32_t r0 = proxyinterfaces__Add3(_r); jint _r0 = (jint)r0; return _r0; } JNIEXPORT void JNICALL Java_interfaces_Interfaces_callErr(JNIEnv* env, jclass _clazz, jobject e) { int32_t _e = go_seq_to_refnum(env, e); int32_t r0 = proxyinterfaces__CallErr(_e); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r0); } JNIEXPORT jobject JNICALL Java_interfaces_Interfaces_seven(JNIEnv* env, jclass _clazz) { int32_t r0 = proxyinterfaces__Seven(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_interfaces_I, proxy_class_interfaces_I_cons); return _r0; } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyError_err(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t r0 = proxyinterfaces_Error_Err(o); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r0); } int32_t cproxyinterfaces_Error_Err(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_Error, proxy_class_interfaces_Error_cons); (*env)->CallVoidMethod(env, o, mid_Error_Err); jobject exc = go_seq_get_exception(env); int32_t _exc = go_seq_to_refnum(env, exc); go_seq_pop_local_frame(env); return _exc; } JNIEXPORT jint JNICALL Java_interfaces_Interfaces_00024proxyI_rand(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t r0 = proxyinterfaces_I_Rand(o); jint _r0 = (jint)r0; return _r0; } int32_t cproxyinterfaces_I_Rand(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_I, proxy_class_interfaces_I_cons); jint res = (*env)->CallIntMethod(env, o, mid_I_Rand); int32_t _res = (int32_t)res; go_seq_pop_local_frame(env); return _res; } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyI1_j(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxyinterfaces_I1_J(o); } void cproxyinterfaces_I1_J(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_I1, proxy_class_interfaces_I1_cons); (*env)->CallVoidMethod(env, o, mid_I1_J); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyI2_g(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxyinterfaces_I2_G(o); } void cproxyinterfaces_I2_G(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_I2, proxy_class_interfaces_I2_cons); (*env)->CallVoidMethod(env, o, mid_I2_G); go_seq_pop_local_frame(env); } JNIEXPORT jobject JNICALL Java_interfaces_Interfaces_00024proxyI3_f(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t r0 = proxyinterfaces_I3_F(o); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_interfaces_I1, proxy_class_interfaces_I1_cons); return _r0; } int32_t cproxyinterfaces_I3_F(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_I3, proxy_class_interfaces_I3_cons); jobject res = (*env)->CallObjectMethod(env, o, mid_I3_F); int32_t _res = go_seq_to_refnum(env, res); go_seq_pop_local_frame(env); return _res; } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyInterfaces_someMethod(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxyinterfaces_Interfaces_SomeMethod(o); } void cproxyinterfaces_Interfaces_SomeMethod(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_Interfaces, proxy_class_interfaces_Interfaces_cons); (*env)->CallVoidMethod(env, o, mid_Interfaces_SomeMethod); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyLargerI_anotherFunc(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxyinterfaces_LargerI_AnotherFunc(o); } void cproxyinterfaces_LargerI_AnotherFunc(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_LargerI, proxy_class_interfaces_LargerI_cons); (*env)->CallVoidMethod(env, o, mid_LargerI_AnotherFunc); go_seq_pop_local_frame(env); } JNIEXPORT jint JNICALL Java_interfaces_Interfaces_00024proxyLargerI_rand(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t r0 = proxyinterfaces_LargerI_Rand(o); jint _r0 = (jint)r0; return _r0; } int32_t cproxyinterfaces_LargerI_Rand(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_LargerI, proxy_class_interfaces_LargerI_cons); jint res = (*env)->CallIntMethod(env, o, mid_LargerI_Rand); int32_t _res = (int32_t)res; go_seq_pop_local_frame(env); return _res; } JNIEXPORT jint JNICALL Java_interfaces_Interfaces_00024proxySameI_rand(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); int32_t r0 = proxyinterfaces_SameI_Rand(o); jint _r0 = (jint)r0; return _r0; } int32_t cproxyinterfaces_SameI_Rand(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_SameI, proxy_class_interfaces_SameI_cons); jint res = (*env)->CallIntMethod(env, o, mid_SameI_Rand); int32_t _res = (int32_t)res; go_seq_pop_local_frame(env); return _res; } JNIEXPORT void JNICALL Java_interfaces_Interfaces_00024proxyWithParam_hasParam(JNIEnv* env, jobject __this__, jboolean p0) { int32_t o = go_seq_to_refnum_go(env, __this__); char _p0 = (char)p0; proxyinterfaces_WithParam_HasParam(o, _p0); } void cproxyinterfaces_WithParam_HasParam(int32_t refnum, char p0) { JNIEnv *env = go_seq_push_local_frame(1); jobject o = go_seq_from_refnum(env, refnum, proxy_class_interfaces_WithParam, proxy_class_interfaces_WithParam_cons); jboolean _p0 = p0 ? JNI_TRUE : JNI_FALSE; (*env)->CallVoidMethod(env, o, mid_WithParam_HasParam, _p0); go_seq_pop_local_frame(env); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.objc.h.golden
// Objective-C API for talking to keywords Go package. // gobind -lang=objc keywords // // File is generated by gobind. Do not edit. #ifndef __Keywords_H__ #define __Keywords_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @protocol KeywordsKeywordCaller; @class KeywordsKeywordCaller; @protocol KeywordsKeywordCaller <NSObject> - (void)abstract; - (void)assert; - (void)bool_; - (void)boolean; - (void)break; - (void)byte; - (void)case; - (void)catch; - (void)char_; - (void)class; - (void)const_; - (void)continue; - (void)default; - (void)do; - (void)double_; - (void)else; - (void)enum; - (void)extends; - (void)false; - (void)final; - (void)finally; - (void)float_; - (void)for; - (void)goto; - (void)if; - (void)implements; - (void)import; - (void)instanceof; - (void)int_; - (void)interface; - (void)long_; - (void)native; - (void)new; - (void)nil_; - (void)null; - (void)package; - (void)private; - (void)protected; - (void)public; - (void)return; - (void)short_; - (void)static; - (void)strictfp; - (void)super_; - (void)switch; - (void)synchronized; - (void)this; - (void)throw; - (void)throws; - (void)transient; - (void)true; - (void)try; - (void)void_; - (void)volatile_; - (void)while; @end FOUNDATION_EXPORT void KeywordsConst(NSString* _Nullable id_); FOUNDATION_EXPORT void KeywordsStatic(NSString* _Nullable strictfp); @class KeywordsKeywordCaller; @interface KeywordsKeywordCaller : NSObject <goSeqRefInterface, KeywordsKeywordCaller> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (void)abstract; - (void)assert; - (void)bool_; - (void)boolean; - (void)break; - (void)byte; - (void)case; - (void)catch; - (void)char_; - (void)class; - (void)const_; - (void)continue; - (void)default; - (void)do; - (void)double_; - (void)else; - (void)enum; - (void)extends; - (void)false; - (void)final; - (void)finally; - (void)float_; - (void)for; - (void)goto; - (void)if; - (void)implements; - (void)import; - (void)instanceof; - (void)int_; - (void)interface; - (void)long_; - (void)native; - (void)new; - (void)nil_; - (void)null; - (void)package; - (void)private; - (void)protected; - (void)public; - (void)return; - (void)short_; - (void)static; - (void)strictfp; - (void)super_; - (void)switch; - (void)synchronized; - (void)this; - (void)throw; - (void)throws; - (void)transient; - (void)true; - (void)try; - (void)void_; - (void)volatile_; - (void)while; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/doc.objc.go.h.golden
// Objective-C API for talking to doc Go package. // gobind -lang=objc doc // // File is generated by gobind. Do not edit. #ifndef __GO_doc_H__ #define __GO_doc_H__ #include <stdint.h> #include <objc/objc.h> void cproxydoc_I_IM(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package issue12328. // // autogenerated by gobind -lang=go issue12328 package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "issue12328.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "issue12328" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyissue12328_T_Err_Set func proxyissue12328_T_Err_Set(refnum C.int32_t, v C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) var _v error _v_ref := _seq.FromRefNum(int32(v)) if _v_ref != nil { if v < 0 { // go object _v = _v_ref.Get().(error) } else { // foreign object _v = (*proxy_error)(_v_ref) } } ref.Get().(*issue12328.T).Err = _v } //export proxyissue12328_T_Err_Get func proxyissue12328_T_Err_Get(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*issue12328.T).Err var _v C.int32_t = _seq.NullRefNum if v != nil { _v = C.int32_t(_seq.ToRefNum(v)) } return _v } //export new_issue12328_T func new_issue12328_T() C.int32_t { return C.int32_t(_seq.ToRefNum(new(issue12328.T))) }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/interfaces.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package interfaces. // // autogenerated by gobind -lang=go interfaces package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "interfaces.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "interfaces" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyinterfaces_Error_Err func proxyinterfaces_Error_Err(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.Error) res_0 := v.Err() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 } type proxyinterfaces_Error _seq.Ref func (p *proxyinterfaces_Error) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_Error) Err() error { res := C.cproxyinterfaces_Error_Err(C.int32_t(p.Bind_proxy_refnum__())) var _res error _res_ref := _seq.FromRefNum(int32(res)) if _res_ref != nil { if res < 0 { // go object _res = _res_ref.Get().(error) } else { // foreign object _res = (*proxy_error)(_res_ref) } } return _res } //export proxyinterfaces_I_Rand func proxyinterfaces_I_Rand(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.I) res_0 := v.Rand() _res_0 := C.int32_t(res_0) return _res_0 } type proxyinterfaces_I _seq.Ref func (p *proxyinterfaces_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_I) Rand() int32 { res := C.cproxyinterfaces_I_Rand(C.int32_t(p.Bind_proxy_refnum__())) _res := int32(res) return _res } //export proxyinterfaces_I1_J func proxyinterfaces_I1_J(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.I1) v.J() } //export proxyinterfaces_I2_G func proxyinterfaces_I2_G(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.I2) v.G() } //export proxyinterfaces_I3_F func proxyinterfaces_I3_F(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.I3) res_0 := v.F() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 } type proxyinterfaces_I3 _seq.Ref func (p *proxyinterfaces_I3) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_I3) F() interfaces.I1 { res := C.cproxyinterfaces_I3_F(C.int32_t(p.Bind_proxy_refnum__())) var _res interfaces.I1 _res_ref := _seq.FromRefNum(int32(res)) if _res_ref != nil { if res < 0 { // go object _res = _res_ref.Get().(interfaces.I1) } } return _res } //export proxyinterfaces_Interfaces_SomeMethod func proxyinterfaces_Interfaces_SomeMethod(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.Interfaces) v.SomeMethod() } type proxyinterfaces_Interfaces _seq.Ref func (p *proxyinterfaces_Interfaces) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_Interfaces) SomeMethod() { C.cproxyinterfaces_Interfaces_SomeMethod(C.int32_t(p.Bind_proxy_refnum__())) } //export proxyinterfaces_LargerI_AnotherFunc func proxyinterfaces_LargerI_AnotherFunc(refnum C.int32_t) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.LargerI) v.AnotherFunc() } //export proxyinterfaces_LargerI_Rand func proxyinterfaces_LargerI_Rand(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.LargerI) res_0 := v.Rand() _res_0 := C.int32_t(res_0) return _res_0 } type proxyinterfaces_LargerI _seq.Ref func (p *proxyinterfaces_LargerI) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_LargerI) AnotherFunc() { C.cproxyinterfaces_LargerI_AnotherFunc(C.int32_t(p.Bind_proxy_refnum__())) } func (p *proxyinterfaces_LargerI) Rand() int32 { res := C.cproxyinterfaces_LargerI_Rand(C.int32_t(p.Bind_proxy_refnum__())) _res := int32(res) return _res } //export proxyinterfaces_SameI_Rand func proxyinterfaces_SameI_Rand(refnum C.int32_t) C.int32_t { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.SameI) res_0 := v.Rand() _res_0 := C.int32_t(res_0) return _res_0 } type proxyinterfaces_SameI _seq.Ref func (p *proxyinterfaces_SameI) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_SameI) Rand() int32 { res := C.cproxyinterfaces_SameI_Rand(C.int32_t(p.Bind_proxy_refnum__())) _res := int32(res) return _res } //export proxyinterfaces_WithParam_HasParam func proxyinterfaces_WithParam_HasParam(refnum C.int32_t, param_p0 C.char) { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(interfaces.WithParam) _param_p0 := param_p0 != 0 v.HasParam(_param_p0) } type proxyinterfaces_WithParam _seq.Ref func (p *proxyinterfaces_WithParam) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyinterfaces_WithParam) HasParam(param_p0 bool) { var _param_p0 C.char = 0 if param_p0 { _param_p0 = 1 } C.cproxyinterfaces_WithParam_HasParam(C.int32_t(p.Bind_proxy_refnum__()), _param_p0) } //export proxyinterfaces__Add3 func proxyinterfaces__Add3(param_r C.int32_t) C.int32_t { var _param_r interfaces.I _param_r_ref := _seq.FromRefNum(int32(param_r)) if _param_r_ref != nil { if param_r < 0 { // go object _param_r = _param_r_ref.Get().(interfaces.I) } else { // foreign object _param_r = (*proxyinterfaces_I)(_param_r_ref) } } res_0 := interfaces.Add3(_param_r) _res_0 := C.int32_t(res_0) return _res_0 } //export proxyinterfaces__CallErr func proxyinterfaces__CallErr(param_e C.int32_t) C.int32_t { var _param_e interfaces.Error _param_e_ref := _seq.FromRefNum(int32(param_e)) if _param_e_ref != nil { if param_e < 0 { // go object _param_e = _param_e_ref.Get().(interfaces.Error) } else { // foreign object _param_e = (*proxyinterfaces_Error)(_param_e_ref) } } res_0 := interfaces.CallErr(_param_e) var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 } //export proxyinterfaces__Seven func proxyinterfaces__Seven() C.int32_t { res_0 := interfaces.Seven() var _res_0 C.int32_t = _seq.NullRefNum if res_0 != nil { _res_0 = C.int32_t(_seq.ToRefNum(res_0)) } return _res_0 }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.go.golden
// Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package underscore_pkg. // // autogenerated by gobind -lang=go underscores package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "underscore_pkg.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "underscores" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyunderscore_pkg_Underscore_struct_Underscore_field_Set func proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(refnum C.int32_t, v C.nstring) { ref := _seq.FromRefNum(int32(refnum)) _v := decodeString(v) ref.Get().(*underscore_pkg.Underscore_struct).Underscore_field = _v } //export proxyunderscore_pkg_Underscore_struct_Underscore_field_Get func proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(*underscore_pkg.Underscore_struct).Underscore_field _v := encodeString(v) return _v } //export new_underscore_pkg_Underscore_struct func new_underscore_pkg_Underscore_struct() C.int32_t { return C.int32_t(_seq.ToRefNum(new(underscore_pkg.Underscore_struct))) } //export var_setunderscore_pkg_Underscore_var func var_setunderscore_pkg_Underscore_var(v C.nint) { _v := int(v) underscore_pkg.Underscore_var = _v } //export var_getunderscore_pkg_Underscore_var func var_getunderscore_pkg_Underscore_var() C.nint { v := underscore_pkg.Underscore_var _v := C.nint(v) return _v } //export proxyunderscore_pkg__Underscore_func func proxyunderscore_pkg__Underscore_func() { underscore_pkg.Underscore_func() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue12403 #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "issue12403.h" jclass proxy_class_issue12403_Parsable; jmethodID proxy_class_issue12403_Parsable_cons; static jmethodID mid_Parsable_FromJSON; static jmethodID mid_Parsable_ToJSON; JNIEXPORT void JNICALL Java_issue12403_Issue12403__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "issue12403/Issue12403$proxyParsable"); proxy_class_issue12403_Parsable = (*env)->NewGlobalRef(env, clazz); proxy_class_issue12403_Parsable_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "issue12403/Parsable"); mid_Parsable_FromJSON = (*env)->GetMethodID(env, clazz, "fromJSON", "(Ljava/lang/String;)Ljava/lang/String;"); mid_Parsable_ToJSON = (*env)->GetMethodID(env, clazz, "toJSON", "()Ljava/lang/String;"); } JNIEXPORT jstring JNICALL Java_issue12403_Issue12403_00024proxyParsable_fromJSON(JNIEnv* env, jobject __this__, jstring jstr) { int32_t o = go_seq_to_refnum_go(env, __this__); nstring _jstr = go_seq_from_java_string(env, jstr); nstring r0 = proxyissue12403_Parsable_FromJSON(o, _jstr); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } nstring cproxyissue12403_Parsable_FromJSON(int32_t refnum, nstring jstr) { JNIEnv *env = go_seq_push_local_frame(1); jobject o = go_seq_from_refnum(env, refnum, proxy_class_issue12403_Parsable, proxy_class_issue12403_Parsable_cons); jstring _jstr = go_seq_to_java_string(env, jstr); jstring res = (*env)->CallObjectMethod(env, o, mid_Parsable_FromJSON, _jstr); nstring _res = go_seq_from_java_string(env, res); go_seq_pop_local_frame(env); return _res; } JNIEXPORT jstring JNICALL Java_issue12403_Issue12403_00024proxyParsable_toJSON(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); struct proxyissue12403_Parsable_ToJSON_return res = proxyissue12403_Parsable_ToJSON(o); jstring _r0 = go_seq_to_java_string(env, res.r0); jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_issue12403_Parsable, proxy_class_issue12403_Parsable_cons); jstring res = (*env)->CallObjectMethod(env, o, mid_Parsable_ToJSON); jobject exc = go_seq_get_exception(env); int32_t _exc = go_seq_to_refnum(env, exc); if (exc != NULL) { res = NULL; } nstring _res = go_seq_from_java_string(env, res); cproxyissue12403_Parsable_ToJSON_return sres = { _res, _exc }; go_seq_pop_local_frame(env); return sres; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.objc.m.golden
// Objective-C API for talking to try Go package. // gobind -lang=objc try // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Try.objc.h" NSString* _Nonnull TryThis(void) { nstring r0 = proxytry__This(); NSString *_ret0_ = go_seq_to_objc_string(r0); return _ret0_; } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefixEX.objc.m.golden
// Objective-C API for talking to customprefix Go package. // gobind -lang=objc -prefix="EX" customprefix // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "EXCustomprefix.objc.h" void EXCustomprefixF(void) { proxycustomprefix__F(); } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.go
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package underscore_pkg type Underscore_struct struct { Underscore_field string } var Underscore_var int func Underscore_func() {}
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/java.java.c.golden
// Code generated by gobind. DO NOT EDIT. #include <jni.h> #include "seq.h" #include "classes.h" static jclass class_java_lang_Float; static jmethodID m_java_lang_Float_toString; static jclass class_java_lang_Long; static jmethodID m_java_lang_Long_toString; static jclass class_java_lang_Object; static jmethodID m_java_lang_Object_toString; static jclass class_java_lang_Runnable; void init_proxies() { JNIEnv *env = go_seq_push_local_frame(4); jclass clazz; 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); } go_seq_pop_local_frame(env); } 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; } 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; } 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; } // Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java java #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; static jmethodID mid_F_ToString; jclass proxy_class_java_L; jmethodID proxy_class_java_L_cons; static jmethodID mid_L_ToString; jclass proxy_class_java_O; jmethodID proxy_class_java_O_cons; static jmethodID mid_O_ToString; jclass proxy_class_java_R; jmethodID proxy_class_java_R_cons; JNIEXPORT void JNICALL Java_java_Java__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "java/Java$proxyF"); proxy_class_java_F = (*env)->NewGlobalRef(env, clazz); proxy_class_java_F_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/F"); mid_F_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;"); 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>", "(I)V"); clazz = (*env)->FindClass(env, "java/L"); mid_L_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;"); clazz = (*env)->FindClass(env, "java/Java$proxyO"); proxy_class_java_O = (*env)->NewGlobalRef(env, clazz); proxy_class_java_O_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/O"); mid_O_ToString = (*env)->GetMethodID(env, clazz, "toString", "()Ljava/lang/String;"); clazz = (*env)->FindClass(env, "java/Java$proxyR"); proxy_class_java_R = (*env)->NewGlobalRef(env, clazz); proxy_class_java_R_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "java/R"); } 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; } 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; } 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; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/basictypes.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java basictypes #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "basictypes.h" JNIEXPORT void JNICALL Java_basictypes_Basictypes__1init(JNIEnv *env, jclass _unused) { jclass clazz; } JNIEXPORT jboolean JNICALL Java_basictypes_Basictypes_bool(JNIEnv* env, jclass _clazz, jboolean p0) { char _p0 = (char)p0; char r0 = proxybasictypes__Bool(_p0); jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE; return _r0; } JNIEXPORT jbyteArray JNICALL Java_basictypes_Basictypes_byteArrays(JNIEnv* env, jclass _clazz, jbyteArray x) { nbyteslice _x = go_seq_from_java_bytearray(env, x, 0); nbyteslice r0 = proxybasictypes__ByteArrays(_x); go_seq_release_byte_array(env, x, _x.ptr); jbyteArray _r0 = go_seq_to_java_bytearray(env, r0, 1); return _r0; } JNIEXPORT void JNICALL Java_basictypes_Basictypes_error(JNIEnv* env, jclass _clazz) { int32_t r0 = proxybasictypes__Error(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r0); } JNIEXPORT jlong JNICALL Java_basictypes_Basictypes_errorPair(JNIEnv* env, jclass _clazz) { struct proxybasictypes__ErrorPair_return res = proxybasictypes__ErrorPair(); jlong _r0 = (jlong)res.r0; jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT void JNICALL Java_basictypes_Basictypes_ints(JNIEnv* env, jclass _clazz, jbyte x, jshort y, jint z, jlong t, jlong u) { int8_t _x = (int8_t)x; int16_t _y = (int16_t)y; int32_t _z = (int32_t)z; int64_t _t = (int64_t)t; nint _u = (nint)u; proxybasictypes__Ints(_x, _y, _z, _t, _u); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.objc.go.h.golden
// Objective-C API for talking to customprefix Go package. // gobind -lang=objc customprefix // // File is generated by gobind. Do not edit. #ifndef __GO_customprefix_H__ #define __GO_customprefix_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java vars #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "vars.h" jclass proxy_class_vars_I; jmethodID proxy_class_vars_I_cons; jclass proxy_class_vars_S; jmethodID proxy_class_vars_S_cons; JNIEXPORT void JNICALL Java_vars_Vars__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "vars/S"); proxy_class_vars_S = (*env)->NewGlobalRef(env, clazz); proxy_class_vars_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "vars/Vars$proxyI"); proxy_class_vars_I = (*env)->NewGlobalRef(env, clazz); proxy_class_vars_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "vars/I"); } JNIEXPORT jint JNICALL Java_vars_S__1_1New(JNIEnv *env, jclass clazz) { return new_vars_S(); } JNIEXPORT void JNICALL Java_vars_Vars_setABool(JNIEnv *env, jclass clazz, jboolean v) { char _v = (char)v; var_setvars_ABool(_v); } JNIEXPORT jboolean JNICALL Java_vars_Vars_getABool(JNIEnv *env, jclass clazz) { char r0 = var_getvars_ABool(); jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAFloat(JNIEnv *env, jclass clazz, jdouble v) { double _v = (double)v; var_setvars_AFloat(_v); } JNIEXPORT jdouble JNICALL Java_vars_Vars_getAFloat(JNIEnv *env, jclass clazz) { double r0 = var_getvars_AFloat(); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAFloat32(JNIEnv *env, jclass clazz, jfloat v) { float _v = (float)v; var_setvars_AFloat32(_v); } JNIEXPORT jfloat JNICALL Java_vars_Vars_getAFloat32(JNIEnv *env, jclass clazz) { float r0 = var_getvars_AFloat32(); jfloat _r0 = (jfloat)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAFloat64(JNIEnv *env, jclass clazz, jdouble v) { double _v = (double)v; var_setvars_AFloat64(_v); } JNIEXPORT jdouble JNICALL Java_vars_Vars_getAFloat64(JNIEnv *env, jclass clazz) { double r0 = var_getvars_AFloat64(); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAString(JNIEnv *env, jclass clazz, jstring v) { nstring _v = go_seq_from_java_string(env, v); var_setvars_AString(_v); } JNIEXPORT jstring JNICALL Java_vars_Vars_getAString(JNIEnv *env, jclass clazz) { nstring r0 = var_getvars_AString(); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAStructPtr(JNIEnv *env, jclass clazz, jobject v) { int32_t _v = go_seq_to_refnum(env, v); var_setvars_AStructPtr(_v); } JNIEXPORT jobject JNICALL Java_vars_Vars_getAStructPtr(JNIEnv *env, jclass clazz) { int32_t r0 = var_getvars_AStructPtr(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_vars_S, proxy_class_vars_S_cons); return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInt(JNIEnv *env, jclass clazz, jlong v) { nint _v = (nint)v; var_setvars_AnInt(_v); } JNIEXPORT jlong JNICALL Java_vars_Vars_getAnInt(JNIEnv *env, jclass clazz) { nint r0 = var_getvars_AnInt(); jlong _r0 = (jlong)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInt16(JNIEnv *env, jclass clazz, jshort v) { int16_t _v = (int16_t)v; var_setvars_AnInt16(_v); } JNIEXPORT jshort JNICALL Java_vars_Vars_getAnInt16(JNIEnv *env, jclass clazz) { int16_t r0 = var_getvars_AnInt16(); jshort _r0 = (jshort)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInt32(JNIEnv *env, jclass clazz, jint v) { int32_t _v = (int32_t)v; var_setvars_AnInt32(_v); } JNIEXPORT jint JNICALL Java_vars_Vars_getAnInt32(JNIEnv *env, jclass clazz) { int32_t r0 = var_getvars_AnInt32(); jint _r0 = (jint)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInt64(JNIEnv *env, jclass clazz, jlong v) { int64_t _v = (int64_t)v; var_setvars_AnInt64(_v); } JNIEXPORT jlong JNICALL Java_vars_Vars_getAnInt64(JNIEnv *env, jclass clazz) { int64_t r0 = var_getvars_AnInt64(); jlong _r0 = (jlong)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInt8(JNIEnv *env, jclass clazz, jbyte v) { int8_t _v = (int8_t)v; var_setvars_AnInt8(_v); } JNIEXPORT jbyte JNICALL Java_vars_Vars_getAnInt8(JNIEnv *env, jclass clazz) { int8_t r0 = var_getvars_AnInt8(); jbyte _r0 = (jbyte)r0; return _r0; } JNIEXPORT void JNICALL Java_vars_Vars_setAnInterface(JNIEnv *env, jclass clazz, jobject v) { int32_t _v = go_seq_to_refnum(env, v); var_setvars_AnInterface(_v); } JNIEXPORT jobject JNICALL Java_vars_Vars_getAnInterface(JNIEnv *env, jclass clazz) { int32_t r0 = var_getvars_AnInterface(); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_vars_I, proxy_class_vars_I_cons); return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.objc.go.h.golden
// Objective-C API for talking to issue10788 Go package. // gobind -lang=objc issue10788 // // File is generated by gobind. Do not edit. #ifndef __GO_issue10788_H__ #define __GO_issue10788_H__ #include <stdint.h> #include <objc/objc.h> void cproxyissue10788_TestInterface_DoSomeWork(int32_t refnum, int32_t s); void cproxyissue10788_TestInterface_MultipleUnnamedParams(int32_t refnum, nint p0, nstring p1, int64_t 日本); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue29559.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue29559 #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "issue29559.h" JNIEXPORT void JNICALL Java_issue29559_Issue29559__1init(JNIEnv *env, jclass _unused) { jclass clazz; } JNIEXPORT void JNICALL Java_issue29559_Issue29559_takesAString(JNIEnv* env, jclass _clazz, jstring s) { nstring _s = go_seq_from_java_string(env, s); proxyissue29559__TakesAString(_s); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.objc.h.golden
// Objective-C API for talking to customprefix Go package. // gobind -lang=objc customprefix // // File is generated by gobind. Do not edit. #ifndef __Customprefix_H__ #define __Customprefix_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" FOUNDATION_EXPORT void CustomprefixF(void); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java underscores #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "underscore_pkg.h" jclass proxy_class_underscore_pkg_Underscore_struct; jmethodID proxy_class_underscore_pkg_Underscore_struct_cons; JNIEXPORT void JNICALL Java_underscore_1pkg_Underscore_1pkg__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "underscore_pkg/Underscore_struct"); proxy_class_underscore_pkg_Underscore_struct = (*env)->NewGlobalRef(env, clazz); proxy_class_underscore_pkg_Underscore_struct_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); } JNIEXPORT void JNICALL Java_underscore_1pkg_Underscore_1pkg_underscore_1func(JNIEnv* env, jclass _clazz) { proxyunderscore_pkg__Underscore_func(); } JNIEXPORT jint JNICALL Java_underscore_1pkg_Underscore_1struct__1_1New(JNIEnv *env, jclass clazz) { return new_underscore_pkg_Underscore_struct(); } JNIEXPORT void JNICALL Java_underscore_1pkg_Underscore_1struct_setUnderscore_1field(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); proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(o, _v); } JNIEXPORT jstring JNICALL Java_underscore_1pkg_Underscore_1struct_getUnderscore_1field(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT void JNICALL Java_underscore_1pkg_Underscore_1pkg_setUnderscore_1var(JNIEnv *env, jclass clazz, jlong v) { nint _v = (nint)v; var_setunderscore_pkg_Underscore_var(_v); } JNIEXPORT jlong JNICALL Java_underscore_1pkg_Underscore_1pkg_getUnderscore_1var(JNIEnv *env, jclass clazz) { nint r0 = var_getunderscore_pkg_Underscore_var(); jlong _r0 = (jlong)r0; return _r0; }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/classes.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package java import ( gopkg "Java/java" "Java/java/io" "Java/java/lang" "Java/java/lang/System" "Java/java/util/Spliterators" "Java/java/util/concurrent" ) type Runnable struct { lang.Runnable } func (r *Runnable) Run(this gopkg.Runnable) { } type InputStream struct { io.InputStream } func (_ *InputStream) Read() (int32, error) { return 0, nil } func NewInputStream() *InputStream { return new(InputStream) } type Future struct { concurrent.Future } func (_ *Future) Get() (lang.Object, error) { return nil, nil } // Use a trailing underscore to override multiple overloaded methods. func (_ *Future) Get_(_ int64, _ concurrent.TimeUnit) (lang.Object, error) { return nil, nil } type Object struct { lang.Object } func innerClassTypes() { // java.util.Spliterators.iterator use inner class types // for the return value as well as parameters. Spliterators.Iterator(nil) } func returnType() { // Implicit types (java.io.Console) should be wrapped. cons := System.Console() cons.Flush() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.go
package issue12403 type Parsable interface { FromJSON(jstr string) string ToJSON() (string, error) }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.objc.m.golden
// Objective-C API for talking to customprefix Go package. // gobind -lang=objc customprefix // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Customprefix.objc.h" void CustomprefixF(void) { proxycustomprefix__F(); } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/classes.java.h.golden
// Code generated by gobind. DO NOT EDIT. #include <jni.h> #include "seq.h" extern void init_proxies(); typedef struct ret_jint { jint res; jint exc; } ret_jint; typedef struct ret_jboolean { jboolean res; jint exc; } ret_jboolean; typedef struct ret_jshort { jshort res; jint exc; } ret_jshort; typedef struct ret_jchar { jchar res; jint exc; } ret_jchar; typedef struct ret_jbyte { jbyte res; jint exc; } ret_jbyte; typedef struct ret_jlong { jlong res; jint exc; } ret_jlong; typedef struct ret_jfloat { jfloat res; jint exc; } ret_jfloat; typedef struct ret_jdouble { jdouble res; jint exc; } ret_jdouble; typedef struct ret_nstring { nstring res; jint exc; } ret_nstring; typedef struct ret_nbyteslice { nbyteslice res; jint exc; } ret_nbyteslice; extern jint cproxy_java_lang_Runnable_run(jint this); extern ret_jint cproxy_java_io_InputStream_read__(jint this); extern ret_jint cproxy_java_io_InputStream_read___3B(jint this, nbyteslice a0); extern ret_jint cproxy_java_io_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2); extern ret_nstring cproxy_java_io_InputStream_toString(jint this); extern ret_jint cproxy_java_util_concurrent_Future_get__(jint this); extern ret_jint cproxy_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1); extern ret_nstring cproxy_java_lang_Object_toString(jint this); extern ret_nstring cproxy_java_util_concurrent_TimeUnit_toString(jint this); extern ret_nstring cproxy_java_util_Spliterators_toString(jint this); extern ret_nstring cproxy_java_lang_System_toString(jint this); extern ret_jint cproxy_java_Future_get__(jint this); extern ret_jint csuper_java_Future_get__(jint this); extern ret_jint cproxy_java_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1); extern ret_jint csuper_java_Future_get__JLjava_util_concurrent_TimeUnit_2(jint this, jlong a0, jint a1); extern ret_jint cproxy_java_InputStream_read__(jint this); extern ret_jint csuper_java_InputStream_read__(jint this); extern ret_jint cproxy_java_InputStream_read___3B(jint this, nbyteslice a0); extern ret_jint csuper_java_InputStream_read___3B(jint this, nbyteslice a0); extern ret_jint cproxy_java_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2); extern ret_jint csuper_java_InputStream_read___3BII(jint this, nbyteslice a0, jint a1, jint a2); extern ret_nstring cproxy_java_InputStream_toString(jint this); extern ret_nstring csuper_java_InputStream_toString(jint this); extern ret_nstring cproxy_java_Object_toString(jint this); extern ret_nstring csuper_java_Object_toString(jint this); extern jint cproxy_java_Runnable_run(jint this); extern jint csuper_java_Runnable_run(jint this); extern jint cproxy_java_io_Console_flush(jint this); extern ret_nstring cproxy_java_io_Console_toString(jint this); extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2(jint a0); extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2(jint a0); extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2(jint a0); extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2(jint a0); extern ret_jint cproxy_s_java_lang_System_console(); // Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java classes #ifndef __Java_H__ #define __Java_H__ #include <jni.h> extern jclass proxy_class_java_Future; extern jmethodID proxy_class_java_Future_cons; extern jclass proxy_class_java_InputStream; extern jmethodID proxy_class_java_InputStream_cons; extern jclass proxy_class_java_Object; extern jmethodID proxy_class_java_Object_cons; extern jclass proxy_class_java_Runnable; extern jmethodID proxy_class_java_Runnable_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.objc.h.golden
// Objective-C API for talking to ignore Go package. // gobind -lang=objc ignore // // File is generated by gobind. Do not edit. #ifndef __Ignore_H__ #define __Ignore_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class IgnoreS; @protocol IgnoreI; @class IgnoreI; @protocol IgnoreI <NSObject> // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types @end @interface IgnoreS : NSObject <goSeqRefInterface, IgnoreI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; // skipped field S.F with unsupported type: interface{} // skipped method S.Argument with unsupported parameter or return types // skipped method S.Result with unsupported parameter or return types @end // skipped const Cuint with unsupported type: uint // skipped const Cuint32 with unsupported type: uint32 // skipped const Cuint64 with unsupported type: uint64 // skipped const NamedConst with unsupported type: ignore.NamedString @interface Ignore : NSObject // skipped variable C128 with unsupported type: complex128 // skipped variable C64 with unsupported type: complex64 // skipped variable Uint with unsupported type: uint // skipped variable Uint32 with unsupported type: uint32 // skipped variable Uint64 with unsupported type: uint64 // skipped variable V with unsupported type: interface{} // skipped variable Var with unsupported type: interface{} @end // skipped function Argument with unsupported parameter or return types // skipped function Result with unsupported parameter or return types @class IgnoreI; @interface IgnoreI : NSObject <goSeqRefInterface, IgnoreI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/objc.go.golden
// Code generated by gobind. DO NOT EDIT. package ObjC // Used to silence this package not used errors const Dummy = 0 type Foundation_NSString interface { } type Foundation_NSDate interface { } type Foundation_NSObjectC interface { } // Code generated by gobind. DO NOT EDIT. package main // #include "interfaces.h" import "C" import "ObjC" import _seq "golang.org/x/mobile/bind/seq" type proxy interface{ Bind_proxy_refnum__() int32 } // Suppress unused package error var _ = _seq.FromRefNum const _ = ObjC.Dummy func init() { } type proxy_class_NSString _seq.Ref func (p *proxy_class_NSString) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func init() { } type proxy_class_NSDate _seq.Ref func (p *proxy_class_NSDate) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func init() { } type proxy_class_NSObjectC _seq.Ref func (p *proxy_class_NSObjectC) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } // Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package objc. // // autogenerated by gobind -lang=go objc package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "objc.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum type proxyobjc_D _seq.Ref func (p *proxyobjc_D) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } type proxyobjc_O _seq.Ref func (p *proxyobjc_O) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } type proxyobjc_S _seq.Ref func (p *proxyobjc_S) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.objc.h.golden
// Objective-C API for talking to try Go package. // gobind -lang=objc try // // File is generated by gobind. Do not edit. #ifndef __Try_H__ #define __Try_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" FOUNDATION_EXPORT NSString* _Nonnull TryThis(void); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/underscores.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class underscore_pkg.Underscore_struct is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java underscores package underscore_pkg; import go.Seq; public final class Underscore_struct implements Seq.Proxy { static { Underscore_pkg.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } Underscore_struct(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public Underscore_struct() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native String getUnderscore_field(); public final native void setUnderscore_field(String v); @Override public boolean equals(Object o) { if (o == null || !(o instanceof Underscore_struct)) { return false; } Underscore_struct that = (Underscore_struct)o; String thisUnderscore_field = getUnderscore_field(); String thatUnderscore_field = that.getUnderscore_field(); if (thisUnderscore_field == null) { if (thatUnderscore_field != null) { return false; } } else if (!thisUnderscore_field.equals(thatUnderscore_field)) { return false; } return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {getUnderscore_field()}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("Underscore_struct").append("{"); b.append("Underscore_field:").append(getUnderscore_field()).append(","); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class underscore_pkg.Underscore_pkg is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java underscores package underscore_pkg; import go.Seq; public abstract class Underscore_pkg { static { Seq.touch(); // for loading the native library _init(); } private Underscore_pkg() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); public static native void setUnderscore_var(long v); public static native long getUnderscore_var(); public static native void underscore_func(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue10788 #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); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/ignore.objc.go.h.golden
// Objective-C API for talking to ignore Go package. // gobind -lang=objc ignore // // File is generated by gobind. Do not edit. #ifndef __GO_ignore_H__ #define __GO_ignore_H__ #include <stdint.h> #include <objc/objc.h> // skipped method I.Argument with unsupported parameter or return types // skipped method I.Result with unsupported parameter or return types #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.objc.go.h.golden
// Objective-C API for talking to try Go package. // gobind -lang=objc try // // File is generated by gobind. Do not edit. #ifndef __GO_try_H__ #define __GO_try_H__ #include <stdint.h> #include <objc/objc.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/customprefix.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java -javapkg=com.example customprefix #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "customprefix.h" JNIEXPORT void JNICALL Java_com_example_customprefix_Customprefix__1init(JNIEnv *env, jclass _unused) { jclass clazz; } JNIEXPORT void JNICALL Java_com_example_customprefix_Customprefix_f(JNIEnv* env, jclass _clazz) { proxycustomprefix__F(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/classes.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class java.Future is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java classes package java; import go.Seq; public final class Future implements Seq.GoObject, java.util.concurrent.Future { static { Java.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } Future(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public Future() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native java.util.concurrent.Future getFuture(); public final native void setFuture(java.util.concurrent.Future v); @Override public native java.lang.Object get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException; /** * Use a trailing underscore to override multiple overloaded methods. */ @Override public native java.lang.Object get(long p0, java.util.concurrent.TimeUnit p1) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException; } // Code generated by gobind. DO NOT EDIT. // Java class java.InputStream is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java classes package java; import go.Seq; public final class InputStream extends java.io.InputStream implements Seq.GoObject { static { Java.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } public InputStream() { super(); this.refnum = __NewInputStream(); Seq.trackGoRef(refnum, this); } private static native int __NewInputStream(); public final native java.io.InputStream getInputStream(); public final native void setInputStream(java.io.InputStream v); @Override public native int read() throws java.io.IOException; } // Code generated by gobind. DO NOT EDIT. // Java class java.Object is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java classes package java; import go.Seq; public final class Object extends java.lang.Object implements Seq.GoObject { static { Java.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } Object(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public Object() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native java.lang.Object getObject(); public final native void setObject(java.lang.Object v); } // Code generated by gobind. DO NOT EDIT. // Java class java.Runnable is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java classes package java; import go.Seq; public final class Runnable implements Seq.GoObject, java.lang.Runnable { static { Java.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } Runnable(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public Runnable() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native java.lang.Runnable getRunnable(); public final native void setRunnable(java.lang.Runnable v); @Override public native void run(); } // Code generated by gobind. DO NOT EDIT. // Java class java.Java is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java classes package java; import go.Seq; public abstract class Java { static { Seq.touch(); // for loading the native library _init(); } private Java() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); public static native InputStream newInputStream(); }