2
0
mirror of synced 2025-02-23 14:58:12 +00:00
mobile/bind/testdata/classes.go
Elias Naur bdf873ed8f bind,cmd: accept Java API in bound packages
Accept Java API interface types as arguments and return values from
bound Go package functions and methods. Also, allow Go structs
to extend Java classes and implement Java interfaces as well as override
and implement methods.

This is the third and final part of the implementation of the golang/go#16876
proposal.

Fixes golang/go#16876

Change-Id: I6951dd87235553ce09abe5117a39a503466163c0
Reviewed-on: https://go-review.googlesource.com/28597
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-09-22 10:16:33 +00:00

47 lines
727 B
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 (
"Java/java/io"
"Java/java/lang"
"Java/java/util/concurrent"
)
type Runnable struct {
lang.Runnable
}
func (r *Runnable) Run(this lang.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
}