Extracting elements from Java Code

Hi,I need to extract the import statements, classnames, method names,comments and the code block from a Java Code using Java.Has anyone got any idea regarding as to how can this be done.?
[208 byte] By [RAMGa] at [2007-11-27 5:28:58]
# 1
you got a .java, and want to read the content of this file with a java program?
calvino_inda at 2007-7-12 14:51:44 > top of Java-index,Java Essentials,Java Programming...
# 2

> Hi,

> I need to extract the import statements,

> classnames, method names,comments and the code block

> from a Java Code using Java.

>

> Has anyone got any idea regarding as to how can this

> be done.?

Parse the source code using e.g. JavaCC

kajbja at 2007-7-12 14:51:44 > top of Java-index,Java Essentials,Java Programming...