Hi,

I want to generate the code for a method like

public String getName(){
        return this.name;
}

I am successful in creating the method using the MethodGen class, but am not
able to figure out,
how do i create the instruction within and get an access to this and then
the name variable. After that, how do i pass the returnInstruction.
I tried using the InstructionFactory.createReturn() method, but i guess, it
will only get the instruction. how do i get the variable on which the
instruction is to be executed.

If you could please help me. Any code snippet would be highly appreciated.

Thanks and Regards,
------------------------------------
Sapan Shah
Software Engineer
Patni Computer Systems Limited
A 78/9 GIDC  Electronics Estate,
Sector 25,
Gandhinagar
mob: (+91)98240 59280
http://www.patni.com
World-Wide Partnerships. World-Class Solutions

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom this
message was originally addressed. Any review, e-transmission dissemination
or other use of or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If you
have received this e-mail in error kindly delete this e-mail from your
records. If it appears that this mail has been forwarded to you without
proper authority, please notify us immediately at [EMAIL PROTECTED] and
delete this mail.


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

Reply via email to