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

Method CType

internal/importers/java/java.go:534–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

532}
533
534func (t *Type) CType() string {
535 switch t.Kind {
536 case Int, Boolean, Short, Char, Byte, Long, Float, Double:
537 return t.JNIType()
538 case String:
539 return "nstring"
540 case Array:
541 if t.Elem.Kind != Byte {
542 panic("unsupported array type")
543 }
544 return "nbyteslice"
545 case Object:
546 return "jint"
547 default:
548 panic("invalid kind")
549 }
550}
551
552func (t *Type) JNICallType() string {
553 switch t.Kind {

Callers 5

genCMethodBodyMethod · 0.80
genCMethod · 0.80
genCMethodDeclMethod · 0.80
genCFuncDeclMethod · 0.80
genWriteMethod · 0.80

Calls 1

JNITypeMethod · 0.95

Tested by

no test coverage detected