- just a comment.
is javadoc, which can then be converted to good HTML documentation using a tool, which, oddly enough, is javadoc . This tool considers the javadoc comment itself, the declaration of the class / interface / method and any other implementations / contracts of super / subclasses (for example, when creating information about the "specified" and "overriding" methods). The most notable example of this is the Java SE API document itself .
This documentation comment includes its own markup, such as @see Bar . It can determine program considerations, such as method parameters and their descriptions, the type of method returned, the exceptions that are declared to the method, and the circumstances under which they will be thrown, and other information.
For example, ArrayList#toArray() documented as
public <T> T[] toArray(T[] a)
Returns an array containing all the elements in this list, the correct sequence (from the first to the last element); runtime type Return array - An array of the specified array. If the list matches the specified array, it is returned in it. Otherwise, the new array selected by the runtime type of the specified array and the size of this list.
If the list corresponds to the specified array with a spare number (i.e. the array has more elements than the list), the element in the array is immediately set to null after the collection ends. (This is useful in determining the length of a list only if the caller knows that the list does not contain any null elements.)
It is indicated:
toArray in Collection interface
It is indicated:
toArray in the List interface
Redefinition:
toArray in class AbstractCollection
Type parameters:
T - type of runtime array containing a collection of Parameters:
a - an array in which list items should be stored, if it is large enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Return:
array containing list items
Throws:
ArrayStoreException - if the execution type of the specified array is not a supertype of the execution time of each element in this list
NullPointerException - if the specified array is null
from
source share