-
Notifications
You must be signed in to change notification settings - Fork 20
/
go_testpkg.go
109 lines (92 loc) · 2.18 KB
/
go_testpkg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// Package go_testpkg is an autogenerated binder stub for package testpkg.
// gobind -lang=go golang.org/x/mobile/bind/java/testpkg
//
// File is generated by gobind. Do not edit.
package go_testpkg
import (
"golang.org/x/mobile/bind/java/testpkg"
"golang.org/x/mobile/bind/seq"
)
func proxy_Add(out, in *seq.Buffer) {
param_x := in.ReadInt()
param_y := in.ReadInt()
res := testpkg.Add(param_x, param_y)
out.WriteInt(res)
}
func proxy_Call(out, in *seq.Buffer) {
var param_i testpkg.I
param_i_ref := in.ReadRef()
if param_i_ref.Num < 0 {
param_i = param_i_ref.Get().(testpkg.I)
} else {
param_i = (*proxyI)(param_i_ref)
}
testpkg.Call(param_i)
}
func proxy_Err(out, in *seq.Buffer) {
param_s := in.ReadUTF16()
err := testpkg.Err(param_s)
if err == nil {
out.WriteUTF16("")
} else {
out.WriteUTF16(err.Error())
}
}
func proxy_GC(out, in *seq.Buffer) {
testpkg.GC()
}
const (
proxyIDescriptor = "go.testpkg.I"
proxyIFCode = 0x10a
)
type proxyI seq.Ref
func (p *proxyI) F() {
out := new(seq.Buffer)
seq.Transact((*seq.Ref)(p), proxyIFCode, out)
}
func proxy_Keep(out, in *seq.Buffer) {
var param_i testpkg.I
param_i_ref := in.ReadRef()
if param_i_ref.Num < 0 {
param_i = param_i_ref.Get().(testpkg.I)
} else {
param_i = (*proxyI)(param_i_ref)
}
testpkg.Keep(param_i)
}
func proxy_New(out, in *seq.Buffer) {
res := testpkg.New()
out.WriteGoRef(res)
}
func proxy_NumSCollected(out, in *seq.Buffer) {
res := testpkg.NumSCollected()
out.WriteInt(res)
}
const (
proxySDescriptor = "go.testpkg.S"
proxySFCode = 0x00c
)
type proxyS seq.Ref
func proxySF(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*testpkg.S)
v.F()
}
func init() {
seq.Register(proxySDescriptor, proxySFCode, proxySF)
}
func proxy_StrDup(out, in *seq.Buffer) {
param_s := in.ReadUTF16()
res := testpkg.StrDup(param_s)
out.WriteUTF16(res)
}
func init() {
seq.Register("testpkg", 1, proxy_Add)
seq.Register("testpkg", 2, proxy_Call)
seq.Register("testpkg", 3, proxy_Err)
seq.Register("testpkg", 4, proxy_GC)
seq.Register("testpkg", 5, proxy_Keep)
seq.Register("testpkg", 6, proxy_New)
seq.Register("testpkg", 7, proxy_NumSCollected)
seq.Register("testpkg", 8, proxy_StrDup)
}