github.com/MrKrisYu/mobile@v0.0.0-20230923092425-9be92a9aeacc/bind/testdata/classes.go.golden (about)

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