MCPcopy Create free account
hub / github.com/golang/mobile / genJNIFunc

Method genJNIFunc

bind/genjava.go:1168–1184  ·  view source on GitHub ↗
(o *types.Func, sName string, jm *java.Func, proxy, isjava bool)

Source from the content-addressed store, hash-verified

1166}
1167
1168func (g *JavaGen) genJNIFunc(o *types.Func, sName string, jm *java.Func, proxy, isjava bool) {
1169 if !g.isSigSupported(o.Type()) {
1170 n := o.Name()
1171 if sName != "" {
1172 n = sName + "." + n
1173 }
1174 g.Printf("// skipped function %s with unsupported parameter or return types\n\n", n)
1175 return
1176 }
1177 g.genJNIFuncSignature(o, sName, jm, proxy, isjava)
1178
1179 g.Printf(" {\n")
1180 g.Indent()
1181 g.genJNIFuncBody(o, sName, jm, isjava)
1182 g.Outdent()
1183 g.Printf("}\n\n")
1184}
1185
1186func (g *JavaGen) genJNIFuncBody(o *types.Func, sName string, jm *java.Func, isjava bool) {
1187 sig := o.Type().(*types.Signature)

Callers 1

GenCMethod · 0.95

Calls 7

genJNIFuncSignatureMethod · 0.95
genJNIFuncBodyMethod · 0.95
isSigSupportedMethod · 0.80
TypeMethod · 0.80
PrintfMethod · 0.80
IndentMethod · 0.80
OutdentMethod · 0.80

Tested by

no test coverage detected