APIdia Launch Partner
Top Constructors Methods
jdk.javadoc.internal

public final Class Versions

extends Object
Class Inheritance
Imports
java.util.ResourceBundle, java.util.stream.Collectors

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a full string representation of the provided version
fullVersionStringOf
(Runtime.Version v)

Returns a full string representation of the provided version.

public static Runtime.Version

Returns:

the version
javadocVersion
()

Returns the version of the javadoc tool and the Standard doclet.

public static String

Returns:

a short string representation of the provided version
shortVersionStringOf
(Runtime.Version v)

Returns a short string representation of the provided version.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Versionsback to summary
private Versions()

Method Detail

fullVersionStringOfback to summary
public static String fullVersionStringOf(Runtime.Version v)

Returns a full string representation of the provided version.

Examples of strings returned from this method are "14+36-1461" and "15-internal+0-2020-06-02-1426246.duke...".

Returns:String

a full string representation of the provided version

Exceptions
NullPointerException:
if v == null
javadocVersionback to summary
public static Runtime.Version javadocVersion() throws RuntimeException

Returns the version of the javadoc tool and the Standard doclet.

This is typically the same as the version of the JDK platform being used to run the tool, but may be different when running the tool on an older version of the platform.

API Note

This method does not return null, has the return type of Optional<Runtime.Version>, or throw a checked exception. Those would warp the API to cater for something that is probably a result of a build error anyway. Hence, RuntimeException.

Returns:Runtime.Version

the version

Exceptions
RuntimeException:
in an unlikely event of the version info not being available
shortVersionStringOfback to summary
public static String shortVersionStringOf(Runtime.Version v)

Returns a short string representation of the provided version.

The string contains the dotted representation of the version number, followed by the prerelease info, if any. For example, "15", "15.1", "15.0.1", "15-internal".

Returns:String

a short string representation of the provided version

Exceptions
NullPointerException:
if v == null