――Now, the eleventh article that you can just write as a letter that you are using it as a matter of course. ――I have to leave the daily updates for about two days, and I'm going to jump in time with the feeling that I can replace it with anything. ――Even if only two days have passed, it feels like it's been a while, and you can see how you have continued to escape from reality every day and faced illusions seriously. ――This time, let's send the second copy of Java coding method as a continuation of the previous one.
―― "Convention" ... I was careful only about the basic naming of classes, methods, variables, etc. ―― “Method” ・ ・ ・ From the learning stage, I didn't consciously describe it, and I thought it would be good if I could understand the meaning.
→ In team development, etc., the description lacks uniformity and readability, causing a great deal of inconvenience.
――Re-learn from the basics about rules and practices in books and online. --Check the human code while looking at sample programs and open source projects.
Javadoc
--Javadoc is a mechanism to generate HTML API specifications from source code. --By describing in the format, you can easily create a document explaining the defined method or class in Javadoc.
--Write a comment in "/ **" and "\ * /". --The text is basically written in HTML format. --The categories are divided into "description" and "tag section". --"Explanation" is recognized as an HTML sentence. When dividing into multiple lines, use line feed tags such as \
. --The "tag section" starts with @. --Some tags can be used multiple times and some tags can be used only once. --Don't write a description after the tag section description. --The main types are as follows. -@author
--Represents the writer (author). --Can be specified multiple times. -@version
--Represents the current software version. --Can be specified multiple times. -@see
/**
*Test class
*
* @author t_o_d
* @version 4.6
* @see <a href="https://www.google.co.jp/">Google</a>
*/
public class Test{
/**
*message
*/
private String message;
/**
*age
*/
private int age;
/**
*Information settings
* @param name
name
* @param number
personal number
@deprecated Replacement from another method{@link #infoConfiguration(String name, int number)}
*/
public void setInfo(String name, int number){
}
/**
*Get message
* @return message
*
* <pre>
*The setting is{@link com.example.Main#setResult()}
*The setting is{@linkplain com.example.Main#setResult()}
* </pre>
*
* @since 4.6
*/
private int resultCalculation(int firstNumber, int secondNumber) {
return number1 + number2;
}
/**
*Read
* @throws java.io.IOException
*I / O error
*/
public void readFromFile() throws IOException{
}
}
――This time, as it is the second code method, I will write an article while remembering the time when I had a feeling of love at first sight for "automatic document creation in a specified format". ―― "I'd be happy if I could do anything with the minimum amount of request in everything," and I shouldn't let him "dating" even with punishment. I can't help it anymore. ――For that reason, I am living a restricted life, and I pledge to accept my destiny and continue to devote myself to fantasy play and waste investigation, etc., and proudly make an oath that no one can remember. ..
Recommended Posts