Template:Javadoc
A template to link to the JDK documentation. A more up-to-date version of {{Javadoc:SE}} and {{Javadoc:EE}}.
Usage
[edit]An empty usage just links to the javadocs: {{Javadoc}}
→ Java SE 20 Javadocs
Linking to a module: {{Javadoc|module=java.base}}
→ java.base
Linking to a package in that module: {{Javadoc|module=java.base|package=java.lang}}
→ java.lang
For java.lang.Object
, write {{Javadoc|module=java.base|package=java.lang|class=Object}}
→ java.lang.Object
To link to a particular class member, write {{Javadoc|module=java.base|package=java.lang|class=Object|member=clone()}}
→ java.lang.Object#clone()
Overriding the text: {{Javadoc|module=java.base|package=java.lang|class=Object|member=clone()|text=clone()}}
→ clone()
A monospaced font can be used by writing {{Javadoc|module=java.base|package=java.lang|class=Object|monotype=y}}
→ java.lang.Object
Linking to a particular version can be done, too: {{Javadoc|version=11}}
→ Java SE 11 Javadocs
Parameters
[edit]- module
- A module (e.g. 'java.base').
- package
- A package path (e.g. 'java.lang'). Different from module. Requires all the parameters above.
- class
- The class to link to. Requires all the parameters above.
- member
- A member (method or field) that is part of the class. Requires all the parameters above.
- version
- The Java version number to link to (11 and up).
- text
- The text to override the default link text.
- monotype
- Whether to surround the link with <code> tags.
Templatedata
[edit]TemplateData for Javadoc
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
JDK version | version | The version of the JDK to link to (11 and up)
| Number | optional |
Module | module | The module to link to
| String | suggested |
Package | package | The package to link to (requires module)
| String | suggested |
Class | class | The class to link to (requires module and package)
| String | suggested |
Member | member | Link to a member in the class (requires class, package, and module)
| String | optional |
Override text | text | Overrides the link's text | String | suggested |
Monospaced font | monotype | Makes the font monospaced rather than normal text
| Boolean | optional |
This template has not been added to any categories. Please help out by adding categories to it so that it can be listed with similar templates. |