Sounds to me like you want to use InstructionFinder. You should just give it
a pattern that matches what you're looking for, i.e. INVOKEVIRTUAL,
INVOKEINTERFACE etc... and call it on each method in the class. Every time
you get some hits, you can call getMethodName(), getReturnType(),
getArgumentTypes() to determine if the invoke is actually calling the method
you're looking for.

God bless,
-Toby Reyelts 


-----Original Message-----
From: Mahesh Nair [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 7:51 AM
To: '[EMAIL PROTECTED]'
Subject: help required


. I am trying to create a primitive impact analysis tool for java projects.
The tool will take in as input, details about a method in a class, and then
figure out where all that method is invoked. 
I am using the bcel libraries to parse through all the class files for this
purpose. I was relatively successful also. I am now able to get the classes
where this method is invoked.
I'd also like to get the method names inside the class form where the call
is made. i am not able to do it.
So my question is if i have a "org.apache.bcel.classfile.ConstantMethodref"
instance how can i figure out which method in the class invokes that method?
tia
Mahesh


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to