mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind,internal/importers: always generate toString methods
When wrapping Java exceptions, their toString() methods are called from the wrapper's Error() method to satisfy the Go error interface. Make sure toString() is always included, even if it never directly referenced from bound packages. Change-Id: I5653f6ad82afbe4b061e02a69d60453000288a83 Reviewed-on: https://go-review.googlesource.com/35189 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Vendored
+9
-3
@@ -6,7 +6,8 @@ package java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface F {
|
||||
public interface F extends R {
|
||||
public String toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +19,8 @@ package java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface O {
|
||||
public interface O extends R {
|
||||
public String toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +44,8 @@ package java;
|
||||
|
||||
import go.Seq;
|
||||
|
||||
public interface S {
|
||||
public interface S extends R {
|
||||
public String toString();
|
||||
|
||||
}
|
||||
|
||||
@@ -78,6 +81,7 @@ public abstract class Java {
|
||||
|
||||
proxyF(Seq.Ref ref) { this.ref = ref; }
|
||||
|
||||
public native String toString();
|
||||
}
|
||||
private static final class proxyO implements Seq.Proxy, O {
|
||||
private final Seq.Ref ref;
|
||||
@@ -90,6 +94,7 @@ public abstract class Java {
|
||||
|
||||
proxyO(Seq.Ref ref) { this.ref = ref; }
|
||||
|
||||
public native String toString();
|
||||
}
|
||||
private static final class proxyR implements Seq.Proxy, R {
|
||||
private final Seq.Ref ref;
|
||||
@@ -114,6 +119,7 @@ public abstract class Java {
|
||||
|
||||
proxyS(Seq.Ref ref) { this.ref = ref; }
|
||||
|
||||
public native String toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user