Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a javadoc tag for documenting generic type parameters?

Tags:

java

javadoc

People also ask

What are Javadoc tags?

The javadoc TagsRepresents the relative path to the generated document's root directory from any generated page. Adds a comment indicating that this API should no longer be used. Adds a Throws subheading to the generated documentation, with the classname and description text.

What is Javadoc style documentation?

Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at http://download.oracle.com/javase/6/docs/api/.)

What should be included in a Javadoc?

Before using JavaDoc tool, you must include JavaDoc comments /**……………….. */ providing information about classes, methods, and constructors, etc. For creating a good and understandable document API for any java file you must write better comments for every class, method, constructor.


It should be done just like this:

/**
 * @param <T> This describes my type parameter
 */
class MyClass<T>{

}

Source


Yes. Just use the @param tag, and include angle brackets around the type parameter.

Like this:

/**
 *  @param <T> This describes my type parameter
 */