You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Vincent Marquez <vm...@totemworks.com> on 2005/04/26 09:54:47 UTC

Moving methods from one class to another?

I'm wondering if there is an easy way to move methods from one class to 
another?  The idea was to be able to copy all methods from one class to 
other classes, programatically.  The problem is of course the constant 
pool.  I was hoping there might be an easier way to do this, instead of 
having to find what constants the original IndexedInstructions were 
refrencing, and finding out where they are in the new class.   If anyone 
has any good ideas on how to do this an easy way, it would be 
appreciated.  Thank you for your time.

--Vince

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


Re: Moving methods from one class to another?

Posted by Andrew Huntwork <as...@huntwork.net>.
Hi Vincent,

I thought i'd just chime in and say that your approach sounds reasonable 
to me.  i've written almost the exact code you're talking about to do a 
method inliner, and i couldn't think of anything better at the time.

Vincent Marquez wrote:
> I'm wondering if there is an easy way to move methods from one class to 
> another?  The idea was to be able to copy all methods from one class to 
> other classes, programatically.  The problem is of course the constant 
> pool.  I was hoping there might be an easier way to do this, instead of 
> having to find what constants the original IndexedInstructions were 
> refrencing, and finding out where they are in the new class.   If anyone 
> has any good ideas on how to do this an easy way, it would be 
> appreciated.  Thank you for your time.
> 
> --Vince
> 
> ---------------------------------------------------------------------
> 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