jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abel Wang" <ab...@nvisionsoftware.net>
Subject Re: getting index to this
Date Sat, 21 Sep 2002 04:58:10 GMT
Hi BCEL users, thanks for all the help you guys have provided!

Ok, one last question:

I'm trying to get the index of the parameters in a specific method call.  Is
there any easy way to do this?

What I'm currently doing is I've parsed an object using ClassParser into a
JavaClass.  From there, I can get the Method object of a particular method
in that class.  I then parse the method name to get the names of the
parameters in the method's parameter list.  I then get the
LocalVariableTable from the Method object, going through all the variables
until I find the ones whose names match the variable names in the method
parameter list.  And from there, I can get the index.  However, I just ran
across a case where the method parameter list names do not match the names
in the LocalVariable table.  So, I guess my question is, what would be the
right way to do this?  Can I assume that position 0 in the
LocalVariableTable points to this, and 1 to N (N being the number of
parameters in the method) points to LocalVariable objects of the parameter



----- Original Message -----
From: "Laurent Martelli" <laurent@bearteam.org>
To: "BCEL Users List" <bcel-user@jakarta.apache.org>
Sent: Friday, September 20, 2002 3:16 AM
Subject: Re: getting index to this

> >>>>> "Abel" == Abel Wang <abelw@nvisionsoftware.net> writes:
> Use the ALOAD_0 instruction to push the this pointer on the stack.

To unsubscribe, e-mail:   <mailto:bcel-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-user-help@jakarta.apache.org>

View raw message