Exemple #1
0
func (g *JavaToGoDate) Convert(obj *gojvm.Object) (err error) {
	ms, err := obj.CallLong(g.env, false, "getTime")
	if err != nil {
		return
	}
	*g.timePtr = time.Unix(ms/1000, (ms%1000)*1000000)
	return
}
Exemple #2
0
func (g *JavaToGoLong) Convert(obj *gojvm.Object) (err error) {
	v, err := obj.CallLong(g.env, false, "longValue")
	if err != nil {
		return
	}
	*g.int64Ptr = v
	return
}