Outils pour utilisateurs

Outils du site


developpement:java:javadoc

Tags

Voici une liste des étiquettes utilisées pour javadoc1) :

Tag Description
@author Nom du développeur
@deprecated Marque la méthode comme dépréciée. Certains IDEs génèrent un avertissement à la compilation si la méthode est appelée.
@exception Documente une exception lancée par une méthode — voir aussi @throws.
@param Définit un paramètre de méthode. Requis pour chaque paramètre.
@return Documente la valeur de retour. Ce tag ne devrait pas être employé pour des constructeurs ou des méthodes définis avec un type de retour void.
@see Documente une association à une autre méthode ou classe.
@since Précise à quelle version de la SDK/JDK une méthode à été ajoutée à la classe.
@throws Documente une exception lancée par une méthode. Un synonyme pour @exception disponible depuis Javadoc 1.2.
@version Donne la version d'une classe ou d'une méthode.

Exemple

/**
 * Returns an Image object that can then be painted on the screen. 
 * The url argument must specify an absolute {@link URL}. The name
 * argument is a specifier that is relative to the url argument. 
 * <p>
 * This method always returns immediately, whether or not the 
 * image exists. When this applet attempts to draw the image on
 * the screen, the data will be loaded. The graphics primitives 
 * that draw the image will incrementally paint on the screen. 
 *
 * @param  url  an absolute URL giving the base location of the image
 * @param  name the location of the image, relative to the url argument
 * @return      the image at the specified URL
 * @see         Image
 */
 public Image getImage(URL url, String name) {
	try {
	    return getImage(new URL(url, name));
	} catch (MalformedURLException e) {
	    return null;
	}
 }
developpement/java/javadoc.txt · Dernière modification : 2022/02/02 00:42 de 127.0.0.1