Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New javadoc annotation @apiNote

Tags:

I found a new and undocumented javadoc tag at LongStream class documentation. The javadoc tag @apiNote seems to be used to detail some explanation about a method, but there's no documentation or release notes about this tag.

What's the real purpose of it? Where is its documentation?

A compiled javadoc example using @apiNote can be found at Reduce method documentation

like image 268
Rafael Borja Avatar asked Mar 26 '14 21:03

Rafael Borja


People also ask

What is Apinote?

An APINOTES file is a metadata file used by a program written in Apple's Swift programming language. It contains annotations for an Objective-C API that the program is accessing. The APINOTES file provides additional semantic information that is not present within the Objective-C API's headers.

What is the Javadoc tag for a parameter?

The @param tag is followed by the name (not data type) of the parameter, followed by a description of the parameter. By convention, the first noun in the description is the data type of the parameter.

What is a Javadoc statement?

In general, Javadoc comments are any multi-line comments (" /** ... */ ") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values.


1 Answers

From the mailing list item quoted by @bargenson:

These tags are enabled by use of the -tag feature on the javadoc tool command line. They are not proposed as standard javadoc tags and may be implemented differently in future Java releases. Since they are implemented as custom tags just for the JDK API documentation you can't automatically use them in your own code. (You can, of course, add the same command line options to your javadoc invocations if you like these tags).

So they aren't standard Javadoc tags at all.

like image 88
user207421 Avatar answered Oct 05 '22 23:10

user207421