Re: Manipulate new in a class file using BCEL?
"Martin Schoeberl" <[email protected]> Sat, 18 Nov 2006 00:41:52 +0100
| Newsgroups | gmane.comp.jakarta.bcel.user |
|---|---|
| Message-ID | <02e001c70aa1$fc3fcac0$f3e18380@luna> |
>Is it possible to use BCEL to malipulate the class file (new, newarray, ..) so >that a new object is created on a particular >address in this scoped memory? You can substitute each new or newarray in BCEL with e.g., a invokation of a static method where you implement your scoped memory version of new. The main issue is: Do you know the object layout of your target JVM? The internal structure (handles or not)? This is not a BCEL property, but it depends on your JVM. Furthermore you need a low-level (native) function to directly manupulate the memory (heap). Martin