mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
mobile/bind: don't force Java classes to extend stub classes
Requiring user code to extend Go interface Stubs to be able to pass Java objects to Go is clumsy and use up the single extend slot. Instead, support (and enforce) java classes to implement translated Go interface directly. This is similar to how ObjC works. The stub classes are now gone, and users of gobind Java APIs need to update their code to implement interfaces directly. Change-Id: I880bb7c8e89d3c21210b2ab2c85ced8d7859ff48 Reviewed-on: https://go-review.googlesource.com/21313 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
@@ -17,12 +17,12 @@ import go.benchmark.Benchmark;
|
||||
|
||||
public class SeqBench extends InstrumentationTestCase {
|
||||
|
||||
public static class AnI extends Benchmark.I.Stub {
|
||||
public static class AnI implements Benchmark.I {
|
||||
@Override public void F() {
|
||||
}
|
||||
}
|
||||
|
||||
private static class Benchmarks extends Benchmark.Benchmarks.Stub {
|
||||
private static class Benchmarks implements Benchmark.Benchmarks {
|
||||
private static Map<String, Runnable> benchmarks;
|
||||
private static ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user