jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koduru, Rajendra Kumar Reddy" <rajendra.kumar.reddy.kod...@sap.com>
Subject RE: Passing "this" as an argument to a method
Date Fri, 04 Feb 2005 15:58:21 GMT
Hi Dave,

	Uffffffffffffffff... IT WORKED

	As I was appendign to the instructionList, I added, 
	ilist_start.append(new ALOAD(0));

	and it worked..

	Mr. Dave  and SUN INC (javap -c options ) helped me to solve
this problem..

Thank you Dave
Reddy


>-----Original Message-----
>From: Irving, Dave [mailto:Dave.Irving@logicacmg.com] 
>Sent: Freitag, 4. Februar 2005 16:37
>To: 'BCEL Users List'
>Subject: RE: Passing "this" as an argument to a method
>
>
>Hmmm, Im pretty sure that in a non-static method,
>
>InstructionFactory.createLoad(Type.Object, 0)
>
>will put "this" on the stack - and Ive definitely used it many 
>times myself.
>Of course, you will still need to add the instruction to 
>invoke the static
>method afterwards.
>Maybe try BCELifier? Just add the code manually to a class, 
>run it through
>BCELifier, and you will see how to do what you want in BCEL.
>
>Dave
>
>-----Original Message-----
>From: Koduru, Rajendra Kumar Reddy
>[mailto:rajendra.kumar.reddy.koduru@sap.com]
>Sent: Friday, February 04, 2005 3:24 PM
>To: BCEL Users List
>Subject: RE: Passing "this" as an argument to a method
>
>
>HI dave,
>
>	Thank you for your reply...
>	unfortunately it doesn't work.
>	
>	my scenario::
>	
>	I have a class file AA , I want to insert a method call
>	
>	ClassName.staticMethod(this);
>
>	at the entry of the methodAA in classAA
>	
>	could you please let me know regarding this???
>
>Thank you
>Reddy
>
>			
>
>>-----Original Message-----
>>From: Irving, Dave [mailto:Dave.Irving@logicacmg.com] 
>>Sent: Freitag, 4. Februar 2005 15:37
>>To: 'BCEL Users List'
>>Subject: RE: Passing "this" as an argument to a method
>>
>>
>>As far as I understand it, "this" is passed in to methods at 
>>runtime as the
>>first argument.
>>You can therefore put "this" on the stack with something like:
>>
>>InstructionFactory.createLoad(Type.OBJECT, 0)
>>
>>
>>-----Original Message-----
>>From: Koduru, Rajendra Kumar Reddy
>>[mailto:rajendra.kumar.reddy.koduru@sap.com]
>>Sent: Friday, February 04, 2005 1:16 PM
>>To: BCEL Users List
>>Subject: Passing "this" as an argument to a method
>>
>>
>>Hi All,
>>
>>	could you please let me know how could I pass "this"
>>
>>	methodA(this) // passing reference of the invoking object
>>
>>	using bcel
>>
>>Thank you
>>Reddy
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>>
>>This e-mail and any attachment is for authorised use by the 
>>intended recipient(s) only. It may contain proprietary 
>>material, confidential information and/or be subject to legal 
>>privilege. It should not be copied, disclosed to, retained or 
>>used by, any other party. If you are not an intended recipient 
>>then please promptly delete this e-mail and any attachment and 
>>all copies and inform the sender. Thank you.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>This e-mail and any attachment is for authorised use by the 
>intended recipient(s) only. It may contain proprietary 
>material, confidential information and/or be subject to legal 
>privilege. It should not be copied, disclosed to, retained or 
>used by, any other party. If you are not an intended recipient 
>then please promptly delete this e-mail and any attachment and 
>all copies and inform the sender. Thank you.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>

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


Mime
View raw message