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) }