Invocation target runtime type for virtually invoked methods

"Kuperberg, Michael" <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Organization Universitaet Karlsruhe (TH)
Message-ID <12466700.1280.1274803544673.JavaMail.open-xchange@iragroupware>
Hi all,

 

I have a question about virtual methods, like in the following example:

 

A a = new B();

a.meth();

 

meth() invoked using INVOKEVIRTUAL features the *declared* type of the
invocation target in the bytecode, i.e. "INVOKEVIRTUAL a.meth()". But as I am
interested in the *runtime* type of the invocation target, I need to analyse it.

 

Of course, analysing the top element on the stack is an option (using
getClass(), etc.), but: is there a faster and/or a more convenient option to do
this using ASM?

 

Many thanks,

 

Michael 

 
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.