I want that when i mouse over a method i would be able to see my documentation of what the method does like when i put the mouse over Java's method I know that /** */ is how its done but:
How do you explain what the Params Stands for?
How do you create a new line, or make a word bold or italic?
If you're using Eclipse as IDE, you just need to create a comment with
/**
and press enter and it will generate your code for your Javadoc, including parameters, return values, etc. You just need to put in the descriptions.
The same applies for class declarations (the Javadoc comment always relates to the following element)
Note:
To attach doc to your method you need to specify method name in comments at the top.
For instance
/**
* create_instance
* @param array of attributes for instance containing web, db, arrival_rate, response_time for instance
* respectively.
* @return Instance object
*/
How do you explain what the Params Stands for?
Use @param
tag:
/**
* @param paramName Explanation of the param
*/
public void foo(String paramName);
How do you create a new line, or make a word bold or italic?
Use standard HTML, i.e. <p></p>
, <br/>
, <strong>
and <em>
(or less semantic <b>
and <i>
)
来源:https://stackoverflow.com/questions/11763803/how-to-document-my-method-in-java-like-java-docs