()
| 532 | } |
| 533 | |
| 534 | func (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 | |
| 552 | func (t *Type) JNICallType() string { |
| 553 | switch t.Kind { |
no test coverage detected