func _newMultiArray(counts []Any, arrClass *rtc.Class) *rtc.Obj { count := uint(counts[0].(int32)) arr := rtc.NewArray(arrClass, count) if len(counts) > 1 { objs := arr.Refs() for i := range objs { objs[i] = _newMultiArray(counts[1:], arrClass.ComponentClass()) } } return arr }
func (self *Thread) ThrowClassCastException(from, to *rtc.Class) { msg := fmt.Sprintf("%v cannot be cast to %v", from.NameJlsFormat(), to.NameJlsFormat()) self.throwExceptionS("java/lang/ClassCastException", msg) }