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

     1  // Copyright 2014 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package java
     6  
     7  import (
     8  	gopkg "Java/java"
     9  	"Java/java/io"
    10  	"Java/java/lang"
    11  	"Java/java/lang/System"
    12  	"Java/java/util/Spliterators"
    13  	"Java/java/util/concurrent"
    14  )
    15  
    16  type Runnable struct {
    17  	lang.Runnable
    18  }
    19  
    20  func (r *Runnable) Run(this gopkg.Runnable) {
    21  }
    22  
    23  type InputStream struct {
    24  	io.InputStream
    25  }
    26  
    27  func (_ *InputStream) Read() (int32, error) {
    28  	return 0, nil
    29  }
    30  
    31  func NewInputStream() *InputStream {
    32  	return new(InputStream)
    33  }
    34  
    35  type Future struct {
    36  	concurrent.Future
    37  }
    38  
    39  func (_ *Future) Get() (lang.Object, error) {
    40  	return nil, nil
    41  }
    42  
    43  // Use a trailing underscore to override multiple overloaded methods.
    44  func (_ *Future) Get_(_ int64, _ concurrent.TimeUnit) (lang.Object, error) {
    45  	return nil, nil
    46  }
    47  
    48  type Object struct {
    49  	lang.Object
    50  }
    51  
    52  func innerClassTypes() {
    53  	// java.util.Spliterators.iterator use inner class types
    54  	// for the return value as well as parameters.
    55  	Spliterators.Iterator(nil)
    56  }
    57  
    58  func returnType() {
    59  	// Implicit types (java.io.Console) should be wrapped.
    60  	cons := System.Console()
    61  	cons.Flush()
    62  }