You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Maxim Degtyarev <md...@gmail.com> on 2014/08/26 17:39:05 UTC
[BCEL] Disassembling code
Hello,
I'm currently developing an application that trace java code using JDI API
and wish be able to disassemble code being traced.
BCEL has such a functionality in the form of Utility.codeToString() method.
Problem:
The codeToString() requires ConstantPool instance while
ConstantPool(DataInputStream) constructor has package-level visibility and
no utility method to construct constant pool from byte[] provided.
Of course ConstantPool can be subclassed with descendant in same package
but this is definitely a hack.
What solution you might suggest?
I presonally tend to add new factory method constructing ConstantPool from
byte[] to the Utility.java but it is unclear to me how to submit a patch to
the BCEL.
Re: [BCEL] Disassembling code
Posted by Gary Gregory <ga...@gmail.com>.
Maxim,
You can start here: http://commons.apache.org/patches.html
Make sure you check out the trunk code and attach your patch with unit
tests to a JIRA issue.
Gary
On Tue, Aug 26, 2014 at 11:39 AM, Maxim Degtyarev <md...@gmail.com>
wrote:
> Hello,
>
> I'm currently developing an application that trace java code using JDI API
> and wish be able to disassemble code being traced.
>
> BCEL has such a functionality in the form of Utility.codeToString() method.
>
> Problem:
>
> The codeToString() requires ConstantPool instance while
> ConstantPool(DataInputStream) constructor has package-level visibility and
> no utility method to construct constant pool from byte[] provided.
>
> Of course ConstantPool can be subclassed with descendant in same package
> but this is definitely a hack.
>
> What solution you might suggest?
>
> I presonally tend to add new factory method constructing ConstantPool from
> byte[] to the Utility.java but it is unclear to me how to submit a patch to
> the BCEL.
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory