Yeah, this is why I started putting together the harmony.bytecode package. I also had the ClassPool to let me handle resolving duplicates when pulling them out -- the UTF8 constants are added into the hashmap, then there's an optional place to sort (which I didn't implement, and then they get streamed out in ID order.
The BCEL provides easy way of loading/accessing class files, but realistically, they're not that complicated and the harmony.bytecode.* stuff did that already. At least, that's why I started down that route in the first place ... Alex. On 04/10/2007, Andrew Cornwall <[EMAIL PROTECTED]> wrote: > Hmm... I'm starting to worry that BCEL might not be able to do what we need. > Its default behaviour is to be very unconcerned with the order of classpool > entries - something that Pack200 is extremely concerned with. I've hacked up > a version of BCEL which will allow me to add a String reference to the > classpool without knowing ahead of time which Utf8 the String refers to - > but given that Pack200 is mostly writing out things that don't change > (except for classpool refs) I wonder if BCEL gives us much of an advantage. > > Andrew Jr. > > > On 10/2/07, Sian January <[EMAIL PROTECTED]> wrote: > > > > Hi Andrew, > > > > I can't see a problem with not using those APIs so that we leave that > > option > > open, although I obviously can't comment on how easy it would be to > > strip them out as I don't know the BCEL code. > > > > Thanks, > > > > Sian > > > > > > On 02/10/2007, Andrew Cornwall <[EMAIL PROTECTED]> wrote: > > > > > > Some of the people here are interested in minimizing the size of the > > > pack200 > > > runtime. If BCEL is used, can we ensure that pack200 doesn't rely on the > > > bytecode verification / html rendering code so that can be stripped out > > if > > > necessary? > > > > > > Andrew Jr. > > > > > > > > > > > -- > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with number > > 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > > >
