2
0
mirror of synced 2025-02-24 15:28:28 +00:00
mobile/bind/testdata/keywords.java.golden

157 lines
4.6 KiB
Plaintext
Raw Normal View History

// Java class keywords.KeywordCaller is a proxy for talking to a Go program.
// gobind -lang=java keywords
//
// File is generated by gobind. Do not edit.
package keywords;
import go.Seq;
public interface KeywordCaller {
public void abstract_();
public void assert_();
public void boolean_();
public void break_();
public void byte_();
public void case_();
public void catch_();
public void char_();
public void class_();
public void const_();
public void continue_();
public void default_();
public void do_();
public void double_();
public void else_();
public void enum_();
public void extends_();
public void false_();
public void final_();
public void finally_();
public void float_();
public void for_();
public void goto_();
public void if_();
public void implements_();
public void import_();
public void instanceof_();
public void int_();
public void interface_();
public void long_();
public void native_();
public void new_();
public void null_();
public void package_();
public void private_();
public void protected_();
public void public_();
public void return_();
public void short_();
public void static_();
public void strictfp_();
public void super_();
public void switch_();
public void synchronized_();
public void this_();
public void throw_();
public void throws_();
public void transient_();
public void true_();
public void try_();
public void void_();
public void volatile_();
public void while_();
}
// Java class keywords.Keywords is a proxy for talking to a Go program.
// gobind -lang=java keywords
//
// File is generated by gobind. Do not edit.
package keywords;
import go.Seq;
public abstract class Keywords {
static {
Seq.touch(); // for loading the native library
_init();
}
private Keywords() {} // uninstantiable
// touch is called from other bound packages to initialize this package
public static void touch() {}
private static native void _init();
bind: remove error wrappers to preserve error instance identity CL 24800 changed the error representation from strings to objects. However, since native errors types are not immediately compatible across languages, wrapper types were introduced to bridge the gap. This CL remove those wrappers and instead special case the error proxy types to conform to their language error protocol. Specifically: - The ObjC proxy for Go errors now extends NSError and calls initWithDomain to store the error message. - The Go proxy for ObjC NSError return the localizedDescription property for calls to Error. - The Java proxy for Go errors ow extends Exception and overrides getMessage() to return the error message. - The Go proxy for Java Exceptions returns getMessage whenever Error is called. The end result is that error values behave more like normal objects across the language boundary. In particular, instance identity is now preserved: an error passed across the boundary and back will result in the same instance. There are two semantic changes that followed this change: - The domain for wrapped Go errors is now always "go". The domain wasn't useful before this CL: the domains were set to the package name of function or method where the error happened to cross the language boundary. - If a Go method that returns an error is implemented in ObjC, the implementation must now both return NO _and_ set the error result for the calling Go code to receive a non-nil error. Before this CL, because errors were always wrapped, a nil ObjC could be represented with a non-nil wrapper. Change-Id: Idb415b6b13ecf79ccceb60f675059942bfc48fec Reviewed-on: https://go-review.googlesource.com/29298 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-09-19 12:44:13 +02:00
private static final class proxyKeywordCaller implements Seq.Proxy, KeywordCaller {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyKeywordCaller(Seq.Ref ref) { this.ref = ref; }
public native void abstract_();
public native void assert_();
public native void boolean_();
public native void break_();
public native void byte_();
public native void case_();
public native void catch_();
public native void char_();
public native void class_();
public native void const_();
public native void continue_();
public native void default_();
public native void do_();
public native void double_();
public native void else_();
public native void enum_();
public native void extends_();
public native void false_();
public native void final_();
public native void finally_();
public native void float_();
public native void for_();
public native void goto_();
public native void if_();
public native void implements_();
public native void import_();
public native void instanceof_();
public native void int_();
public native void interface_();
public native void long_();
public native void native_();
public native void new_();
public native void null_();
public native void package_();
public native void private_();
public native void protected_();
public native void public_();
public native void return_();
public native void short_();
public native void static_();
public native void strictfp_();
public native void super_();
public native void switch_();
public native void synchronized_();
public native void this_();
public native void throw_();
public native void throws_();
public native void transient_();
public native void true_();
public native void try_();
public native void void_();
public native void volatile_();
public native void while_();
}
public static native void const_(String id);
public static native void static_(String strictfp_);
}