APIdia Launch Partner
Top Description Inners Methods
jdk.jpackage.internal.cli

pack-priv Interface OptionValueConverter<T, U>

Known Direct Subinterfaces
jdk.jpackage.internal.cli.OptionArrayValueConverter
Known Direct Implementers
jdk.jpackage.internal.cli.OptionValueConverter.Builder.TwoStepOptionValueConverter, jdk.jpackage.internal.cli.OptionValueConverter.Builder.StepBuilder.DefaultOptionValueConverter
Type Parameters
<T>
input option value type
<U>
output option value type
Imports
java.lang.reflect.Array, java.util.ArrayList, .List, .Objects, .Optional, java.util.function.Consumer, .Function, jdk.jpackage.internal.cli.Validator.ParsedValue, jdk.jpackage.internal.util.Result

Defines creating an option value of type U from value of type T.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
OptionValueConverter.ConverterException

Thrown to indicate an error in the normal execution of the converter.

Method Summary

Modifier and TypeMethod and Description
public static <T> OptionValueConverter.Builder<T>
public Result<U>

Returns:

the conversion result
convert
(OptionName
the option name
optionName
,
StringToken
the string value of the option
optionValue
,
T
the value of the option to convert
value
)

Converts the given value of type T corresponding to the given option name and option string value to an object of type U.

public static <T> Result<T>
convertString(OptionValueConverter<String, T> converter, OptionName optionName, StringToken optionValue)

public Class<? extends U>

Returns:

the target class for conversion
valueType
()

Gives the class of the type of values this converter converts to.