mobile/bind: only generate callable jmethodID declarations
Change-Id: I11b901be718d730f50fdc3877cbc2cf173aa6c66 Reviewed-on: https://go-review.googlesource.com/20658 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
1a0b242e59
commit
7d65c03f0a
@ -892,8 +892,8 @@ func (g *javaGen) genC() error {
|
||||
for _, iface := range g.interfaces {
|
||||
g.Printf("jclass proxy_class_%s_%s;\n", g.pkgPrefix, iface.obj.Name())
|
||||
g.Printf("jmethodID proxy_class_%s_%s_cons;\n", g.pkgPrefix, iface.obj.Name())
|
||||
for i := 0; i < iface.t.NumMethods(); i++ {
|
||||
g.Printf("static jmethodID mid_%s_%s;\n", iface.obj.Name(), iface.t.Method(i).Name())
|
||||
for _, m := range iface.summary.callable {
|
||||
g.Printf("static jmethodID mid_%s_%s;\n", iface.obj.Name(), m.Name())
|
||||
}
|
||||
}
|
||||
for _, s := range g.structs {
|
||||
|
2
bind/testdata/interfaces.java.c.golden
vendored
2
bind/testdata/interfaces.java.c.golden
vendored
@ -17,12 +17,10 @@ jmethodID proxy_class_interfaces_I_cons;
|
||||
static jmethodID mid_I_Rand;
|
||||
jclass proxy_class_interfaces_I1;
|
||||
jmethodID proxy_class_interfaces_I1_cons;
|
||||
static jmethodID mid_I1_H;
|
||||
static jmethodID mid_I1_J;
|
||||
jclass proxy_class_interfaces_I2;
|
||||
jmethodID proxy_class_interfaces_I2_cons;
|
||||
static jmethodID mid_I2_G;
|
||||
static jmethodID mid_I2_f;
|
||||
jclass proxy_class_interfaces_I3;
|
||||
jmethodID proxy_class_interfaces_I3_cons;
|
||||
static jmethodID mid_I3_F;
|
||||
|
Loading…
x
Reference in New Issue
Block a user