You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by samuel cheung <sy...@gmail.com> on 2006/07/10 07:34:02 UTC

Newbie: Use Bcel to analysis class file

Hi,
I am new to bcel.
Can you please tell me if I can use BCEL to analysis class file, e.g.
I would like to find out how much (in term of the size in bytes)of the
class file is Constant pool, Fields, Methods?

Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Re: Re: Newbie: Use Bcel to analysis class file

Posted by Torsten Curdt <tc...@apache.org>.
This *might* be easier to do with ASM. You could wrap the input stream
and check at each event where you are at ...but this only works if ASM
does not buffer the stream.

Someone asked a similar question on the ASM list. Maybe have a dig there.

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Re: Newbie: Use Bcel to analysis class file

Posted by samuel cheung <sy...@gmail.com>.
Thanks for your help. I would like to analysis each class in the jar,
so it is easier for me  if I can write a tool to do that.

Thank you.
Sam



On 7/10/06, Dave Brosius <db...@apache.org> wrote:
> BCEL wouldn't be able to tell you the size in bytes of various sections of
> the class file using the api.
> You could get a rough estimate i suppose, but if that is what you want, it
> would probably be better just to
> read the class file yourself.
>
>
> ----- Original Message -----
> From: "samuel cheung" <sy...@gmail.com>
> To: <bc...@jakarta.apache.org>
> Sent: Monday, July 10, 2006 1:34 AM
> Subject: Newbie: Use Bcel to analysis class file
>
>
> > Hi,
> > I am new to bcel.
> > Can you please tell me if I can use BCEL to analysis class file, e.g.
> > I would like to find out how much (in term of the size in bytes)of the
> > class file is Constant pool, Fields, Methods?
> >
> > Thank you.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: bcel-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Re: Newbie: Use Bcel to analysis class file

Posted by Dave Brosius <db...@apache.org>.
BCEL wouldn't be able to tell you the size in bytes of various sections of 
the class file using the api.
You could get a rough estimate i suppose, but if that is what you want, it 
would probably be better just to
read the class file yourself.


----- Original Message ----- 
From: "samuel cheung" <sy...@gmail.com>
To: <bc...@jakarta.apache.org>
Sent: Monday, July 10, 2006 1:34 AM
Subject: Newbie: Use Bcel to analysis class file


> Hi,
> I am new to bcel.
> Can you please tell me if I can use BCEL to analysis class file, e.g.
> I would like to find out how much (in term of the size in bytes)of the
> class file is Constant pool, Fields, Methods?
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org