Re: Feedback and Possible enhancements
Markus Dahm <[email protected]>
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, > 1) InstructionFactory doesn't have a create method for INSTANCEOF. At first > I assumed 'createCheckCast' would do it. Fixed. > 2) Creating a try catch catch finally was a real pain. It was not obvious > that an exception type of null would create the finally part, and the > arrangement of all the bytecodes seems like something that could be > automated easily. Could I suggest something like: Byte code for finally is really ugly, but you can use the BCELifier to find out how to implement it. Your suggestion is just what the CompoundInstruction interface is intended for. However, such a template is not that simple to implement, since you have to consider where to store the exception references and the return address. Should this be passed by the user or be created automagically somehow? Feel free to implement such a template, I'll gladly add it to BCEL :) Cheers Markus