2
0
mirror of synced 2025-02-23 23:08:14 +00:00
mobile/bind/testdata/classes.go
Elias Naur c90c4f7c8a bind,internal: change the default Java package to the empty string
The Objective-C bindings was recently changed to support the empty
name prefix and to use that as the default. This CLs changed the Java
generators in the same way, supporting the empty Java package and using
it as the default.

Change-Id: I857affce686c67638a2b6c4e1da5d6a88d7ba560
Reviewed-on: https://go-review.googlesource.com/34778
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-01-11 19:15:09 +00:00

62 lines
1.1 KiB
Go

// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package java
import (
gopkg "Java/java"
"Java/java/io"
"Java/java/lang"
"Java/java/lang/System"
"Java/java/util/Spliterators"
"Java/java/util/concurrent"
)
type Runnable struct {
lang.Runnable
}
func (r *Runnable) Run(this gopkg.Runnable) {
}
type InputStream struct {
io.InputStream
}
func (_ *InputStream) Read() (int32, error) {
return 0, nil
}
func NewInputStream() *InputStream {
return new(InputStream)
}
type Future struct {
concurrent.Future
}
func (_ *Future) Get() lang.Object {
return nil
}
func (_ *Future) Get2(_ int64, _ concurrent.TimeUnit) lang.Object {
return nil
}
type Object struct {
lang.Object
}
func innerClassTypes() {
// java.util.Spliterators.iterator use inner class types
// for the return value as well as parameters.
Spliterators.Iterator_Ljava_util_Spliterator_00024OfInt_2(nil)
}
func returnType() {
// Implicit types (java.io.Console) should be wrapped.
cons := System.Console()
cons.Flush()
}