Senin, 22 November 2010
How to Detect if a Method is Overridden
Suppose you want to know if (the class of) a particular object overrides a virtual method. For an example of this see OpenJDK's Thread.isCCLOverriden() (line 1573).In Java the obvious way to do this would be to use reflection. On the CLR there is another way that is both more accurate1 and more efficient. Here's the MSIL method from IKVM's java.lang.Thread.isCCLOverridden() implementation:.method
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar