We should give at least a brief description of both, so that the programmer who will catch them does not even have the possibility of not understanding what it is.
/**
* Modelo para criação e validação do Código de Barras da Caixa
*
* @author João Victor B. Magalhães
* @since 0.1
* @version 0.1
*
*/
public class CodigoDeBarrasCaixa implements CodigoDeBarrasBoleto {
private String digitos;
private BoletoBancario boleto;
private static final int TIPO_DE_COBRANCA = 2;
private static final int ID_EMISSOR_BOLETO = 4;
private static final int TIPO_MOEDA = 9;
}
I don’t see the need to document the Getters and Setters, but if you have a more complex method or an attribute that is difficult to understand, you should document it as well. In the controller the same thing, give a description of what he does and if he has any method out of the "common" document it.
If you’re already a program that’s distributed on a team put @Ince always so the team knows when you’ve added the method and @version as well.
What would be the best way to describe the function of a given class and/or method ? Even the "normal" comments themselves ?
– Daniel Santos
@Danielsantos no, regarding classes and/or methods (which will be used by other developers, or even you in the future) is that you should use javadoc. What I mentioned was that if the idea was to document the use of the graphical interface by the users there yes javadoc would not be the most appropriate.
– Gabriel Rossini Martins