RE: Before Return
"Irving, Dave" <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.user |
|---|---|
| Message-ID | <[email protected]> |
Hmmm.... In fact, what I think I'd really like to do is get a try / finally around a whole method call. I know that 'finally' doesn't exist at the byte code level - so I think I've still got the problem of inserting instructions before each return (JSRs I guess...). I've had some experience with BCEL - I managed to get a mock object generator implemented using it (still haven't got round to making it open source....) - but I've never had to insert instructions before like this. Any pointers would be really appreciated! -----Original Message----- From: Irving, Dave Sent: Thursday, August 19, 2004 3:28 PM To: [email protected] Subject: Before Return Hi, I want to make a call to a static method before each return of a method of an existing class - at the moment Im not too fussed about dealing with exceptions. I can find the return instructions easy enough and insert my instructions - but what Im not sure about is how to "re-setup" everything for the return that follows. Has anyone done this before and have any pointers? Many thanks, Dave 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.