The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Re : Comment extraction

Posted by Pierre on June 18, 2001 at 6:15 AM

> Hi

> I have a problem wanna want to solve.........

> I want to extract the comments about a method in a class just like java doc does.

> like i have a method

> /** here are comments about the methos
> *@param int
> *@return int

> */

> public int myMethod(int a){

> return a;
> }

>
> now i have got the class name and method name and other informations using the java.lang.reflection package but i also want to extract its comments or u can say descriptions but how............. a big queston for me...

> Now its upto u that u sove my problem....

> ronald
Well if the pb is to extract comment from a binary .class file
it's just impossible. I'm not 100% sure but it would make
sense that the compiler just not include the comments
in the binary file

If it is to get this info from the source file you'll have
to write you're own parser i guess reading the source file
and matching. perhaps using package such as gnu.regexp for java
could help





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us