APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.javadoc.internal.doclets.toolkit.util

public Class DocLink

extends Object
Class Inheritance

Abstraction for simple relative URIs, consisting of a path and an optional fragment. DocLink objects can be created by the constructors below or from a DocPath using the convenience fragment method.

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final DocPath

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
public static DocLink

Returns:

the DocLink
fragment
(String
the fragment
fragment
)

Creates a DocLink representing the URI #fragment.

private boolean
public DocLink

Returns:

the DocLink
relativizeAgainst
(DocPath
the base
base
)

Creates a DocLink formed by relativizing the path against a given base.

public String

Returns:

the string
toString
()

Overrides java.lang.Object.toString.

Returns the link in the form "path#fragment", omitting any empty components.

public DocLink
withFragment(String fragment)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fragmentback to summary
pack-priv final String fragment
pathback to summary
pack-priv final DocPath path

Constructor Detail

Method Detail

fragmentback to summary
public static DocLink fragment(String fragment)

Creates a DocLink representing the URI #fragment.

Parameters
fragment:String

the fragment

Returns:DocLink

the DocLink

isAbsoluteURLback to summary
private boolean isAbsoluteURL(DocPath path)
relativizeAgainstback to summary
public DocLink relativizeAgainst(DocPath base)

Creates a DocLink formed by relativizing the path against a given base.

Parameters
base:DocPath

the base

Returns:DocLink

the DocLink

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns the link in the form "path#fragment", omitting any empty components.

Returns:String

the string

Annotations
@Override
withFragmentback to summary
public DocLink withFragment(String fragment)