Re: How to copy an InsnList?

Eric Bruneton <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Markus Heiden wrote:
> Hi,
>  
> I know there had been a discussion "How to copy an InsnList" a long time 
> ago, but I didn't find an easy solution in that discussion.
> So how to copy an InsnList without too much effort?
> My aim: I want to transform a method (MethodNode) of a class (ClassNode) 
> and also want to add copy of that method which has been differently 
> tranformed to that class.
>  

a possibility is to use InsnList.accept() or MethodNode.accept() with a 
MethodNode as parameter (with an overriden getLabelNode method to 
duplicate labels / label nodes)

Eric
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.