Re: Javadoc is not for beginners
Thomas Adrian wrote:
....
Thank you all for replying.
I am still looking for someone who can explain to me how to read a
javadoc so I know how to implement a class.
Please, give me some walk through how you guys think when looking at a
javadoc, what is the first thing you look at, and what's the next
step.
....
How I read a Javadoc depends on what I am doing, and what I am trying to
find out.
If I am not familiar with the package, I would begin by reading the
package documentation.
Similarly, if I am not familiar with the class I read the beginning of
the page for the class.
You talk about "implement a class". That is, for me, a much rarer
situation than needing to use the class. For most uses, I do a quick
scan of the summary tables to find the constructors and methods I need,
then read the details for those methods. I assume from the existence of
the summary tables that the designers of Javadoc expected that behavior.
If I needed to implement an interface or extend a class I would usually
begin by creating a Junit test and an empty class declaration in Eclipse
with the right superclass or interface. That will get me an Eclipse
error marker that I resolve by telling it to add the necessary method
declarations.
After that, I go through the method declarations reading the Javadoc
comment for each, deciding what it means in my new class, writing the
unit test according to that documentation and then writing the code. In
some cases I will need to override a non-abstract method. Again, I do it
by using Eclipse to produce the proper declaration and the Javadoc for
the method to tell me the rules for it.
I hope this is something like what you want.
Patricia