| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136 |
- // 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
- }
|