Download - JavaDoc
![Page 1: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/1.jpg)
JavaDoc
M.C. Juan Carlos Olivares Rojas
![Page 2: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/2.jpg)
Introducción• Es el estándar para crear documentación para
los proyectos en Java.
• Es una herramienta estándar del JDK de Sun Microsystem. Crea documentación en HTML y casi cualquier IDE lo hace.
• Se deben utilizar los comentarios especiales /** …..*/ con algunas palabras clave para determinar la documentación.
![Page 3: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/3.jpg)
Elementos
• Las palabras clave inician con una arroba.
• Se puede incrustar cualquier etiqueta de HTML para hacer más visible la documentación.
• @author nombre_desarrollador• @deprecated descripción //indica un método
que no se utiliza su uso
![Page 4: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/4.jpg)
Elementos
• @param nombre descripción
• @return descripción //no se debe utilizar con métodos void.
• @see referencia //asocia con otro elemento el cual puede ser: #método(); clase#método(); paquete#método(); paquete.clase#método().
• @throws clase descripcion
• @version versión
![Page 5: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/5.jpg)
Generación de la Documentación
• La documentación se crea de la siguiente forma: javadoc archivo.java
• En NetBeans se puede encontrar la opción en el menú Build en la opción Generate JavaDoc for …
• Se recomienda realizar tanto el código como las clases en inglés.
![Page 6: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/6.jpg)
Ejemplo
/**
* Thrown to indicate that the application has attempted to convert
* a string to one of the numeric types, but that the string does not
* have the appropriate format. *
* @author unascribed
* @version 1.16, 02/02/00
* @see java.lang.Integer#toString()
![Page 7: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/7.jpg)
Ejemplo* @since JDK1.0
*/
public class NumberFormatException extends IllegalArgumentException {
/**
* Constructs a <code> NumberFormatException </code> with no detail message.
*/
public NumberFormatException () { super(); }
![Page 8: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/8.jpg)
Ejemplo
/**
* Constructs a <code> NumberFormatException </code> with the
* specified detail message.
* @param s the detail message.
*/
public NumberFormatException (String s) { super (s); } }
![Page 9: JavaDoc](https://reader036.vdocumento.com/reader036/viewer/2022083006/56813dc5550346895da78cfc/html5/thumbnails/9.jpg)
¿Preguntas, dudas y comentarios?