In your Go package, you can define:
type SomeCallback interface {
DoSomething()
}
func RegisterSomeCallback(c SomeCallback) {
// save a copy of c and call DoSomething on it later
}
the generated Java will contain an abstract class named SomeCallback.
You can create a subclass of it:
public class ParticularCallback extends Pkg.SomeCallback {
public void DoSomething() {
// do something here
}
}
and then pass an instance of it to Go by calling Pkg.RegisterSomeCallback.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
golang-nuts...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.