Template:Javadoc:SE/doc

Template for creating an external link into the Javadoc for a class in the current version of the Java SE API. This template should be used instead of an explicit URL to allow the link to be automatically updated to the latest API when this template is updated.

Usage
These are the common forms of usage for this template:


 * {| class="wikitable"

! Type this !! To get this
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }

In the above example,  can be any member documented in the Javadoc that isn't a class or interface, so   produces. For a class or interface member, the class name is, so   produces.

The Javadoc URLs don't include the generic parameterized types. To get the type parameters to display, specify a  and/or   parameter to the template to override the name of the displayed class and/or member name. Note that the parameterized type notation uses angle brackets ( and  ), so type parameter names that match HTML markup tags need to use the character encodings   for   and   for.


 * {| class="wikitable"

! Type this !! To get this
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }
 * }

The URL to a method uses the fully-qualified path name of the parameter types. The  parameter can be used to use the simple type name of method parameters, as shown in the preceding table, or even to eliminate the parameters entirely.

Finally, if none of the above work for the displayed text, supplying a  parameter allows the entire package/class/member name displayed to be replaced. (However, the  parameter won't override the text displayed when using the   form.)


 * {| class="wikitable"

! Type this !! To get this
 * }
 * }
 * }
 * }

Issues

 * 1) Some versions of Javadoc, such as the version used to create the current Javadoc API pages, put spaces between the parameter names in the anchor tags used to link to the definitions of members.  Unfortunately, that means to get a link to a method or constructor with two or more parameters to display correctly, the method/constructor signature needs both a displayed and link version like this:
 * {| class="wikitable"

! Type this !! To get this
 * }
 * Links in the current version do not contain spaces, the spaces are simply removed in the anchor tags.
 * {| class="wikitable"
 * }
 * Links in the current version do not contain spaces, the spaces are simply removed in the anchor tags.
 * {| class="wikitable"

! Type this !! To get this
 * }
 * 1) Including square brackets ([, ]) in the parameter types of method or constructor member arguments seems to break the template.  Instead, replace square brackets with their numeric character reference escape codes, &amp;#91; and &amp;#93;, like this:
 * {| class="wikitable"
 * }
 * 1) Including square brackets ([, ]) in the parameter types of method or constructor member arguments seems to break the template.  Instead, replace square brackets with their numeric character reference escape codes, &amp;#91; and &amp;#93;, like this:
 * {| class="wikitable"

! Type this !! To get this
 * }
 * }
 * }
 * }
 * }
 * }
 * }