Klasse HtmlIds
To ensure consistency, these constants and methods should be used both when declaring ids (for example, HtmlTree.setId) and creating references (for example, Links.createLink).
Most ids are mostly for internal use within the pages of a documentation bundle. However, the ids for member declarations may be referred to from other documentation using {@link}, and should not be changed without due consideration for the compatibility impact.
The use of punctuating characters is inconsistent and could be improved.
Constants and methods are static where possible. However, some methods require access to utils and are better provided as instance methods.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected HtmlId
forErasure
(ExecutableElement executableElement) Returns an id for the erasure of an executable element, or null if there are no type variables in the signature.forHeading
(CharSequence headingText, Set<String> headingIds) Returns an id for a heading in a doc comment.forPage
(Navigation.PageMode page) Returns an id for the entry on the HELP page for a kind of generated page.Returns an id for the “preview” section for an element.static HtmlId
Returns an id for a “tab” in a table.static HtmlId
forTabPanel
(HtmlId tableId) Returns an id for the “tab panel” in a table.
-
Methodendetails
-
forErasure
Returns an id for the erasure of an executable element, or null if there are no type variables in the signature.For backward compatibility, include an anchor using the erasures of the parameters. NOTE: We won’t need this method anymore after we fix @see tags so that they use the type instead of the erasure.
- Parameter:
executableElement
- the element to anchor to- Gibt zurück:
- the 1.4.x style anchor for the executable element
-
forTab
Returns an id for a “tab” in a table.- Parameter:
tableId
- the id for the tabletabIndex
- the index of the tab- Gibt zurück:
- the id
-
forTabPanel
Returns an id for the “tab panel” in a table.- Parameter:
tableId
- the id for the table- Gibt zurück:
- the id
-
forPreviewSection
Returns an id for the “preview” section for an element.- Parameter:
el
- the element- Gibt zurück:
- the id
-
forHeading
Returns an id for a heading in a doc comment.The id value is derived from the contents of the heading with additional checks to make it unique within its containing page.
- Parameter:
headingText
- the text contained by the headingheadingIds
- the set of heading ids already generated for the current page- Gibt zurück:
- a unique id value for the heading
-