Content deleted Content added
m →Usage: syntaxhighlight |
m added a link to Template:Javadoc as well |
||
(2 intermediate revisions by one other user not shown) | |||
Line 4:
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
If you would prefer to include a link to the javadocs of a specified version of Java, see [[Template:Javadoc]] (supports versions from JDK 11).
== Usage ==
Line 45 ⟶ 47:
|-
| <syntaxhighlight lang="wikitext">{{Javadoc:SE|class=Class<T>|
member=asSubclass(Class&
java/lang|Class|asSubclass(java.lang.Class)}}</syntaxhighlight>
| {{Javadoc:SE|class=Class<T>|member=asSubclass(Class<U>)|java/lang|Class|asSubclass(java.lang.Class)}}
Line 54 ⟶ 56:
|-
| <syntaxhighlight lang="wikitext">{{Javadoc:SE|package=java.lang|class=Class<T>|
member=asSubclass(Class&
java/lang|Class|asSubclass(java.lang.Class)}}</syntaxhighlight>
| {{Javadoc:SE|package=java.lang|class=Class<T>|member=asSubclass(Class<U>)|java/lang|Class|asSubclass(java.lang.Class)}}
Line 76 ⟶ 78:
! '''Type this''' !! '''To get this'''
|-
| <
| {{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,%20int)}}
|}
Line 83 ⟶ 85:
! '''Type this''' !! '''To get this'''
|-
| <
| {{Javadoc:SE|member=indexOf(int, int)|java/lang|String|indexOf(int,int)}}
|}
# 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, &
::{| class="wikitable"
! '''Type this''' !! '''To get this'''
|-
| <
| {{Javadoc:SE|java/util|Arrays|sort(java.lang.Object[])}}
|-
| <
| {{Javadoc:SE | member=sort(Object[])|java/util|Arrays|sort(java.lang.Object[])}}
|}
Line 100 ⟶ 102:
! '''Type this''' !! '''To get this'''
|-
| <
| {{Javadoc:SE|jdk/javadoc/doclet|StandardDoclet|module=jdk.javadoc}}
|-
| <
| {{Javadoc:SE|java/awt|Graphics2D|module=java.desktop}}
|}
|