Add a new default method `description()` on `ToolProvider` that returns a short one-line description of the tool, or an empty `Optional` if no description is available.
Proposal:
/**
* {@return a short description of the tool, or an empty
* {@code Optional} if no description is available}
*
* @apiNote It is recommended that the description fits into a single
* line in order to allow creating concise overviews like the following:
* <pre>{@code
* jar
* Create, manipulate, and extract an archive of classes and resources.
* javac
* Read Java declarations and compile them into class files.
* jlink
* Assemble a set of modules (...) into a custom runtime image.
* }
* </pre>
*
* @since 19
*/
default Optional<String> description() {
return Optional.empty();
}
Proposal:
/**
* {@return a short description of the tool, or an empty
* {@code Optional} if no description is available}
*
* @apiNote It is recommended that the description fits into a single
* line in order to allow creating concise overviews like the following:
* <pre>{@code
* jar
* Create, manipulate, and extract an archive of classes and resources.
* javac
* Read Java declarations and compile them into class files.
* jlink
* Assemble a set of modules (...) into a custom runtime image.
* }
* </pre>
*
* @since 19
*/
default Optional<String> description() {
return Optional.empty();
}
- csr for
-
JDK-8286659 Add an optional description accessor on ToolProvider interface
-
- Closed
-
- relates to
-
JDK-8287121 Fix typo in jlink's description resource key lookup
-
- Resolved
-