func getAnnotationByteArr(goBytes []byte) *heap.Object { if goBytes != nil { jBytes := jutil.CastUint8sToInt8s(goBytes) return heap.NewByteArray(jBytes) } return nil }
// 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) }
// native byte[] getRawAnnotations(); // ()[B func getRawAnnotations(frame *rtda.Frame) { vars := frame.LocalVars() this := vars.GetThis() class := this.Extra().(*heap.Class) goBytes := class.AnnotationData() if goBytes != nil { jBytes := jutil.CastUint8sToInt8s(goBytes) byteArr := heap.NewByteArray(jBytes) frame.OperandStack().PushRef(byteArr) return } frame.OperandStack().PushRef(nil) }