harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Loenko, Mikhail Y" <mikhail.y.loe...@intel.com>
Subject RE: Writing JavaDoc
Date Thu, 12 Jan 2006 18:19:34 GMT
Well, I'll try to summarize what we have

There are three types of methods:
1. Methods that are part of the API, they are specified, they follow the
Sun's spec and we have nothing to add.
2. Methods that are part of the API and we have something to add (ex.:
the spec allows multiple behaviors).
3. Private methods or methods in com.*, org.* areas etc.

I think we all agree that we have to document #3. But it's not clear for
me what we do with #1 and #2. I suggest discussing #1 first.

We might want to omit documentation for #1 methods (though if the doc
describes all the methods except a single one - it might be confusing)
or put there some standard words (like this method is implemented
according to the spec) and either do or don't provide a link to the
Sun's spec.
In the .java source files we might either skip javadoc comment (though
it would not improve code readability) or provide some standard words
for all such methods.

Another option is to put reworded content of Sun's spec into the
documentation. I do not like this idea: if we say that our
implementation works according to our wording but not to the official
spec we might have problems with naming it Java (or we will have to say
"we implement our own spec that is semantically equivalent to Sun's
spec", which we'll have to prove first :). Moreover, we will need a
number of native English speakers who will volunteer to write the docs
for us.

So, what do we do with the methods that act exactly as specified?


Thanks,
Mikhail Loenko
Intel Middleware Products Division

>-----Original Message-----
>From: Tim Ellison [mailto:t.p.ellison@gmail.com]
>Sent: Tuesday, January 10, 2006 7:21 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: Writing JavaDoc
>
>Sorry, I misunderstood.  So your option #3 is not copying the JavaDoc
>and redistributing it, but documenting links to the Sun site.
>
>IMHO, creating a set of JavaDoc that contains links to Sun's existing
>JavaDoc is unlikely to appeal to most people -- the package/type/method
>naming is enough of an index to go and find it easily on the Sun
website
>already.  Publishing an index of links doesn't add anything.
>
>If the additional 'value' are the comments that are added, then I
expect
>that annotating Sun's original JavaDoc may be frowned upon(*).  At
least
>if we originally author all the documentation we can do what we like.
>
>I'm interested to hear others' views.
>
>(*) you may recall the brouhaha over JDocs a while ago (if not, google
>for 'Rick Ross JDocs' to get a flavour)
>
>Regards,
>Tim
>
>
>Loenko, Mikhail Y wrote:
>> Agreed with #1
>>
>> Let me better explain #3. It is not a taglet copying Sun's spec.
Instead
>> it should insert pointers to specification of actual methods on Sun's
>> website. So the resulting docs would look like the following:
>>
>>     public Foo(type arg)
>>
>>     Spec reference: See corresponding <a [link to Sun's spec]>J2SE
API
>> specification reference</a>
>>
>>     And some additions, like "The spec allows this and that behavior,
we
>> did it this way because ..."
>>
>> What IMHO would not be a good idea is rewording complex method
>> descriptions as we could unintentionally change semantics and mislead
>> people who read our docs rather then official spec.
>>
>> Thanks,
>> Mikhail Loenko
>> Intel Middleware Products Division
>>
>>
>>>-----Original Message-----
>>>From: Tim Ellison [mailto:t.p.ellison@gmail.com]
>>>Sent: Tuesday, January 10, 2006 4:26 PM
>>>To: harmony-dev@incubator.apache.org
>>>Subject: Writing JavaDoc (was: Re: [RESULT] ( Was Re: [VOTE] Accept
>>
>> JIRA contribution HARMONY-16
>>
>>>(Intel's contrib of security code for classlib)))
>>>
>>>Loenko, Mikhail Y wrote:
>>>
>>>>Thanks for accepting the contribution
>>>>
>>>>
>>>>
>>>>>There's a bit of things that come out of this, like the
>>>>>"com.intel.drl.spec_ref" javadoc tag that we should convert, and
>>
>> such.
>>
>>>>
>>>>What would be the best for those javadocs? We can have 3 possible
>>>>options:
>>>>1. Copy-paste from the spec. Not sure it is legal
>>>
>>>This one definitely has to be out.  The Sun JavaDoc is a
>>>copyrighted/licensed work so making a verbatim copy is unacceptable.
>>>
>>>
>>>>2. Reword the spec. More likely to be legal
>>>
>>>As I see it, the JavaDoc fulfils (at least) two purposes.  It
embodies
>>>the java spec (i.e. the definition of the standard library's
>>
>> behaviour),
>>
>>>and it is the principal developer documentation (i.e. how to use the
>>>library).  We do not want to change the specification in any way, but
>>>can enhance the usability of the documentation to developers.
>>>
>>>For example, it would IMHO be wrong to specify the behaviour of a
>>
>> method
>>
>>>with more/less restrictions than the original reference javadoc,
>>
>> because
>>
>>>that implies that developers can make assumptions on one
implementation
>>>that they cannot on the other.  However, it is reasonable to give
more
>>>examples, usecases, even performance, threading guidelines, etc. that
>>
>> do
>>
>>>not change the functional specification.
>>>
>>>So I'd say writing some JavaDoc, that was neither a direct copy of
the
>>>original, nor 'enhancing' the specification, can provide value to
>>>developers.
>>>
>>>
>>>>3. Replace the tag with a different one and provide taglet to build
>>
>> the
>>
>>>>doc from the Harmony sources and Sun's spec.
>>>
>>>If I understand this correctly, then I don't see how this is
>>>substantially different to option (1)?  Whether it is a human that
does
>>>the cut-n-paste into the Harmony release, or a doclet, the result
>>>includes somebody else's work.
>>>
>>>Regards,
>>>Tim
>>>
>>>
>>>>Currently IBM's contribution seems to have #2. Does anyone have an
>>>>opinion?
>>>>
>>>>Thanks,
>>>>Mikhail Loenko
>>>>Intel Middleware Products Division
>>>>
>>>>
>>>>
>>>>>-----Original Message-----
>>>>>From: Geir Magnusson Jr [mailto:geir@pobox.com]
>>>>>Sent: Friday, December 30, 2005 10:48 PM
>>>>>To: harmony-dev@incubator.apache.org
>>>>>Subject: Re: [RESULT] ( Was Re: [VOTE] Accept JIRA contribution
>>>>
>>>>HARMONY-16 (Intel's contrib of
>>>>
>>>>
>>>>>security code for classlib))
>>>>>
>>>>>
>>>>>
>>>>>Tim Ellison wrote:
>>>>>
>>>>>
>>>>>>Geir Magnusson Jr. wrote:
>>>>>><snip>
>>>>>>
>>>>>>>I'll finish moving to SVN and we'll put into the classlib tree,
I
>>>>
>>>>suppose.
>>>>
>>>>
>>>>>>Great.  Thanks again Mikhail and the team!
>>>>>>
>>>>>>I suggest you either put it into the classlib tree at
>>>>>>"classlib/java-src/security2" or leave it in the sandbox, then we
>>
>> can
>>
>>>>>>merge it into the existing security structure without breaking the
>>>>
>>>>world.
>>>>
>>>>
>>>>>I'll go for the former and try to whip it into common shape, and we
>>
>> can
>>
>>>>>then decide how we do this - drop the existing security if
security2
>>
>> is
>>
>>>>>a superset, or merge.
>>>>>
>>>>>There's a bit of things that come out of this, like the
>>>>>"com.intel.drl.spec_ref" javadoc tag that we should convert, and
>>
>> such.
>>
>>>>>Also will give me a good change to frame out the test infra.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Regards,
>>>>>>Tim
>>>>>>
>>>>
>>>>
>>>--
>>>
>>>Tim Ellison (t.p.ellison@gmail.com)
>>>IBM Java technology centre, UK.
>>
>>
>
>--
>
>Tim Ellison (t.p.ellison@gmail.com)
>IBM Java technology centre, UK.

Mime
View raw message