Re: Analysis of methods

"J.Pietschmann" <[email protected]>
Newsgroups gmane.comp.jakarta.bcel.user
Message-ID <[email protected]>
Jean Morissette wrote:
> I need to analyse a class (dynamically during classloading or runtime, 
> or statically with .java or .class) to identify, for all methods of this 
> class, if a method read or update a class field.  How to achieve that? 
> Is there some projects that already achieve that?  What are my options?

The last three links on
  http://cvs.apache.org/~pietsch/
point to a Java file which implements a BCEL 5.0 based analyzer and
associated files. The analyzer tries to determine whether fields
and methods are only accessed by the class itself (allows private
access), subclasses (protected) or other classes, in order to
determine if the declared access class is to broad.
Maybe you can pick something from this. The BCEL 5.1 examples
have similar, possibly simpler code.

J.Pietschmann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.