>>>>> "Frank" == Frank McCarey <[EMAIL PROTECTED]> writes:

[...]

  Frank> Secondly, I have been looking at the BCELifier class. What I
  Frank> am trying to do is to analyse the .class file, looking for
  Frank> methods, fields and in particular method invocations. It is
  Frank> straight forward to determine methods and fields but I am
  Frank> having problems with method invocations. From looking at the
  Frank> documentation on the bcel webpage, it would appear that
  Frank> method invocations are stored as ConstantMethodRef's which is
  Frank> stored in the ConstantPool and thus I have been paying
  Frank> attention to getting the class Constant Pool.

It only stores the signature of mehods. If you want the invocations,
you'll have to walk through the bytecode and look for INVOKESPECIAL,
INVOKEVIRTUAL or INVOKESTATIC instructions.

You may have a look at JAC for some sample code, but it may no be the
clearest thing since it does many other things besides looking for
method invocations:

http://cvs.forge.objectweb.org/cgi-bin/cvsweb.cgi/jac/src/org/objectweb/jac/core/translators/?cvsroot=jac

See the method WrappeeTranslator_BCEL.fillRTTI().

-- 
Laurent Martelli
[EMAIL PROTECTED]                                Java Aspect Components
http://www.aopsys.com/                             http://jac.aopsys.com


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

Reply via email to