Reputation: 37
So this is a snippet from one of my classes with a java doc comment btu when i call it the java doc doesnt show fully only the first param shows the rest is not present why? what am i doing wrong? Do i need to format it properly?
/**
* @param String timestamp
* @param int empire
* @param int federation
* @param int independent
* @param int alliance
*/
public ReputationEvent(String timestamp, int empire, int federation, int independent, int alliance) {
super(timestamp);
this.empire = empire;
this.federation = federation;
this.independent = independent;
this.alliance = alliance;
}
Calling Class to create new instance of it, not showing the full java doc comment
Upvotes: 1
Views: 1968
Reputation: 5256
Switch the order of your @param. Usually you don't write the type of the variable.
/**
* <A short description of your method / class / whatever>
*
* @param <name of the variable> <describe your variable>
*/
Example:
/**
* Print a number on the screen.
*
* @param number The number that will be print on the screen.
*/
Upvotes: 2
Reputation: 407
The syntax is
@param <name of parameter> <description>
If you generate javadoc from your example, it gives you the following error:
error: @param name not found* @param int federation
Because "int" is not the expected name for the parameter, which is "federation".
Upvotes: 0