This template should not be substituted. |
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.
Please update Template:Javadoc:SE/Home_URL to update the java version that this link sends users to.
These are the common forms of usage for this template:
Type this | To get this |
---|---|
{{Javadoc:SE}} |
Java SE 19 API Javadocs |
{{Javadoc:SE|java/lang|Object}}
|
Object
|
{{Javadoc:SE|java/lang|Object|clone()}}
|
Object.clone()
|
{{Javadoc:SE|package=java.lang|java/lang}}
|
java.lang
|
{{Javadoc:SE|package=java.lang|java/lang|Object}}
|
java.lang.Object
|
{{Javadoc:SE|package=java.lang|java/lang|Object|clone()}}
|
java.lang.Object.clone()
|
{{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}
|
StandardDoclet
|
In the above example, clone()
can be any member documented in the
Javadoc that isn't a class or interface, so {{Javadoc:SE|java/lang|System|out}}
produces
System.out
. For a class or interface member, the class name is OuterClass.InnerClass
, so {{Javadoc:SE|java/lang|Character.Subset}}
produces
Character.Subset
.
The Javadoc URLs don't include the
generic parameterized types. To get the type parameters to display, specify a class
and/or member
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 >
.
Type this | To get this |
---|---|
{{Javadoc:SE|class=Class<T>|java/lang|Class}}
|
Class<T>
|
{{Javadoc:SE|class=Class<T>|
member=asSubclass(Class<U>)|
java/lang|Class|asSubclass(java.lang.Class)}}
|
Class<T>.asSubclass(Class<U>)
|
{{Javadoc:SE|package=java.lang|class=Class<T>|
java/lang|Class}}
|
java.lang.Class<T>
|
{{Javadoc:SE|package=java.lang|class=Class<T>|
member=asSubclass(Class<U>)|
java/lang|Class|asSubclass(java.lang.Class)}}
|
java.lang.Class<T>.asSubclass(Class<U>)
|
The URL to a method uses the fully-qualified path name of the parameter types. The member
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 name
parameter allows the entire package/class/member name displayed to be replaced. (However, the name
parameter won't override the text displayed when using the {{Javadoc:SE}}
form.)
Type this | To get this |
---|---|
{{Javadoc:SE|name=out|java/lang|System|out}}
|
out
|
Type this | To get this |
---|---|
{{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,%20int)}}
|
String.indexOf(int, int)
|
Type this | To get this |
---|---|
{{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,int)}}
|
String.indexOf(int, int)
|
Type this | To get this |
---|---|
{{Javadoc:SE|java/util|Arrays|sort(java.lang.Object[])}}
|
Arrays.sort(java.lang.Object[])
|
{{Javadoc:SE | member=sort(Object[])|java/util|Arrays|sort(java.lang.Object[])}}
|
Arrays.sort(Object[])
|
java.base
module of the Java API must declare the module
parameter to ensure that the user is sent to the correct area of the documentation. If module
is not specified, the template will default to java.base
- which, if the item in question is not within java.base
, will send the reader to a 404 page.Type this | To get this |
---|---|
{{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}
|
StandardDoclet
|
{{Javadoc:SE|java/awt|Graphics2D|module=java.desktop}}
|
Graphics2D
|
This template should not be substituted. |
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.
Please update Template:Javadoc:SE/Home_URL to update the java version that this link sends users to.
These are the common forms of usage for this template:
Type this | To get this |
---|---|
{{Javadoc:SE}} |
Java SE 19 API Javadocs |
{{Javadoc:SE|java/lang|Object}}
|
Object
|
{{Javadoc:SE|java/lang|Object|clone()}}
|
Object.clone()
|
{{Javadoc:SE|package=java.lang|java/lang}}
|
java.lang
|
{{Javadoc:SE|package=java.lang|java/lang|Object}}
|
java.lang.Object
|
{{Javadoc:SE|package=java.lang|java/lang|Object|clone()}}
|
java.lang.Object.clone()
|
{{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}
|
StandardDoclet
|
In the above example, clone()
can be any member documented in the
Javadoc that isn't a class or interface, so {{Javadoc:SE|java/lang|System|out}}
produces
System.out
. For a class or interface member, the class name is OuterClass.InnerClass
, so {{Javadoc:SE|java/lang|Character.Subset}}
produces
Character.Subset
.
The Javadoc URLs don't include the
generic parameterized types. To get the type parameters to display, specify a class
and/or member
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 >
.
Type this | To get this |
---|---|
{{Javadoc:SE|class=Class<T>|java/lang|Class}}
|
Class<T>
|
{{Javadoc:SE|class=Class<T>|
member=asSubclass(Class<U>)|
java/lang|Class|asSubclass(java.lang.Class)}}
|
Class<T>.asSubclass(Class<U>)
|
{{Javadoc:SE|package=java.lang|class=Class<T>|
java/lang|Class}}
|
java.lang.Class<T>
|
{{Javadoc:SE|package=java.lang|class=Class<T>|
member=asSubclass(Class<U>)|
java/lang|Class|asSubclass(java.lang.Class)}}
|
java.lang.Class<T>.asSubclass(Class<U>)
|
The URL to a method uses the fully-qualified path name of the parameter types. The member
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 name
parameter allows the entire package/class/member name displayed to be replaced. (However, the name
parameter won't override the text displayed when using the {{Javadoc:SE}}
form.)
Type this | To get this |
---|---|
{{Javadoc:SE|name=out|java/lang|System|out}}
|
out
|
Type this | To get this |
---|---|
{{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,%20int)}}
|
String.indexOf(int, int)
|
Type this | To get this |
---|---|
{{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,int)}}
|
String.indexOf(int, int)
|
Type this | To get this |
---|---|
{{Javadoc:SE|java/util|Arrays|sort(java.lang.Object[])}}
|
Arrays.sort(java.lang.Object[])
|
{{Javadoc:SE | member=sort(Object[])|java/util|Arrays|sort(java.lang.Object[])}}
|
Arrays.sort(Object[])
|
java.base
module of the Java API must declare the module
parameter to ensure that the user is sent to the correct area of the documentation. If module
is not specified, the template will default to java.base
- which, if the item in question is not within java.base
, will send the reader to a 404 page.Type this | To get this |
---|---|
{{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}
|
StandardDoclet
|
{{Javadoc:SE|java/awt|Graphics2D|module=java.desktop}}
|
Graphics2D
|