interface dispatch

Per Bothner per@bothner.com
Sat Oct 23 23:11:00 GMT 1999


Godmar Back <gback@cs.utah.edu> writes:
> In an earlier discussion, I pointed out that the correct way to compile
>> interface A {}
> f(A x) {
> 	x.equals(...)
> }
>> is by using "invokeinterface" as opposed to "invokevirtual", and that the
> correct run-time semantics is
>> 	checkcast A
> 	invokevirtual "equals"

Yes, you said that, but I really want to see an explanation
before I buy it. My understanding is that checkcast are
only needed when a source cast is needed.
-- 
	--Per Bothner
per@bothner.com http://www.bothner.com/~per/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /