github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/classes.go.golden (about)

     1  // File is generated by gobind. Do not edit.
     2  
     3  package Runnable
     4  
     5  import "Java"
     6  
     7  const _ = Java.Dummy
     8  
     9  const (
    10  )
    11  
    12  var (
    13  	// Cast takes a proxy for a Java object and converts it to a java.lang.Runnable proxy.
    14  	// Cast panics if the argument is not a proxy or if the underlying object does
    15  	// not extend or implement java.lang.Runnable.
    16  	Cast func(v interface{}) Java.Java_lang_Runnable
    17  )
    18  
    19  // File is generated by gobind. Do not edit.
    20  
    21  package lang
    22  
    23  import "Java"
    24  
    25  const _ = Java.Dummy
    26  
    27  type Runnable Java.Java_lang_Runnable
    28  type Object Java.Java_lang_Object
    29  type System Java.Java_lang_System
    30  // File is generated by gobind. Do not edit.
    31  
    32  package InputStream
    33  
    34  import "Java"
    35  
    36  const _ = Java.Dummy
    37  
    38  const (
    39  )
    40  
    41  var (
    42  	// Cast takes a proxy for a Java object and converts it to a java.io.InputStream proxy.
    43  	// Cast panics if the argument is not a proxy or if the underlying object does
    44  	// not extend or implement java.io.InputStream.
    45  	Cast func(v interface{}) Java.Java_io_InputStream
    46  )
    47  
    48  // File is generated by gobind. Do not edit.
    49  
    50  package io
    51  
    52  import "Java"
    53  
    54  const _ = Java.Dummy
    55  
    56  type InputStream Java.Java_io_InputStream
    57  type Console Java.Java_io_Console
    58  // File is generated by gobind. Do not edit.
    59  
    60  package Future
    61  
    62  import "Java"
    63  
    64  const _ = Java.Dummy
    65  
    66  const (
    67  )
    68  
    69  var (
    70  	// Cast takes a proxy for a Java object and converts it to a java.util.concurrent.Future proxy.
    71  	// Cast panics if the argument is not a proxy or if the underlying object does
    72  	// not extend or implement java.util.concurrent.Future.
    73  	Cast func(v interface{}) Java.Java_util_concurrent_Future
    74  )
    75  
    76  // File is generated by gobind. Do not edit.
    77  
    78  package concurrent
    79  
    80  import "Java"
    81  
    82  const _ = Java.Dummy
    83  
    84  type Future Java.Java_util_concurrent_Future
    85  type TimeUnit Java.Java_util_concurrent_TimeUnit
    86  // File is generated by gobind. Do not edit.
    87  
    88  package Object
    89  
    90  import "Java"
    91  
    92  const _ = Java.Dummy
    93  
    94  const (
    95  )
    96  
    97  var (
    98  	// Cast takes a proxy for a Java object and converts it to a java.lang.Object proxy.
    99  	// Cast panics if the argument is not a proxy or if the underlying object does
   100  	// not extend or implement java.lang.Object.
   101  	Cast func(v interface{}) Java.Java_lang_Object
   102  )
   103  
   104  // File is generated by gobind. Do not edit.
   105  
   106  package TimeUnit
   107  
   108  import "Java"
   109  
   110  const _ = Java.Dummy
   111  
   112  const (
   113  )
   114  
   115  var (
   116  	// Cast takes a proxy for a Java object and converts it to a java.util.concurrent.TimeUnit proxy.
   117  	// Cast panics if the argument is not a proxy or if the underlying object does
   118  	// not extend or implement java.util.concurrent.TimeUnit.
   119  	Cast func(v interface{}) Java.Java_util_concurrent_TimeUnit
   120  )
   121  
   122  // File is generated by gobind. Do not edit.
   123  
   124  package Spliterators
   125  
   126  import "Java"
   127  
   128  const _ = Java.Dummy
   129  
   130  const (
   131  )
   132  
   133  var (
   134  	Iterator func(a0 Java.Java_util_Spliterator) Java.Java_util_Iterator
   135  	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterators proxy.
   136  	// Cast panics if the argument is not a proxy or if the underlying object does
   137  	// not extend or implement java.util.Spliterators.
   138  	Cast func(v interface{}) Java.Java_util_Spliterators
   139  )
   140  
   141  // File is generated by gobind. Do not edit.
   142  
   143  package util
   144  
   145  import "Java"
   146  
   147  const _ = Java.Dummy
   148  
   149  type Spliterators Java.Java_util_Spliterators
   150  type Iterator Java.Java_util_Iterator
   151  type Spliterator Java.Java_util_Spliterator
   152  // File is generated by gobind. Do not edit.
   153  
   154  package System
   155  
   156  import "Java"
   157  
   158  const _ = Java.Dummy
   159  
   160  const (
   161  )
   162  
   163  var (
   164  	Console func() Java.Java_io_Console
   165  	// Cast takes a proxy for a Java object and converts it to a java.lang.System proxy.
   166  	// Cast panics if the argument is not a proxy or if the underlying object does
   167  	// not extend or implement java.lang.System.
   168  	Cast func(v interface{}) Java.Java_lang_System
   169  )
   170  
   171  // File is generated by gobind. Do not edit.
   172  
   173  package Future
   174  
   175  import "Java"
   176  
   177  const _ = Java.Dummy
   178  
   179  const (
   180  )
   181  
   182  var (
   183  	// Cast takes a proxy for a Java object and converts it to a java.Future proxy.
   184  	// Cast panics if the argument is not a proxy or if the underlying object does
   185  	// not extend or implement java.Future.
   186  	Cast func(v interface{}) Java.Java_Future
   187  )
   188  
   189  // File is generated by gobind. Do not edit.
   190  
   191  package java
   192  
   193  import "Java"
   194  
   195  const _ = Java.Dummy
   196  
   197  type Future Java.Java_Future
   198  type InputStream Java.Java_InputStream
   199  type Object Java.Java_Object
   200  type Runnable Java.Java_Runnable
   201  // File is generated by gobind. Do not edit.
   202  
   203  package InputStream
   204  
   205  import "Java"
   206  
   207  const _ = Java.Dummy
   208  
   209  const (
   210  )
   211  
   212  var (
   213  	// Cast takes a proxy for a Java object and converts it to a java.InputStream proxy.
   214  	// Cast panics if the argument is not a proxy or if the underlying object does
   215  	// not extend or implement java.InputStream.
   216  	Cast func(v interface{}) Java.Java_InputStream
   217  )
   218  
   219  // File is generated by gobind. Do not edit.
   220  
   221  package Object
   222  
   223  import "Java"
   224  
   225  const _ = Java.Dummy
   226  
   227  const (
   228  )
   229  
   230  var (
   231  	// Cast takes a proxy for a Java object and converts it to a java.Object proxy.
   232  	// Cast panics if the argument is not a proxy or if the underlying object does
   233  	// not extend or implement java.Object.
   234  	Cast func(v interface{}) Java.Java_Object
   235  )
   236  
   237  // File is generated by gobind. Do not edit.
   238  
   239  package Runnable
   240  
   241  import "Java"
   242  
   243  const _ = Java.Dummy
   244  
   245  const (
   246  )
   247  
   248  var (
   249  	// Cast takes a proxy for a Java object and converts it to a java.Runnable proxy.
   250  	// Cast panics if the argument is not a proxy or if the underlying object does
   251  	// not extend or implement java.Runnable.
   252  	Cast func(v interface{}) Java.Java_Runnable
   253  )
   254  
   255  // File is generated by gobind. Do not edit.
   256  
   257  package Iterator
   258  
   259  import "Java"
   260  
   261  const _ = Java.Dummy
   262  
   263  const (
   264  )
   265  
   266  var (
   267  	// Cast takes a proxy for a Java object and converts it to a java.util.Iterator proxy.
   268  	// Cast panics if the argument is not a proxy or if the underlying object does
   269  	// not extend or implement java.util.Iterator.
   270  	Cast func(v interface{}) Java.Java_util_Iterator
   271  )
   272  
   273  // File is generated by gobind. Do not edit.
   274  
   275  package Spliterator
   276  
   277  import "Java"
   278  
   279  const _ = Java.Dummy
   280  
   281  type OfInt Java.Java_util_Spliterator_OfInt
   282  type OfLong Java.Java_util_Spliterator_OfLong
   283  type OfDouble Java.Java_util_Spliterator_OfDouble
   284  const (
   285  	ORDERED = 16
   286  	DISTINCT = 1
   287  	SORTED = 4
   288  	SIZED = 64
   289  	NONNULL = 256
   290  	IMMUTABLE = 1024
   291  	CONCURRENT = 4096
   292  	SUBSIZED = 16384
   293  )
   294  
   295  var (
   296  	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator proxy.
   297  	// Cast panics if the argument is not a proxy or if the underlying object does
   298  	// not extend or implement java.util.Spliterator.
   299  	Cast func(v interface{}) Java.Java_util_Spliterator
   300  )
   301  
   302  // File is generated by gobind. Do not edit.
   303  
   304  package OfInt
   305  
   306  import "Java"
   307  
   308  const _ = Java.Dummy
   309  
   310  const (
   311  )
   312  
   313  var (
   314  	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfInt proxy.
   315  	// Cast panics if the argument is not a proxy or if the underlying object does
   316  	// not extend or implement java.util.PrimitiveIterator.OfInt.
   317  	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfInt
   318  )
   319  
   320  // File is generated by gobind. Do not edit.
   321  
   322  package PrimitiveIterator
   323  
   324  import "Java"
   325  
   326  const _ = Java.Dummy
   327  
   328  type OfInt Java.Java_util_PrimitiveIterator_OfInt
   329  type OfLong Java.Java_util_PrimitiveIterator_OfLong
   330  type OfDouble Java.Java_util_PrimitiveIterator_OfDouble
   331  // File is generated by gobind. Do not edit.
   332  
   333  package OfInt
   334  
   335  import "Java"
   336  
   337  const _ = Java.Dummy
   338  
   339  const (
   340  )
   341  
   342  var (
   343  	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfInt proxy.
   344  	// Cast panics if the argument is not a proxy or if the underlying object does
   345  	// not extend or implement java.util.Spliterator.OfInt.
   346  	Cast func(v interface{}) Java.Java_util_Spliterator_OfInt
   347  )
   348  
   349  // File is generated by gobind. Do not edit.
   350  
   351  package OfLong
   352  
   353  import "Java"
   354  
   355  const _ = Java.Dummy
   356  
   357  const (
   358  )
   359  
   360  var (
   361  	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfLong proxy.
   362  	// Cast panics if the argument is not a proxy or if the underlying object does
   363  	// not extend or implement java.util.PrimitiveIterator.OfLong.
   364  	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfLong
   365  )
   366  
   367  // File is generated by gobind. Do not edit.
   368  
   369  package OfLong
   370  
   371  import "Java"
   372  
   373  const _ = Java.Dummy
   374  
   375  const (
   376  )
   377  
   378  var (
   379  	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfLong proxy.
   380  	// Cast panics if the argument is not a proxy or if the underlying object does
   381  	// not extend or implement java.util.Spliterator.OfLong.
   382  	Cast func(v interface{}) Java.Java_util_Spliterator_OfLong
   383  )
   384  
   385  // File is generated by gobind. Do not edit.
   386  
   387  package OfDouble
   388  
   389  import "Java"
   390  
   391  const _ = Java.Dummy
   392  
   393  const (
   394  )
   395  
   396  var (
   397  	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfDouble proxy.
   398  	// Cast panics if the argument is not a proxy or if the underlying object does
   399  	// not extend or implement java.util.PrimitiveIterator.OfDouble.
   400  	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfDouble
   401  )
   402  
   403  // File is generated by gobind. Do not edit.
   404  
   405  package OfDouble
   406  
   407  import "Java"
   408  
   409  const _ = Java.Dummy
   410  
   411  const (
   412  )
   413  
   414  var (
   415  	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfDouble proxy.
   416  	// Cast panics if the argument is not a proxy or if the underlying object does
   417  	// not extend or implement java.util.Spliterator.OfDouble.
   418  	Cast func(v interface{}) Java.Java_util_Spliterator_OfDouble
   419  )
   420  
   421  // File is generated by gobind. Do not edit.
   422  
   423  package Console
   424  
   425  import "Java"
   426  
   427  const _ = Java.Dummy
   428  
   429  const (
   430  )
   431  
   432  var (
   433  	// Cast takes a proxy for a Java object and converts it to a java.io.Console proxy.
   434  	// Cast panics if the argument is not a proxy or if the underlying object does
   435  	// not extend or implement java.io.Console.
   436  	Cast func(v interface{}) Java.Java_io_Console
   437  )
   438  
   439  // File is generated by gobind. Do not edit.
   440  
   441  package Java
   442  
   443  // Used to silence this package not used errors
   444  const Dummy = 0
   445  
   446  type Java_lang_Runnable interface {
   447  	Run()
   448  }
   449  
   450  type Java_io_InputStream interface {
   451  	Read(a0 ...interface{}) (int32, error)
   452  	ToString() string
   453  }
   454  
   455  type Java_util_concurrent_Future interface {
   456  	Get(a0 ...interface{}) (Java_lang_Object, error)
   457  }
   458  
   459  type Java_lang_Object interface {
   460  	ToString() string
   461  }
   462  
   463  type Java_util_concurrent_TimeUnit interface {
   464  	ToString() string
   465  }
   466  
   467  type Java_util_Spliterators interface {
   468  	ToString() string
   469  }
   470  
   471  type Java_lang_System interface {
   472  	ToString() string
   473  }
   474  
   475  type Java_Future interface {
   476  	Get(a0 ...interface{}) (Java_lang_Object, error)
   477  	Super() Java_Future
   478  	// Unwrap returns the Go object this Java instance
   479  	// is wrapping.
   480  	// The return value is a java.Future, but the delclared type is
   481  	// interface{} to avoid import cycles.
   482  	Unwrap() interface{}
   483  }
   484  
   485  type Java_InputStream interface {
   486  	Read(a0 ...interface{}) (int32, error)
   487  	ToString() string
   488  	Super() Java_InputStream
   489  	// Unwrap returns the Go object this Java instance
   490  	// is wrapping.
   491  	// The return value is a java.InputStream, but the delclared type is
   492  	// interface{} to avoid import cycles.
   493  	Unwrap() interface{}
   494  }
   495  
   496  type Java_Object interface {
   497  	ToString() string
   498  	Super() Java_Object
   499  	// Unwrap returns the Go object this Java instance
   500  	// is wrapping.
   501  	// The return value is a java.Object, but the delclared type is
   502  	// interface{} to avoid import cycles.
   503  	Unwrap() interface{}
   504  }
   505  
   506  type Java_Runnable interface {
   507  	Run()
   508  	Super() Java_Runnable
   509  	// Unwrap returns the Go object this Java instance
   510  	// is wrapping.
   511  	// The return value is a java.Runnable, but the delclared type is
   512  	// interface{} to avoid import cycles.
   513  	Unwrap() interface{}
   514  }
   515  
   516  type Java_util_Iterator interface {
   517  }
   518  
   519  type Java_util_Spliterator interface {
   520  }
   521  
   522  type Java_util_PrimitiveIterator_OfInt interface {
   523  }
   524  
   525  type Java_util_Spliterator_OfInt interface {
   526  }
   527  
   528  type Java_util_PrimitiveIterator_OfLong interface {
   529  }
   530  
   531  type Java_util_Spliterator_OfLong interface {
   532  }
   533  
   534  type Java_util_PrimitiveIterator_OfDouble interface {
   535  }
   536  
   537  type Java_util_Spliterator_OfDouble interface {
   538  }
   539  
   540  type Java_io_Console interface {
   541  	Flush() error
   542  	ToString() string
   543  }
   544  
   545  // File is generated by gobind. Do not edit.
   546  
   547  package main
   548  
   549  /*
   550  #include <stdlib.h> // for free()
   551  #include <jni.h>
   552  #include "seq.h"
   553  #include "classes.h"
   554  */
   555  import "C"
   556  
   557  import (
   558  	"Java"
   559  	_seq "github.com/thommil/tge-mobile/bind/seq"
   560  )
   561  
   562  import "Java/java/lang/Runnable"
   563  import "Java/java/io/InputStream"
   564  import "Java/java/util/concurrent/Future"
   565  import "Java/java/lang/Object"
   566  import "Java/java/util/concurrent/TimeUnit"
   567  import "Java/java/util/Spliterators"
   568  import "Java/java/lang/System"
   569  import "Java/java/Future"
   570  import "Java/java/InputStream"
   571  import "Java/java/Object"
   572  import "Java/java/Runnable"
   573  import "Java/java/util/Iterator"
   574  import "Java/java/util/Spliterator"
   575  import "Java/java/util/PrimitiveIterator/OfInt"
   576  import "Java/java/util/Spliterator/OfInt"
   577  import "Java/java/util/PrimitiveIterator/OfLong"
   578  import "Java/java/util/Spliterator/OfLong"
   579  import "Java/java/util/PrimitiveIterator/OfDouble"
   580  import "Java/java/util/Spliterator/OfDouble"
   581  import "Java/java/io/Console"
   582  import "testdata"
   583  import "unsafe"
   584  
   585  import "reflect"
   586  
   587  import "fmt"
   588  
   589  type proxy interface { Bind_proxy_refnum__() int32 }
   590  
   591  // Suppress unused package error
   592  
   593  var _ = _seq.FromRefNum
   594  const _ = Java.Dummy
   595  
   596  //export initClasses
   597  func initClasses() {
   598  	C.init_proxies()
   599  	init_java_lang_Runnable()
   600  	init_java_io_InputStream()
   601  	init_java_util_concurrent_Future()
   602  	init_java_lang_Object()
   603  	init_java_util_concurrent_TimeUnit()
   604  	init_java_util_Spliterators()
   605  	init_java_lang_System()
   606  	init_java_Future()
   607  	init_java_InputStream()
   608  	init_java_Object()
   609  	init_java_Runnable()
   610  	init_java_util_Iterator()
   611  	init_java_util_Spliterator()
   612  	init_java_util_PrimitiveIterator_OfInt()
   613  	init_java_util_Spliterator_OfInt()
   614  	init_java_util_PrimitiveIterator_OfLong()
   615  	init_java_util_Spliterator_OfLong()
   616  	init_java_util_PrimitiveIterator_OfDouble()
   617  	init_java_util_Spliterator_OfDouble()
   618  	init_java_io_Console()
   619  }
   620  
   621  var class_java_lang_Runnable C.jclass
   622  
   623  func init_java_lang_Runnable() {
   624  	cls := C.CString("java/lang/Runnable")
   625  	clazz := C.go_seq_find_class(cls)
   626  	C.free(unsafe.Pointer(cls))
   627  	if uintptr(clazz) == 0 {
   628  		return
   629  	}
   630  	class_java_lang_Runnable = clazz
   631  	Runnable.Cast = func(v interface{}) Java.Java_lang_Runnable {
   632  		t := reflect.TypeOf((*proxy_class_java_lang_Runnable)(nil))
   633  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Runnable)
   634  		ref := C.jint(_seq.ToRefNum(cv))
   635  		if C.go_seq_isinstanceof(ref, class_java_lang_Runnable) != 1 {
   636  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Runnable"))
   637  		}
   638  		return cv
   639  	}
   640  }
   641  
   642  type proxy_class_java_lang_Runnable _seq.Ref
   643  
   644  func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
   645  
   646  func (p *proxy_class_java_lang_Runnable) Run() {
   647  	res := C.cproxy_java_lang_Runnable_run(C.jint(p.Bind_proxy_refnum__()))
   648  	var _exc error
   649  	_exc_ref := _seq.FromRefNum(int32(res))
   650  	if _exc_ref != nil {
   651  		if res < 0 { // go object
   652  			_exc = _exc_ref.Get().(error)
   653  		} else { // foreign object
   654  			_exc = (*proxy_error)(_exc_ref)
   655  		}
   656  	}
   657  	if (_exc != nil) { panic(_exc) }
   658  }
   659  
   660  var class_java_io_InputStream C.jclass
   661  
   662  func init_java_io_InputStream() {
   663  	cls := C.CString("java/io/InputStream")
   664  	clazz := C.go_seq_find_class(cls)
   665  	C.free(unsafe.Pointer(cls))
   666  	if uintptr(clazz) == 0 {
   667  		return
   668  	}
   669  	class_java_io_InputStream = clazz
   670  	InputStream.Cast = func(v interface{}) Java.Java_io_InputStream {
   671  		t := reflect.TypeOf((*proxy_class_java_io_InputStream)(nil))
   672  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_io_InputStream)
   673  		ref := C.jint(_seq.ToRefNum(cv))
   674  		if C.go_seq_isinstanceof(ref, class_java_io_InputStream) != 1 {
   675  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.io.InputStream"))
   676  		}
   677  		return cv
   678  	}
   679  }
   680  
   681  type proxy_class_java_io_InputStream _seq.Ref
   682  
   683  func (p *proxy_class_java_io_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
   684  
   685  func (p *proxy_class_java_io_InputStream) Read(a0 ...interface{}) (int32, error) {
   686  	switch 0 + len(a0) {
   687  	case 0:
   688  		res := C.cproxy_java_io_InputStream_read__(C.jint(p.Bind_proxy_refnum__()))
   689  		_res := int32(res.res)
   690  		var _exc error
   691  		_exc_ref := _seq.FromRefNum(int32(res.exc))
   692  		if _exc_ref != nil {
   693  			if res.exc < 0 { // go object
   694  				_exc = _exc_ref.Get().(error)
   695  			} else { // foreign object
   696  				_exc = (*proxy_error)(_exc_ref)
   697  			}
   698  		}
   699  		return _res, _exc
   700  	case 1:
   701  		_a0, ok0 := a0[0].([]byte)
   702  		if ok0 {
   703  			__a0 := fromSlice(_a0, false)
   704  			res := C.cproxy_java_io_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0)
   705  			_res := int32(res.res)
   706  			var _exc error
   707  			_exc_ref := _seq.FromRefNum(int32(res.exc))
   708  			if _exc_ref != nil {
   709  				if res.exc < 0 { // go object
   710  					_exc = _exc_ref.Get().(error)
   711  				} else { // foreign object
   712  					_exc = (*proxy_error)(_exc_ref)
   713  				}
   714  			}
   715  			return _res, _exc
   716  		}
   717  	case 3:
   718  		_a0, ok0 := a0[0].([]byte)
   719  		_a1, ok1 := a0[1].(int32)
   720  		_a2, ok2 := a0[2].(int32)
   721  		if ok0 && ok1 && ok2 {
   722  			__a0 := fromSlice(_a0, false)
   723  			__a1 := C.jint(_a1)
   724  			__a2 := C.jint(_a2)
   725  			res := C.cproxy_java_io_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2)
   726  			_res := int32(res.res)
   727  			var _exc error
   728  			_exc_ref := _seq.FromRefNum(int32(res.exc))
   729  			if _exc_ref != nil {
   730  				if res.exc < 0 { // go object
   731  					_exc = _exc_ref.Get().(error)
   732  				} else { // foreign object
   733  					_exc = (*proxy_error)(_exc_ref)
   734  				}
   735  			}
   736  			return _res, _exc
   737  		}
   738  	}
   739  	panic("no overloaded method found for java.io.InputStream.read that matched the arguments")
   740  }
   741  
   742  func (p *proxy_class_java_io_InputStream) ToString() string {
   743  	res := C.cproxy_java_io_InputStream_toString(C.jint(p.Bind_proxy_refnum__()))
   744  	_res := decodeString(res.res)
   745  	var _exc error
   746  	_exc_ref := _seq.FromRefNum(int32(res.exc))
   747  	if _exc_ref != nil {
   748  		if res.exc < 0 { // go object
   749  			_exc = _exc_ref.Get().(error)
   750  		} else { // foreign object
   751  			_exc = (*proxy_error)(_exc_ref)
   752  		}
   753  	}
   754  	if (_exc != nil) { panic(_exc) }
   755  	return _res
   756  }
   757  
   758  var class_java_util_concurrent_Future C.jclass
   759  
   760  func init_java_util_concurrent_Future() {
   761  	cls := C.CString("java/util/concurrent/Future")
   762  	clazz := C.go_seq_find_class(cls)
   763  	C.free(unsafe.Pointer(cls))
   764  	if uintptr(clazz) == 0 {
   765  		return
   766  	}
   767  	class_java_util_concurrent_Future = clazz
   768  	Future.Cast = func(v interface{}) Java.Java_util_concurrent_Future {
   769  		t := reflect.TypeOf((*proxy_class_java_util_concurrent_Future)(nil))
   770  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_concurrent_Future)
   771  		ref := C.jint(_seq.ToRefNum(cv))
   772  		if C.go_seq_isinstanceof(ref, class_java_util_concurrent_Future) != 1 {
   773  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.concurrent.Future"))
   774  		}
   775  		return cv
   776  	}
   777  }
   778  
   779  type proxy_class_java_util_concurrent_Future _seq.Ref
   780  
   781  func (p *proxy_class_java_util_concurrent_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
   782  
   783  func (p *proxy_class_java_util_concurrent_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) {
   784  	switch 0 + len(a0) {
   785  	case 0:
   786  		res := C.cproxy_java_util_concurrent_Future_get__(C.jint(p.Bind_proxy_refnum__()))
   787  		var _res Java.Java_lang_Object
   788  		_res_ref := _seq.FromRefNum(int32(res.res))
   789  		if _res_ref != nil {
   790  			if res.res < 0 { // go object
   791  				_res = _res_ref.Get().(Java.Java_lang_Object)
   792  			} else { // foreign object
   793  				_res = (*proxy_class_java_lang_Object)(_res_ref)
   794  			}
   795  		}
   796  		var _exc error
   797  		_exc_ref := _seq.FromRefNum(int32(res.exc))
   798  		if _exc_ref != nil {
   799  			if res.exc < 0 { // go object
   800  				_exc = _exc_ref.Get().(error)
   801  			} else { // foreign object
   802  				_exc = (*proxy_error)(_exc_ref)
   803  			}
   804  		}
   805  		return _res, _exc
   806  	case 2:
   807  		_a0, ok0 := a0[0].(int64)
   808  		_a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit)
   809  		if ok0 && ok1 {
   810  			__a0 := C.jlong(_a0)
   811  			var __a1 C.jint = _seq.NullRefNum
   812  			if _a1 != nil {
   813  				__a1 = C.jint(_seq.ToRefNum(_a1))
   814  			}
   815  			res := C.cproxy_java_util_concurrent_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1)
   816  			var _res Java.Java_lang_Object
   817  			_res_ref := _seq.FromRefNum(int32(res.res))
   818  			if _res_ref != nil {
   819  				if res.res < 0 { // go object
   820  					_res = _res_ref.Get().(Java.Java_lang_Object)
   821  				} else { // foreign object
   822  					_res = (*proxy_class_java_lang_Object)(_res_ref)
   823  				}
   824  			}
   825  			var _exc error
   826  			_exc_ref := _seq.FromRefNum(int32(res.exc))
   827  			if _exc_ref != nil {
   828  				if res.exc < 0 { // go object
   829  					_exc = _exc_ref.Get().(error)
   830  				} else { // foreign object
   831  					_exc = (*proxy_error)(_exc_ref)
   832  				}
   833  			}
   834  			return _res, _exc
   835  		}
   836  	}
   837  	panic("no overloaded method found for java.util.concurrent.Future.get that matched the arguments")
   838  }
   839  
   840  var class_java_lang_Object C.jclass
   841  
   842  func init_java_lang_Object() {
   843  	cls := C.CString("java/lang/Object")
   844  	clazz := C.go_seq_find_class(cls)
   845  	C.free(unsafe.Pointer(cls))
   846  	if uintptr(clazz) == 0 {
   847  		return
   848  	}
   849  	class_java_lang_Object = clazz
   850  	Object.Cast = func(v interface{}) Java.Java_lang_Object {
   851  		t := reflect.TypeOf((*proxy_class_java_lang_Object)(nil))
   852  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Object)
   853  		ref := C.jint(_seq.ToRefNum(cv))
   854  		if C.go_seq_isinstanceof(ref, class_java_lang_Object) != 1 {
   855  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Object"))
   856  		}
   857  		return cv
   858  	}
   859  }
   860  
   861  type proxy_class_java_lang_Object _seq.Ref
   862  
   863  func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
   864  
   865  func (p *proxy_class_java_lang_Object) ToString() string {
   866  	res := C.cproxy_java_lang_Object_toString(C.jint(p.Bind_proxy_refnum__()))
   867  	_res := decodeString(res.res)
   868  	var _exc error
   869  	_exc_ref := _seq.FromRefNum(int32(res.exc))
   870  	if _exc_ref != nil {
   871  		if res.exc < 0 { // go object
   872  			_exc = _exc_ref.Get().(error)
   873  		} else { // foreign object
   874  			_exc = (*proxy_error)(_exc_ref)
   875  		}
   876  	}
   877  	if (_exc != nil) { panic(_exc) }
   878  	return _res
   879  }
   880  
   881  var class_java_util_concurrent_TimeUnit C.jclass
   882  
   883  func init_java_util_concurrent_TimeUnit() {
   884  	cls := C.CString("java/util/concurrent/TimeUnit")
   885  	clazz := C.go_seq_find_class(cls)
   886  	C.free(unsafe.Pointer(cls))
   887  	if uintptr(clazz) == 0 {
   888  		return
   889  	}
   890  	class_java_util_concurrent_TimeUnit = clazz
   891  	TimeUnit.Cast = func(v interface{}) Java.Java_util_concurrent_TimeUnit {
   892  		t := reflect.TypeOf((*proxy_class_java_util_concurrent_TimeUnit)(nil))
   893  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_concurrent_TimeUnit)
   894  		ref := C.jint(_seq.ToRefNum(cv))
   895  		if C.go_seq_isinstanceof(ref, class_java_util_concurrent_TimeUnit) != 1 {
   896  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.concurrent.TimeUnit"))
   897  		}
   898  		return cv
   899  	}
   900  }
   901  
   902  type proxy_class_java_util_concurrent_TimeUnit _seq.Ref
   903  
   904  func (p *proxy_class_java_util_concurrent_TimeUnit) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
   905  
   906  func (p *proxy_class_java_util_concurrent_TimeUnit) ToString() string {
   907  	res := C.cproxy_java_util_concurrent_TimeUnit_toString(C.jint(p.Bind_proxy_refnum__()))
   908  	_res := decodeString(res.res)
   909  	var _exc error
   910  	_exc_ref := _seq.FromRefNum(int32(res.exc))
   911  	if _exc_ref != nil {
   912  		if res.exc < 0 { // go object
   913  			_exc = _exc_ref.Get().(error)
   914  		} else { // foreign object
   915  			_exc = (*proxy_error)(_exc_ref)
   916  		}
   917  	}
   918  	if (_exc != nil) { panic(_exc) }
   919  	return _res
   920  }
   921  
   922  var class_java_util_Spliterators C.jclass
   923  
   924  func init_java_util_Spliterators() {
   925  	cls := C.CString("java/util/Spliterators")
   926  	clazz := C.go_seq_find_class(cls)
   927  	C.free(unsafe.Pointer(cls))
   928  	if uintptr(clazz) == 0 {
   929  		return
   930  	}
   931  	class_java_util_Spliterators = clazz
   932  	Spliterators.Iterator = func(a0 Java.Java_util_Spliterator) Java.Java_util_Iterator {
   933  		{
   934  			var __a0 C.jint = _seq.NullRefNum
   935  			if a0 != nil {
   936  				__a0 = C.jint(_seq.ToRefNum(a0))
   937  			}
   938  			res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_2(__a0)
   939  			var _res Java.Java_util_Iterator
   940  			_res_ref := _seq.FromRefNum(int32(res.res))
   941  			if _res_ref != nil {
   942  				if res.res < 0 { // go object
   943  					_res = _res_ref.Get().(Java.Java_util_Iterator)
   944  				} else { // foreign object
   945  					_res = (*proxy_class_java_util_Iterator)(_res_ref)
   946  				}
   947  			}
   948  			var _exc error
   949  			_exc_ref := _seq.FromRefNum(int32(res.exc))
   950  			if _exc_ref != nil {
   951  				if res.exc < 0 { // go object
   952  					_exc = _exc_ref.Get().(error)
   953  				} else { // foreign object
   954  					_exc = (*proxy_error)(_exc_ref)
   955  				}
   956  			}
   957  			if (_exc != nil) { panic(_exc) }
   958  			return _res
   959  		}
   960  		{
   961  			_a0, ok0 := a0.(Java.Java_util_Spliterator_OfInt)
   962  			if ok0 {
   963  				var __a0 C.jint = _seq.NullRefNum
   964  				if _a0 != nil {
   965  					__a0 = C.jint(_seq.ToRefNum(_a0))
   966  				}
   967  				res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfInt_2(__a0)
   968  				var _res Java.Java_util_PrimitiveIterator_OfInt
   969  				_res_ref := _seq.FromRefNum(int32(res.res))
   970  				if _res_ref != nil {
   971  					if res.res < 0 { // go object
   972  						_res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfInt)
   973  					} else { // foreign object
   974  						_res = (*proxy_class_java_util_PrimitiveIterator_OfInt)(_res_ref)
   975  					}
   976  				}
   977  				var _exc error
   978  				_exc_ref := _seq.FromRefNum(int32(res.exc))
   979  				if _exc_ref != nil {
   980  					if res.exc < 0 { // go object
   981  						_exc = _exc_ref.Get().(error)
   982  					} else { // foreign object
   983  						_exc = (*proxy_error)(_exc_ref)
   984  					}
   985  				}
   986  				if (_exc != nil) { panic(_exc) }
   987  				return _res
   988  			}
   989  		}
   990  		{
   991  			_a0, ok0 := a0.(Java.Java_util_Spliterator_OfLong)
   992  			if ok0 {
   993  				var __a0 C.jint = _seq.NullRefNum
   994  				if _a0 != nil {
   995  					__a0 = C.jint(_seq.ToRefNum(_a0))
   996  				}
   997  				res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2(__a0)
   998  				var _res Java.Java_util_PrimitiveIterator_OfLong
   999  				_res_ref := _seq.FromRefNum(int32(res.res))
  1000  				if _res_ref != nil {
  1001  					if res.res < 0 { // go object
  1002  						_res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfLong)
  1003  					} else { // foreign object
  1004  						_res = (*proxy_class_java_util_PrimitiveIterator_OfLong)(_res_ref)
  1005  					}
  1006  				}
  1007  				var _exc error
  1008  				_exc_ref := _seq.FromRefNum(int32(res.exc))
  1009  				if _exc_ref != nil {
  1010  					if res.exc < 0 { // go object
  1011  						_exc = _exc_ref.Get().(error)
  1012  					} else { // foreign object
  1013  						_exc = (*proxy_error)(_exc_ref)
  1014  					}
  1015  				}
  1016  				if (_exc != nil) { panic(_exc) }
  1017  				return _res
  1018  			}
  1019  		}
  1020  		{
  1021  			_a0, ok0 := a0.(Java.Java_util_Spliterator_OfDouble)
  1022  			if ok0 {
  1023  				var __a0 C.jint = _seq.NullRefNum
  1024  				if _a0 != nil {
  1025  					__a0 = C.jint(_seq.ToRefNum(_a0))
  1026  				}
  1027  				res := C.cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2(__a0)
  1028  				var _res Java.Java_util_PrimitiveIterator_OfDouble
  1029  				_res_ref := _seq.FromRefNum(int32(res.res))
  1030  				if _res_ref != nil {
  1031  					if res.res < 0 { // go object
  1032  						_res = _res_ref.Get().(Java.Java_util_PrimitiveIterator_OfDouble)
  1033  					} else { // foreign object
  1034  						_res = (*proxy_class_java_util_PrimitiveIterator_OfDouble)(_res_ref)
  1035  					}
  1036  				}
  1037  				var _exc error
  1038  				_exc_ref := _seq.FromRefNum(int32(res.exc))
  1039  				if _exc_ref != nil {
  1040  					if res.exc < 0 { // go object
  1041  						_exc = _exc_ref.Get().(error)
  1042  					} else { // foreign object
  1043  						_exc = (*proxy_error)(_exc_ref)
  1044  					}
  1045  				}
  1046  				if (_exc != nil) { panic(_exc) }
  1047  				return _res
  1048  			}
  1049  		}
  1050  		panic("no overloaded method found for java.util.Spliterators.iterator that matched the arguments")
  1051  	}
  1052  	
  1053  	Spliterators.Cast = func(v interface{}) Java.Java_util_Spliterators {
  1054  		t := reflect.TypeOf((*proxy_class_java_util_Spliterators)(nil))
  1055  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterators)
  1056  		ref := C.jint(_seq.ToRefNum(cv))
  1057  		if C.go_seq_isinstanceof(ref, class_java_util_Spliterators) != 1 {
  1058  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterators"))
  1059  		}
  1060  		return cv
  1061  	}
  1062  }
  1063  
  1064  type proxy_class_java_util_Spliterators _seq.Ref
  1065  
  1066  func (p *proxy_class_java_util_Spliterators) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1067  
  1068  func (p *proxy_class_java_util_Spliterators) ToString() string {
  1069  	res := C.cproxy_java_util_Spliterators_toString(C.jint(p.Bind_proxy_refnum__()))
  1070  	_res := decodeString(res.res)
  1071  	var _exc error
  1072  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1073  	if _exc_ref != nil {
  1074  		if res.exc < 0 { // go object
  1075  			_exc = _exc_ref.Get().(error)
  1076  		} else { // foreign object
  1077  			_exc = (*proxy_error)(_exc_ref)
  1078  		}
  1079  	}
  1080  	if (_exc != nil) { panic(_exc) }
  1081  	return _res
  1082  }
  1083  
  1084  var class_java_lang_System C.jclass
  1085  
  1086  func init_java_lang_System() {
  1087  	cls := C.CString("java/lang/System")
  1088  	clazz := C.go_seq_find_class(cls)
  1089  	C.free(unsafe.Pointer(cls))
  1090  	if uintptr(clazz) == 0 {
  1091  		return
  1092  	}
  1093  	class_java_lang_System = clazz
  1094  	System.Console = func() Java.Java_io_Console {
  1095  		res := C.cproxy_s_java_lang_System_console()
  1096  		var _res Java.Java_io_Console
  1097  		_res_ref := _seq.FromRefNum(int32(res.res))
  1098  		if _res_ref != nil {
  1099  			if res.res < 0 { // go object
  1100  				_res = _res_ref.Get().(Java.Java_io_Console)
  1101  			} else { // foreign object
  1102  				_res = (*proxy_class_java_io_Console)(_res_ref)
  1103  			}
  1104  		}
  1105  		var _exc error
  1106  		_exc_ref := _seq.FromRefNum(int32(res.exc))
  1107  		if _exc_ref != nil {
  1108  			if res.exc < 0 { // go object
  1109  				_exc = _exc_ref.Get().(error)
  1110  			} else { // foreign object
  1111  				_exc = (*proxy_error)(_exc_ref)
  1112  			}
  1113  		}
  1114  		if (_exc != nil) { panic(_exc) }
  1115  		return _res
  1116  	}
  1117  	
  1118  	System.Cast = func(v interface{}) Java.Java_lang_System {
  1119  		t := reflect.TypeOf((*proxy_class_java_lang_System)(nil))
  1120  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_System)
  1121  		ref := C.jint(_seq.ToRefNum(cv))
  1122  		if C.go_seq_isinstanceof(ref, class_java_lang_System) != 1 {
  1123  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.System"))
  1124  		}
  1125  		return cv
  1126  	}
  1127  }
  1128  
  1129  type proxy_class_java_lang_System _seq.Ref
  1130  
  1131  func (p *proxy_class_java_lang_System) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1132  
  1133  func (p *proxy_class_java_lang_System) ToString() string {
  1134  	res := C.cproxy_java_lang_System_toString(C.jint(p.Bind_proxy_refnum__()))
  1135  	_res := decodeString(res.res)
  1136  	var _exc error
  1137  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1138  	if _exc_ref != nil {
  1139  		if res.exc < 0 { // go object
  1140  			_exc = _exc_ref.Get().(error)
  1141  		} else { // foreign object
  1142  			_exc = (*proxy_error)(_exc_ref)
  1143  		}
  1144  	}
  1145  	if (_exc != nil) { panic(_exc) }
  1146  	return _res
  1147  }
  1148  
  1149  var class_java_Future C.jclass
  1150  
  1151  func init_java_Future() {
  1152  	cls := C.CString("java/Future")
  1153  	clazz := C.go_seq_find_class(cls)
  1154  	C.free(unsafe.Pointer(cls))
  1155  	if uintptr(clazz) == 0 {
  1156  		return
  1157  	}
  1158  	class_java_Future = clazz
  1159  	Future.Cast = func(v interface{}) Java.Java_Future {
  1160  		t := reflect.TypeOf((*proxy_class_java_Future)(nil))
  1161  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Future)
  1162  		ref := C.jint(_seq.ToRefNum(cv))
  1163  		if C.go_seq_isinstanceof(ref, class_java_Future) != 1 {
  1164  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.Future"))
  1165  		}
  1166  		return cv
  1167  	}
  1168  }
  1169  
  1170  type proxy_class_java_Future _seq.Ref
  1171  
  1172  func (p *proxy_class_java_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1173  
  1174  func (p *proxy_class_java_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) {
  1175  	switch 0 + len(a0) {
  1176  	case 0:
  1177  		res := C.cproxy_java_Future_get__(C.jint(p.Bind_proxy_refnum__()))
  1178  		var _res Java.Java_lang_Object
  1179  		_res_ref := _seq.FromRefNum(int32(res.res))
  1180  		if _res_ref != nil {
  1181  			if res.res < 0 { // go object
  1182  				_res = _res_ref.Get().(Java.Java_lang_Object)
  1183  			} else { // foreign object
  1184  				_res = (*proxy_class_java_lang_Object)(_res_ref)
  1185  			}
  1186  		}
  1187  		var _exc error
  1188  		_exc_ref := _seq.FromRefNum(int32(res.exc))
  1189  		if _exc_ref != nil {
  1190  			if res.exc < 0 { // go object
  1191  				_exc = _exc_ref.Get().(error)
  1192  			} else { // foreign object
  1193  				_exc = (*proxy_error)(_exc_ref)
  1194  			}
  1195  		}
  1196  		return _res, _exc
  1197  	case 2:
  1198  		_a0, ok0 := a0[0].(int64)
  1199  		_a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit)
  1200  		if ok0 && ok1 {
  1201  			__a0 := C.jlong(_a0)
  1202  			var __a1 C.jint = _seq.NullRefNum
  1203  			if _a1 != nil {
  1204  				__a1 = C.jint(_seq.ToRefNum(_a1))
  1205  			}
  1206  			res := C.cproxy_java_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1)
  1207  			var _res Java.Java_lang_Object
  1208  			_res_ref := _seq.FromRefNum(int32(res.res))
  1209  			if _res_ref != nil {
  1210  				if res.res < 0 { // go object
  1211  					_res = _res_ref.Get().(Java.Java_lang_Object)
  1212  				} else { // foreign object
  1213  					_res = (*proxy_class_java_lang_Object)(_res_ref)
  1214  				}
  1215  			}
  1216  			var _exc error
  1217  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1218  			if _exc_ref != nil {
  1219  				if res.exc < 0 { // go object
  1220  					_exc = _exc_ref.Get().(error)
  1221  				} else { // foreign object
  1222  					_exc = (*proxy_error)(_exc_ref)
  1223  				}
  1224  			}
  1225  			return _res, _exc
  1226  		}
  1227  	}
  1228  	panic("no overloaded method found for java.Future.get that matched the arguments")
  1229  }
  1230  
  1231  func (p *proxy_class_java_Future) Super() Java.Java_Future {
  1232  	return &super_java_Future{p}
  1233  }
  1234  
  1235  type super_java_Future struct {*proxy_class_java_Future}
  1236  
  1237  func (p *proxy_class_java_Future) Unwrap() interface{} {
  1238  	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
  1239  	return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Future)
  1240  }
  1241  
  1242  func (p *super_java_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) {
  1243  	switch 0 + len(a0) {
  1244  	case 0:
  1245  		res := C.csuper_java_Future_get__(C.jint(p.Bind_proxy_refnum__()))
  1246  		var _res Java.Java_lang_Object
  1247  		_res_ref := _seq.FromRefNum(int32(res.res))
  1248  		if _res_ref != nil {
  1249  			if res.res < 0 { // go object
  1250  				_res = _res_ref.Get().(Java.Java_lang_Object)
  1251  			} else { // foreign object
  1252  				_res = (*proxy_class_java_lang_Object)(_res_ref)
  1253  			}
  1254  		}
  1255  		var _exc error
  1256  		_exc_ref := _seq.FromRefNum(int32(res.exc))
  1257  		if _exc_ref != nil {
  1258  			if res.exc < 0 { // go object
  1259  				_exc = _exc_ref.Get().(error)
  1260  			} else { // foreign object
  1261  				_exc = (*proxy_error)(_exc_ref)
  1262  			}
  1263  		}
  1264  		return _res, _exc
  1265  	case 2:
  1266  		_a0, ok0 := a0[0].(int64)
  1267  		_a1, ok1 := a0[1].(Java.Java_util_concurrent_TimeUnit)
  1268  		if ok0 && ok1 {
  1269  			__a0 := C.jlong(_a0)
  1270  			var __a1 C.jint = _seq.NullRefNum
  1271  			if _a1 != nil {
  1272  				__a1 = C.jint(_seq.ToRefNum(_a1))
  1273  			}
  1274  			res := C.csuper_java_Future_get__JLjava_util_concurrent_TimeUnit_2(C.jint(p.Bind_proxy_refnum__()), __a0, __a1)
  1275  			var _res Java.Java_lang_Object
  1276  			_res_ref := _seq.FromRefNum(int32(res.res))
  1277  			if _res_ref != nil {
  1278  				if res.res < 0 { // go object
  1279  					_res = _res_ref.Get().(Java.Java_lang_Object)
  1280  				} else { // foreign object
  1281  					_res = (*proxy_class_java_lang_Object)(_res_ref)
  1282  				}
  1283  			}
  1284  			var _exc error
  1285  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1286  			if _exc_ref != nil {
  1287  				if res.exc < 0 { // go object
  1288  					_exc = _exc_ref.Get().(error)
  1289  				} else { // foreign object
  1290  					_exc = (*proxy_error)(_exc_ref)
  1291  				}
  1292  			}
  1293  			return _res, _exc
  1294  		}
  1295  	}
  1296  	panic("no overloaded method found for java.Future.get that matched the arguments")
  1297  }
  1298  
  1299  var class_java_InputStream C.jclass
  1300  
  1301  func init_java_InputStream() {
  1302  	cls := C.CString("java/InputStream")
  1303  	clazz := C.go_seq_find_class(cls)
  1304  	C.free(unsafe.Pointer(cls))
  1305  	if uintptr(clazz) == 0 {
  1306  		return
  1307  	}
  1308  	class_java_InputStream = clazz
  1309  	InputStream.Cast = func(v interface{}) Java.Java_InputStream {
  1310  		t := reflect.TypeOf((*proxy_class_java_InputStream)(nil))
  1311  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_InputStream)
  1312  		ref := C.jint(_seq.ToRefNum(cv))
  1313  		if C.go_seq_isinstanceof(ref, class_java_InputStream) != 1 {
  1314  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.InputStream"))
  1315  		}
  1316  		return cv
  1317  	}
  1318  }
  1319  
  1320  type proxy_class_java_InputStream _seq.Ref
  1321  
  1322  func (p *proxy_class_java_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1323  
  1324  func (p *proxy_class_java_InputStream) Read(a0 ...interface{}) (int32, error) {
  1325  	switch 0 + len(a0) {
  1326  	case 0:
  1327  		res := C.cproxy_java_InputStream_read__(C.jint(p.Bind_proxy_refnum__()))
  1328  		_res := int32(res.res)
  1329  		var _exc error
  1330  		_exc_ref := _seq.FromRefNum(int32(res.exc))
  1331  		if _exc_ref != nil {
  1332  			if res.exc < 0 { // go object
  1333  				_exc = _exc_ref.Get().(error)
  1334  			} else { // foreign object
  1335  				_exc = (*proxy_error)(_exc_ref)
  1336  			}
  1337  		}
  1338  		return _res, _exc
  1339  	case 1:
  1340  		_a0, ok0 := a0[0].([]byte)
  1341  		if ok0 {
  1342  			__a0 := fromSlice(_a0, false)
  1343  			res := C.cproxy_java_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0)
  1344  			_res := int32(res.res)
  1345  			var _exc error
  1346  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1347  			if _exc_ref != nil {
  1348  				if res.exc < 0 { // go object
  1349  					_exc = _exc_ref.Get().(error)
  1350  				} else { // foreign object
  1351  					_exc = (*proxy_error)(_exc_ref)
  1352  				}
  1353  			}
  1354  			return _res, _exc
  1355  		}
  1356  	case 3:
  1357  		_a0, ok0 := a0[0].([]byte)
  1358  		_a1, ok1 := a0[1].(int32)
  1359  		_a2, ok2 := a0[2].(int32)
  1360  		if ok0 && ok1 && ok2 {
  1361  			__a0 := fromSlice(_a0, false)
  1362  			__a1 := C.jint(_a1)
  1363  			__a2 := C.jint(_a2)
  1364  			res := C.cproxy_java_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2)
  1365  			_res := int32(res.res)
  1366  			var _exc error
  1367  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1368  			if _exc_ref != nil {
  1369  				if res.exc < 0 { // go object
  1370  					_exc = _exc_ref.Get().(error)
  1371  				} else { // foreign object
  1372  					_exc = (*proxy_error)(_exc_ref)
  1373  				}
  1374  			}
  1375  			return _res, _exc
  1376  		}
  1377  	}
  1378  	panic("no overloaded method found for java.InputStream.read that matched the arguments")
  1379  }
  1380  
  1381  func (p *proxy_class_java_InputStream) ToString() string {
  1382  	res := C.cproxy_java_InputStream_toString(C.jint(p.Bind_proxy_refnum__()))
  1383  	_res := decodeString(res.res)
  1384  	var _exc error
  1385  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1386  	if _exc_ref != nil {
  1387  		if res.exc < 0 { // go object
  1388  			_exc = _exc_ref.Get().(error)
  1389  		} else { // foreign object
  1390  			_exc = (*proxy_error)(_exc_ref)
  1391  		}
  1392  	}
  1393  	if (_exc != nil) { panic(_exc) }
  1394  	return _res
  1395  }
  1396  
  1397  func (p *proxy_class_java_InputStream) Super() Java.Java_InputStream {
  1398  	return &super_java_InputStream{p}
  1399  }
  1400  
  1401  type super_java_InputStream struct {*proxy_class_java_InputStream}
  1402  
  1403  func (p *proxy_class_java_InputStream) Unwrap() interface{} {
  1404  	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
  1405  	return _seq.FromRefNum(int32(goRefnum)).Get().(*java.InputStream)
  1406  }
  1407  
  1408  func (p *super_java_InputStream) Read(a0 ...interface{}) (int32, error) {
  1409  	switch 0 + len(a0) {
  1410  	case 0:
  1411  		res := C.csuper_java_InputStream_read__(C.jint(p.Bind_proxy_refnum__()))
  1412  		_res := int32(res.res)
  1413  		var _exc error
  1414  		_exc_ref := _seq.FromRefNum(int32(res.exc))
  1415  		if _exc_ref != nil {
  1416  			if res.exc < 0 { // go object
  1417  				_exc = _exc_ref.Get().(error)
  1418  			} else { // foreign object
  1419  				_exc = (*proxy_error)(_exc_ref)
  1420  			}
  1421  		}
  1422  		return _res, _exc
  1423  	case 1:
  1424  		_a0, ok0 := a0[0].([]byte)
  1425  		if ok0 {
  1426  			__a0 := fromSlice(_a0, false)
  1427  			res := C.csuper_java_InputStream_read___3B(C.jint(p.Bind_proxy_refnum__()), __a0)
  1428  			_res := int32(res.res)
  1429  			var _exc error
  1430  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1431  			if _exc_ref != nil {
  1432  				if res.exc < 0 { // go object
  1433  					_exc = _exc_ref.Get().(error)
  1434  				} else { // foreign object
  1435  					_exc = (*proxy_error)(_exc_ref)
  1436  				}
  1437  			}
  1438  			return _res, _exc
  1439  		}
  1440  	case 3:
  1441  		_a0, ok0 := a0[0].([]byte)
  1442  		_a1, ok1 := a0[1].(int32)
  1443  		_a2, ok2 := a0[2].(int32)
  1444  		if ok0 && ok1 && ok2 {
  1445  			__a0 := fromSlice(_a0, false)
  1446  			__a1 := C.jint(_a1)
  1447  			__a2 := C.jint(_a2)
  1448  			res := C.csuper_java_InputStream_read___3BII(C.jint(p.Bind_proxy_refnum__()), __a0, __a1, __a2)
  1449  			_res := int32(res.res)
  1450  			var _exc error
  1451  			_exc_ref := _seq.FromRefNum(int32(res.exc))
  1452  			if _exc_ref != nil {
  1453  				if res.exc < 0 { // go object
  1454  					_exc = _exc_ref.Get().(error)
  1455  				} else { // foreign object
  1456  					_exc = (*proxy_error)(_exc_ref)
  1457  				}
  1458  			}
  1459  			return _res, _exc
  1460  		}
  1461  	}
  1462  	panic("no overloaded method found for java.InputStream.read that matched the arguments")
  1463  }
  1464  
  1465  func (p *super_java_InputStream) ToString() string {
  1466  	res := C.csuper_java_InputStream_toString(C.jint(p.Bind_proxy_refnum__()))
  1467  	_res := decodeString(res.res)
  1468  	var _exc error
  1469  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1470  	if _exc_ref != nil {
  1471  		if res.exc < 0 { // go object
  1472  			_exc = _exc_ref.Get().(error)
  1473  		} else { // foreign object
  1474  			_exc = (*proxy_error)(_exc_ref)
  1475  		}
  1476  	}
  1477  	if (_exc != nil) { panic(_exc) }
  1478  	return _res
  1479  }
  1480  
  1481  var class_java_Object C.jclass
  1482  
  1483  func init_java_Object() {
  1484  	cls := C.CString("java/Object")
  1485  	clazz := C.go_seq_find_class(cls)
  1486  	C.free(unsafe.Pointer(cls))
  1487  	if uintptr(clazz) == 0 {
  1488  		return
  1489  	}
  1490  	class_java_Object = clazz
  1491  	Object.Cast = func(v interface{}) Java.Java_Object {
  1492  		t := reflect.TypeOf((*proxy_class_java_Object)(nil))
  1493  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Object)
  1494  		ref := C.jint(_seq.ToRefNum(cv))
  1495  		if C.go_seq_isinstanceof(ref, class_java_Object) != 1 {
  1496  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.Object"))
  1497  		}
  1498  		return cv
  1499  	}
  1500  }
  1501  
  1502  type proxy_class_java_Object _seq.Ref
  1503  
  1504  func (p *proxy_class_java_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1505  
  1506  func (p *proxy_class_java_Object) ToString() string {
  1507  	res := C.cproxy_java_Object_toString(C.jint(p.Bind_proxy_refnum__()))
  1508  	_res := decodeString(res.res)
  1509  	var _exc error
  1510  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1511  	if _exc_ref != nil {
  1512  		if res.exc < 0 { // go object
  1513  			_exc = _exc_ref.Get().(error)
  1514  		} else { // foreign object
  1515  			_exc = (*proxy_error)(_exc_ref)
  1516  		}
  1517  	}
  1518  	if (_exc != nil) { panic(_exc) }
  1519  	return _res
  1520  }
  1521  
  1522  func (p *proxy_class_java_Object) Super() Java.Java_Object {
  1523  	return &super_java_Object{p}
  1524  }
  1525  
  1526  type super_java_Object struct {*proxy_class_java_Object}
  1527  
  1528  func (p *proxy_class_java_Object) Unwrap() interface{} {
  1529  	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
  1530  	return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Object)
  1531  }
  1532  
  1533  func (p *super_java_Object) ToString() string {
  1534  	res := C.csuper_java_Object_toString(C.jint(p.Bind_proxy_refnum__()))
  1535  	_res := decodeString(res.res)
  1536  	var _exc error
  1537  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1538  	if _exc_ref != nil {
  1539  		if res.exc < 0 { // go object
  1540  			_exc = _exc_ref.Get().(error)
  1541  		} else { // foreign object
  1542  			_exc = (*proxy_error)(_exc_ref)
  1543  		}
  1544  	}
  1545  	if (_exc != nil) { panic(_exc) }
  1546  	return _res
  1547  }
  1548  
  1549  var class_java_Runnable C.jclass
  1550  
  1551  func init_java_Runnable() {
  1552  	cls := C.CString("java/Runnable")
  1553  	clazz := C.go_seq_find_class(cls)
  1554  	C.free(unsafe.Pointer(cls))
  1555  	if uintptr(clazz) == 0 {
  1556  		return
  1557  	}
  1558  	class_java_Runnable = clazz
  1559  	Runnable.Cast = func(v interface{}) Java.Java_Runnable {
  1560  		t := reflect.TypeOf((*proxy_class_java_Runnable)(nil))
  1561  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_Runnable)
  1562  		ref := C.jint(_seq.ToRefNum(cv))
  1563  		if C.go_seq_isinstanceof(ref, class_java_Runnable) != 1 {
  1564  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.Runnable"))
  1565  		}
  1566  		return cv
  1567  	}
  1568  }
  1569  
  1570  type proxy_class_java_Runnable _seq.Ref
  1571  
  1572  func (p *proxy_class_java_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1573  
  1574  func (p *proxy_class_java_Runnable) Run() {
  1575  	res := C.cproxy_java_Runnable_run(C.jint(p.Bind_proxy_refnum__()))
  1576  	var _exc error
  1577  	_exc_ref := _seq.FromRefNum(int32(res))
  1578  	if _exc_ref != nil {
  1579  		if res < 0 { // go object
  1580  			_exc = _exc_ref.Get().(error)
  1581  		} else { // foreign object
  1582  			_exc = (*proxy_error)(_exc_ref)
  1583  		}
  1584  	}
  1585  	if (_exc != nil) { panic(_exc) }
  1586  }
  1587  
  1588  func (p *proxy_class_java_Runnable) Super() Java.Java_Runnable {
  1589  	return &super_java_Runnable{p}
  1590  }
  1591  
  1592  type super_java_Runnable struct {*proxy_class_java_Runnable}
  1593  
  1594  func (p *proxy_class_java_Runnable) Unwrap() interface{} {
  1595  	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
  1596  	return _seq.FromRefNum(int32(goRefnum)).Get().(*java.Runnable)
  1597  }
  1598  
  1599  func (p *super_java_Runnable) Run() {
  1600  	res := C.csuper_java_Runnable_run(C.jint(p.Bind_proxy_refnum__()))
  1601  	var _exc error
  1602  	_exc_ref := _seq.FromRefNum(int32(res))
  1603  	if _exc_ref != nil {
  1604  		if res < 0 { // go object
  1605  			_exc = _exc_ref.Get().(error)
  1606  		} else { // foreign object
  1607  			_exc = (*proxy_error)(_exc_ref)
  1608  		}
  1609  	}
  1610  	if (_exc != nil) { panic(_exc) }
  1611  }
  1612  
  1613  var class_java_util_Iterator C.jclass
  1614  
  1615  func init_java_util_Iterator() {
  1616  	cls := C.CString("java/util/Iterator")
  1617  	clazz := C.go_seq_find_class(cls)
  1618  	C.free(unsafe.Pointer(cls))
  1619  	if uintptr(clazz) == 0 {
  1620  		return
  1621  	}
  1622  	class_java_util_Iterator = clazz
  1623  	Iterator.Cast = func(v interface{}) Java.Java_util_Iterator {
  1624  		t := reflect.TypeOf((*proxy_class_java_util_Iterator)(nil))
  1625  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Iterator)
  1626  		ref := C.jint(_seq.ToRefNum(cv))
  1627  		if C.go_seq_isinstanceof(ref, class_java_util_Iterator) != 1 {
  1628  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Iterator"))
  1629  		}
  1630  		return cv
  1631  	}
  1632  }
  1633  
  1634  type proxy_class_java_util_Iterator _seq.Ref
  1635  
  1636  func (p *proxy_class_java_util_Iterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1637  
  1638  var class_java_util_Spliterator C.jclass
  1639  
  1640  func init_java_util_Spliterator() {
  1641  	cls := C.CString("java/util/Spliterator")
  1642  	clazz := C.go_seq_find_class(cls)
  1643  	C.free(unsafe.Pointer(cls))
  1644  	if uintptr(clazz) == 0 {
  1645  		return
  1646  	}
  1647  	class_java_util_Spliterator = clazz
  1648  	Spliterator.Cast = func(v interface{}) Java.Java_util_Spliterator {
  1649  		t := reflect.TypeOf((*proxy_class_java_util_Spliterator)(nil))
  1650  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator)
  1651  		ref := C.jint(_seq.ToRefNum(cv))
  1652  		if C.go_seq_isinstanceof(ref, class_java_util_Spliterator) != 1 {
  1653  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator"))
  1654  		}
  1655  		return cv
  1656  	}
  1657  }
  1658  
  1659  type proxy_class_java_util_Spliterator _seq.Ref
  1660  
  1661  func (p *proxy_class_java_util_Spliterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1662  
  1663  var class_java_util_PrimitiveIterator_OfInt C.jclass
  1664  
  1665  func init_java_util_PrimitiveIterator_OfInt() {
  1666  	cls := C.CString("java/util/PrimitiveIterator$OfInt")
  1667  	clazz := C.go_seq_find_class(cls)
  1668  	C.free(unsafe.Pointer(cls))
  1669  	if uintptr(clazz) == 0 {
  1670  		return
  1671  	}
  1672  	class_java_util_PrimitiveIterator_OfInt = clazz
  1673  	OfInt.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfInt {
  1674  		t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfInt)(nil))
  1675  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfInt)
  1676  		ref := C.jint(_seq.ToRefNum(cv))
  1677  		if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfInt) != 1 {
  1678  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfInt"))
  1679  		}
  1680  		return cv
  1681  	}
  1682  }
  1683  
  1684  type proxy_class_java_util_PrimitiveIterator_OfInt _seq.Ref
  1685  
  1686  func (p *proxy_class_java_util_PrimitiveIterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1687  
  1688  var class_java_util_Spliterator_OfInt C.jclass
  1689  
  1690  func init_java_util_Spliterator_OfInt() {
  1691  	cls := C.CString("java/util/Spliterator$OfInt")
  1692  	clazz := C.go_seq_find_class(cls)
  1693  	C.free(unsafe.Pointer(cls))
  1694  	if uintptr(clazz) == 0 {
  1695  		return
  1696  	}
  1697  	class_java_util_Spliterator_OfInt = clazz
  1698  	OfInt.Cast = func(v interface{}) Java.Java_util_Spliterator_OfInt {
  1699  		t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfInt)(nil))
  1700  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfInt)
  1701  		ref := C.jint(_seq.ToRefNum(cv))
  1702  		if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfInt) != 1 {
  1703  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfInt"))
  1704  		}
  1705  		return cv
  1706  	}
  1707  }
  1708  
  1709  type proxy_class_java_util_Spliterator_OfInt _seq.Ref
  1710  
  1711  func (p *proxy_class_java_util_Spliterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1712  
  1713  var class_java_util_PrimitiveIterator_OfLong C.jclass
  1714  
  1715  func init_java_util_PrimitiveIterator_OfLong() {
  1716  	cls := C.CString("java/util/PrimitiveIterator$OfLong")
  1717  	clazz := C.go_seq_find_class(cls)
  1718  	C.free(unsafe.Pointer(cls))
  1719  	if uintptr(clazz) == 0 {
  1720  		return
  1721  	}
  1722  	class_java_util_PrimitiveIterator_OfLong = clazz
  1723  	OfLong.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfLong {
  1724  		t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfLong)(nil))
  1725  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfLong)
  1726  		ref := C.jint(_seq.ToRefNum(cv))
  1727  		if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfLong) != 1 {
  1728  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfLong"))
  1729  		}
  1730  		return cv
  1731  	}
  1732  }
  1733  
  1734  type proxy_class_java_util_PrimitiveIterator_OfLong _seq.Ref
  1735  
  1736  func (p *proxy_class_java_util_PrimitiveIterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1737  
  1738  var class_java_util_Spliterator_OfLong C.jclass
  1739  
  1740  func init_java_util_Spliterator_OfLong() {
  1741  	cls := C.CString("java/util/Spliterator$OfLong")
  1742  	clazz := C.go_seq_find_class(cls)
  1743  	C.free(unsafe.Pointer(cls))
  1744  	if uintptr(clazz) == 0 {
  1745  		return
  1746  	}
  1747  	class_java_util_Spliterator_OfLong = clazz
  1748  	OfLong.Cast = func(v interface{}) Java.Java_util_Spliterator_OfLong {
  1749  		t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfLong)(nil))
  1750  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfLong)
  1751  		ref := C.jint(_seq.ToRefNum(cv))
  1752  		if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfLong) != 1 {
  1753  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfLong"))
  1754  		}
  1755  		return cv
  1756  	}
  1757  }
  1758  
  1759  type proxy_class_java_util_Spliterator_OfLong _seq.Ref
  1760  
  1761  func (p *proxy_class_java_util_Spliterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1762  
  1763  var class_java_util_PrimitiveIterator_OfDouble C.jclass
  1764  
  1765  func init_java_util_PrimitiveIterator_OfDouble() {
  1766  	cls := C.CString("java/util/PrimitiveIterator$OfDouble")
  1767  	clazz := C.go_seq_find_class(cls)
  1768  	C.free(unsafe.Pointer(cls))
  1769  	if uintptr(clazz) == 0 {
  1770  		return
  1771  	}
  1772  	class_java_util_PrimitiveIterator_OfDouble = clazz
  1773  	OfDouble.Cast = func(v interface{}) Java.Java_util_PrimitiveIterator_OfDouble {
  1774  		t := reflect.TypeOf((*proxy_class_java_util_PrimitiveIterator_OfDouble)(nil))
  1775  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_PrimitiveIterator_OfDouble)
  1776  		ref := C.jint(_seq.ToRefNum(cv))
  1777  		if C.go_seq_isinstanceof(ref, class_java_util_PrimitiveIterator_OfDouble) != 1 {
  1778  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.PrimitiveIterator.OfDouble"))
  1779  		}
  1780  		return cv
  1781  	}
  1782  }
  1783  
  1784  type proxy_class_java_util_PrimitiveIterator_OfDouble _seq.Ref
  1785  
  1786  func (p *proxy_class_java_util_PrimitiveIterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1787  
  1788  var class_java_util_Spliterator_OfDouble C.jclass
  1789  
  1790  func init_java_util_Spliterator_OfDouble() {
  1791  	cls := C.CString("java/util/Spliterator$OfDouble")
  1792  	clazz := C.go_seq_find_class(cls)
  1793  	C.free(unsafe.Pointer(cls))
  1794  	if uintptr(clazz) == 0 {
  1795  		return
  1796  	}
  1797  	class_java_util_Spliterator_OfDouble = clazz
  1798  	OfDouble.Cast = func(v interface{}) Java.Java_util_Spliterator_OfDouble {
  1799  		t := reflect.TypeOf((*proxy_class_java_util_Spliterator_OfDouble)(nil))
  1800  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterator_OfDouble)
  1801  		ref := C.jint(_seq.ToRefNum(cv))
  1802  		if C.go_seq_isinstanceof(ref, class_java_util_Spliterator_OfDouble) != 1 {
  1803  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.util.Spliterator.OfDouble"))
  1804  		}
  1805  		return cv
  1806  	}
  1807  }
  1808  
  1809  type proxy_class_java_util_Spliterator_OfDouble _seq.Ref
  1810  
  1811  func (p *proxy_class_java_util_Spliterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1812  
  1813  var class_java_io_Console C.jclass
  1814  
  1815  func init_java_io_Console() {
  1816  	cls := C.CString("java/io/Console")
  1817  	clazz := C.go_seq_find_class(cls)
  1818  	C.free(unsafe.Pointer(cls))
  1819  	if uintptr(clazz) == 0 {
  1820  		return
  1821  	}
  1822  	class_java_io_Console = clazz
  1823  	Console.Cast = func(v interface{}) Java.Java_io_Console {
  1824  		t := reflect.TypeOf((*proxy_class_java_io_Console)(nil))
  1825  		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_io_Console)
  1826  		ref := C.jint(_seq.ToRefNum(cv))
  1827  		if C.go_seq_isinstanceof(ref, class_java_io_Console) != 1 {
  1828  			panic(fmt.Errorf("%T is not an instance of %s", v, "java.io.Console"))
  1829  		}
  1830  		return cv
  1831  	}
  1832  }
  1833  
  1834  type proxy_class_java_io_Console _seq.Ref
  1835  
  1836  func (p *proxy_class_java_io_Console) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
  1837  
  1838  func (p *proxy_class_java_io_Console) Flush() error {
  1839  	res := C.cproxy_java_io_Console_flush(C.jint(p.Bind_proxy_refnum__()))
  1840  	var _exc error
  1841  	_exc_ref := _seq.FromRefNum(int32(res))
  1842  	if _exc_ref != nil {
  1843  		if res < 0 { // go object
  1844  			_exc = _exc_ref.Get().(error)
  1845  		} else { // foreign object
  1846  			_exc = (*proxy_error)(_exc_ref)
  1847  		}
  1848  	}
  1849  	return _exc
  1850  }
  1851  
  1852  func (p *proxy_class_java_io_Console) ToString() string {
  1853  	res := C.cproxy_java_io_Console_toString(C.jint(p.Bind_proxy_refnum__()))
  1854  	_res := decodeString(res.res)
  1855  	var _exc error
  1856  	_exc_ref := _seq.FromRefNum(int32(res.exc))
  1857  	if _exc_ref != nil {
  1858  		if res.exc < 0 { // go object
  1859  			_exc = _exc_ref.Get().(error)
  1860  		} else { // foreign object
  1861  			_exc = (*proxy_error)(_exc_ref)
  1862  		}
  1863  	}
  1864  	if (_exc != nil) { panic(_exc) }
  1865  	return _res
  1866  }
  1867  
  1868  // Package main is an autogenerated binder stub for package java.
  1869  //   gobind -lang=go classes
  1870  //
  1871  // File is generated by gobind. Do not edit.
  1872  package main
  1873  
  1874  /*
  1875  #include <stdlib.h>
  1876  #include <stdint.h>
  1877  #include "seq.h"
  1878  #include "java.h"
  1879  
  1880  */
  1881  import "C"
  1882  
  1883  import (
  1884  	java_1 "Java/java"
  1885  	"Java/java/io"
  1886  	"Java/java/lang"
  1887  	"Java/java/util/concurrent"
  1888  	"classes"
  1889  	_seq "github.com/thommil/tge-mobile/bind/seq"
  1890  )
  1891  
  1892  // suppress the error if seq ends up unused
  1893  var _ = _seq.FromRefNum
  1894  
  1895  //export proxyjava_Future_Future_Set
  1896  func proxyjava_Future_Future_Set(refnum C.int32_t, v C.int32_t) {
  1897  	ref := _seq.FromRefNum(int32(refnum))
  1898  	var _v concurrent.Future
  1899  	_v_ref := _seq.FromRefNum(int32(v))
  1900  	if _v_ref != nil {
  1901  		if v < 0 { // go object
  1902  			_v = _v_ref.Get().(concurrent.Future)
  1903  		} else { // foreign object
  1904  			_v = (*proxy_class_java_util_concurrent_Future)(_v_ref)
  1905  		}
  1906  	}
  1907  	ref.Get().(*java.Future).Future = _v
  1908  }
  1909  
  1910  //export proxyjava_Future_Future_Get
  1911  func proxyjava_Future_Future_Get(refnum C.int32_t) C.int32_t {
  1912  	ref := _seq.FromRefNum(int32(refnum))
  1913  	v := ref.Get().(*java.Future).Future
  1914  	var _v C.int32_t = _seq.NullRefNum
  1915  	if v != nil {
  1916  		_v = C.int32_t(_seq.ToRefNum(v))
  1917  	}
  1918  	return _v
  1919  }
  1920  
  1921  //export proxyjava_Future_Get
  1922  func proxyjava_Future_Get(refnum C.int32_t) (C.int32_t, C.int32_t) {
  1923  	ref := _seq.FromRefNum(int32(refnum))
  1924  	v := ref.Get().(*java.Future)
  1925  	res_0, res_1 := v.Get()
  1926  	var _res_0 C.int32_t = _seq.NullRefNum
  1927  	if res_0 != nil {
  1928  		_res_0 = C.int32_t(_seq.ToRefNum(res_0))
  1929  	}
  1930  	var _res_1 C.int32_t = _seq.NullRefNum
  1931  	if res_1 != nil {
  1932  		_res_1 = C.int32_t(_seq.ToRefNum(res_1))
  1933  	}
  1934  	return _res_0, _res_1
  1935  }
  1936  
  1937  //export proxyjava_Future_Get_
  1938  func proxyjava_Future_Get_(refnum C.int32_t, param_p0 C.int64_t, param_p1 C.int32_t) (C.int32_t, C.int32_t) {
  1939  	ref := _seq.FromRefNum(int32(refnum))
  1940  	v := ref.Get().(*java.Future)
  1941  	_param_p0 := int64(param_p0)
  1942  	var _param_p1 concurrent.TimeUnit
  1943  	_param_p1_ref := _seq.FromRefNum(int32(param_p1))
  1944  	if _param_p1_ref != nil {
  1945  		if param_p1 < 0 { // go object
  1946  			_param_p1 = _param_p1_ref.Get().(concurrent.TimeUnit)
  1947  		} else { // foreign object
  1948  			_param_p1 = (*proxy_class_java_util_concurrent_TimeUnit)(_param_p1_ref)
  1949  		}
  1950  	}
  1951  	res_0, res_1 := v.Get_(_param_p0, _param_p1)
  1952  	var _res_0 C.int32_t = _seq.NullRefNum
  1953  	if res_0 != nil {
  1954  		_res_0 = C.int32_t(_seq.ToRefNum(res_0))
  1955  	}
  1956  	var _res_1 C.int32_t = _seq.NullRefNum
  1957  	if res_1 != nil {
  1958  		_res_1 = C.int32_t(_seq.ToRefNum(res_1))
  1959  	}
  1960  	return _res_0, _res_1
  1961  }
  1962  
  1963  //export new_java_Future
  1964  func new_java_Future() C.int32_t {
  1965  	return C.int32_t(_seq.ToRefNum(new(java.Future)))
  1966  }
  1967  
  1968  //export proxyjava_InputStream_InputStream_Set
  1969  func proxyjava_InputStream_InputStream_Set(refnum C.int32_t, v C.int32_t) {
  1970  	ref := _seq.FromRefNum(int32(refnum))
  1971  	var _v io.InputStream
  1972  	_v_ref := _seq.FromRefNum(int32(v))
  1973  	if _v_ref != nil {
  1974  		if v < 0 { // go object
  1975  			_v = _v_ref.Get().(io.InputStream)
  1976  		} else { // foreign object
  1977  			_v = (*proxy_class_java_io_InputStream)(_v_ref)
  1978  		}
  1979  	}
  1980  	ref.Get().(*java.InputStream).InputStream = _v
  1981  }
  1982  
  1983  //export proxyjava_InputStream_InputStream_Get
  1984  func proxyjava_InputStream_InputStream_Get(refnum C.int32_t) C.int32_t {
  1985  	ref := _seq.FromRefNum(int32(refnum))
  1986  	v := ref.Get().(*java.InputStream).InputStream
  1987  	var _v C.int32_t = _seq.NullRefNum
  1988  	if v != nil {
  1989  		_v = C.int32_t(_seq.ToRefNum(v))
  1990  	}
  1991  	return _v
  1992  }
  1993  
  1994  //export proxyjava_InputStream_Read
  1995  func proxyjava_InputStream_Read(refnum C.int32_t) (C.int32_t, C.int32_t) {
  1996  	ref := _seq.FromRefNum(int32(refnum))
  1997  	v := ref.Get().(*java.InputStream)
  1998  	res_0, res_1 := v.Read()
  1999  	_res_0 := C.int32_t(res_0)
  2000  	var _res_1 C.int32_t = _seq.NullRefNum
  2001  	if res_1 != nil {
  2002  		_res_1 = C.int32_t(_seq.ToRefNum(res_1))
  2003  	}
  2004  	return _res_0, _res_1
  2005  }
  2006  
  2007  //export new_java_InputStream
  2008  func new_java_InputStream() C.int32_t {
  2009  	return C.int32_t(_seq.ToRefNum(new(java.InputStream)))
  2010  }
  2011  
  2012  //export proxyjava_Object_Object_Set
  2013  func proxyjava_Object_Object_Set(refnum C.int32_t, v C.int32_t) {
  2014  	ref := _seq.FromRefNum(int32(refnum))
  2015  	var _v lang.Object
  2016  	_v_ref := _seq.FromRefNum(int32(v))
  2017  	if _v_ref != nil {
  2018  		if v < 0 { // go object
  2019  			_v = _v_ref.Get().(lang.Object)
  2020  		} else { // foreign object
  2021  			_v = (*proxy_class_java_lang_Object)(_v_ref)
  2022  		}
  2023  	}
  2024  	ref.Get().(*java.Object).Object = _v
  2025  }
  2026  
  2027  //export proxyjava_Object_Object_Get
  2028  func proxyjava_Object_Object_Get(refnum C.int32_t) C.int32_t {
  2029  	ref := _seq.FromRefNum(int32(refnum))
  2030  	v := ref.Get().(*java.Object).Object
  2031  	var _v C.int32_t = _seq.NullRefNum
  2032  	if v != nil {
  2033  		_v = C.int32_t(_seq.ToRefNum(v))
  2034  	}
  2035  	return _v
  2036  }
  2037  
  2038  //export new_java_Object
  2039  func new_java_Object() C.int32_t {
  2040  	return C.int32_t(_seq.ToRefNum(new(java.Object)))
  2041  }
  2042  
  2043  //export proxyjava_Runnable_Runnable_Set
  2044  func proxyjava_Runnable_Runnable_Set(refnum C.int32_t, v C.int32_t) {
  2045  	ref := _seq.FromRefNum(int32(refnum))
  2046  	var _v lang.Runnable
  2047  	_v_ref := _seq.FromRefNum(int32(v))
  2048  	if _v_ref != nil {
  2049  		if v < 0 { // go object
  2050  			_v = _v_ref.Get().(lang.Runnable)
  2051  		} else { // foreign object
  2052  			_v = (*proxy_class_java_lang_Runnable)(_v_ref)
  2053  		}
  2054  	}
  2055  	ref.Get().(*java.Runnable).Runnable = _v
  2056  }
  2057  
  2058  //export proxyjava_Runnable_Runnable_Get
  2059  func proxyjava_Runnable_Runnable_Get(refnum C.int32_t) C.int32_t {
  2060  	ref := _seq.FromRefNum(int32(refnum))
  2061  	v := ref.Get().(*java.Runnable).Runnable
  2062  	var _v C.int32_t = _seq.NullRefNum
  2063  	if v != nil {
  2064  		_v = C.int32_t(_seq.ToRefNum(v))
  2065  	}
  2066  	return _v
  2067  }
  2068  
  2069  //export proxyjava_Runnable_Run
  2070  func proxyjava_Runnable_Run(refnum C.int32_t, param_this C.int32_t) {
  2071  	ref := _seq.FromRefNum(int32(refnum))
  2072  	v := ref.Get().(*java.Runnable)
  2073  	var _param_this java_1.Runnable
  2074  	_param_this_ref := _seq.FromRefNum(int32(param_this))
  2075  	if _param_this_ref != nil {
  2076  		if param_this < 0 { // go object
  2077  			_param_this = _param_this_ref.Get().(java_1.Runnable)
  2078  		} else { // foreign object
  2079  			_param_this = (*proxy_class_java_Runnable)(_param_this_ref)
  2080  		}
  2081  	}
  2082  	v.Run(_param_this)
  2083  }
  2084  
  2085  //export new_java_Runnable
  2086  func new_java_Runnable() C.int32_t {
  2087  	return C.int32_t(_seq.ToRefNum(new(java.Runnable)))
  2088  }
  2089  
  2090  //export proxyjava__NewInputStream
  2091  func proxyjava__NewInputStream() C.int32_t {
  2092  	res_0 := java.NewInputStream()
  2093  	var _res_0 C.int32_t = _seq.NullRefNum
  2094  	if res_0 != nil {
  2095  		_res_0 = C.int32_t(_seq.ToRefNum(res_0))
  2096  	}
  2097  	return _res_0
  2098  }