Beispiel #1
0
func getAnnotationByteArr(goBytes []byte) *rtc.Obj {
	if goBytes != nil {
		jBytes := jutil.CastUint8sToInt8s(goBytes)
		return rtc.NewByteArray(jBytes)
	}
	return nil
}
Beispiel #2
0
// private static native byte[] getEntryBytes(long jzentry, int type);
// (JI)[B
func getEntryBytes(frame *rtda.Frame) {
	vars := frame.LocalVars()
	jzentry := vars.GetLong(0)
	_type := vars.GetInt(2)

	goBytes := _getEntryBytes(jzentry, _type)
	jBytes := jutil.CastUint8sToInt8s(goBytes)
	byteArr := rtc.NewByteArray(jBytes)

	stack := frame.OperandStack()
	stack.PushRef(byteArr)
}
Beispiel #3
0
// native byte[] getRawAnnotations();
// ()[B
func getRawAnnotations(frame *rtda.Frame) {
	vars := frame.LocalVars()
	this := vars.GetThis()

	class := this.Extra().(*rtc.Class)
	goBytes := class.AnnotationData()
	if goBytes != nil {
		jBytes := jutil.CastUint8sToInt8s(goBytes)
		byteArr := rtc.NewByteArray(jBytes)
		frame.OperandStack().PushRef(byteArr)
		return
	}

	frame.OperandStack().PushRef(nil)
}