Wrote a custom doclet using the
Doclet API (located inside the tools.jar).
The purpose for the doclet is to load
Java source files and create stubs (which are identical Java source files but do not contain any method implementation details).
Instead, the method implementation details need to be replaced with blank lines...
As one can see, I am just creating the method and placing the opening and closing curly braces (along with a new \n line escape sequence, in between).
Am not really that familiar with the Doclet API...
Question(s):
(1) What is the best way to figure out how many lines of code are inside each method and then use a for loop to insert the exact same number of blank lines inside the methods?
(2) Is there a way to do it using the com.sun.javadoc.SourcePosition.line() method?
Would really appreciate it if someone could assist me by suggesting possible workarounds / solutions, because this is an important and urgent requirement.
Happy coding to all,
Mike
[ July 22, 2008: Message edited by: Michael K. Wilson ]