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

pack-priv Interface OptionValueExceptionFactory<T extends Exception>

Annotations
@FunctionalInterface
Imports
java.util.Objects, .Optional, java.util.function.BiFunction, java.util.stream.Stream

Factory producing exception objects for option value processing failures.

Errors in converting option string values into objects or validating objects created from option string values are typical option value processing failures.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static class
public static enum

Method Summary

Modifier and TypeMethod and Description
public static <T extends Exception> OptionValueExceptionFactory.Builder<T>
public static <T extends Exception> OptionValueExceptionFactory.Builder<T>
public T

Returns:

exception object
create
(OptionName
the name of the option
optionName
,
StringToken
the value of the option
optionValue
,
String
the format string for formatting the exception message
formatString
,
Optional<Exception>
the cause if any, an empty {@ @link Optional} instance otherwise
cause
)

Create an exception object for the specified option name, value and optional cause.

private static <T extends Exception> OptionValueExceptionFactory<T>
create(BiFunction<String, Throwable, T> ctor, OptionValueExceptionFactory.ArgumentsMapper formatArgumentsTransformer, BiFunction<String, Object[], String> messageFormatter, boolean printOptionPrefix)

public static <T extends Exception> OptionValueExceptionFactory<T>

Method Detail

buildback to summary
public static <T extends Exception> OptionValueExceptionFactory.Builder<T> build()
buildback to summary
public static <T extends Exception> OptionValueExceptionFactory.Builder<T> build(BiFunction<String, Throwable, T> ctor)
createback to summary
public T create(OptionName optionName, StringToken optionValue, String formatString, Optional<Exception> cause)

Create an exception object for the specified option name, value and optional cause.

Parameters
optionName:OptionName

the name of the option

optionValue:StringToken

the value of the option

formatString:String

the format string for formatting the exception message

cause:Optional<Exception>

the cause if any, an empty {@ @link Optional} instance otherwise

Returns:T

exception object

createback to summary
private static <T extends Exception> OptionValueExceptionFactory<T> create(BiFunction<String, Throwable, T> ctor, OptionValueExceptionFactory.ArgumentsMapper formatArgumentsTransformer, BiFunction<String, Object[], String> messageFormatter, boolean printOptionPrefix)
unreachableback to summary
public static <T extends Exception> OptionValueExceptionFactory<T> unreachable()
jdk.jpackage.internal.cli back to summary

public Interface OptionValueExceptionFactory.ArgumentsMapper

Known Direct Implementers
jdk.jpackage.internal.cli.OptionValueExceptionFactory.StandardArgumentsMapper
Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public static OptionValueExceptionFactory.ArgumentsMapper
public String[]
apply(String formattedOptionName, StringToken optionValue)

Method Detail

appendArgumentsback to summary
public static OptionValueExceptionFactory.ArgumentsMapper appendArguments(OptionValueExceptionFactory.ArgumentsMapper target, Object... args)
applyback to summary
public String[] apply(String formattedOptionName, StringToken optionValue)
jdk.jpackage.internal.cli back to summary

public final Class OptionValueExceptionFactory.Builder<T extends Exception>

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.jpackage.internal.cli.OptionValueExceptionFactory.Builder

Field Summary

Modifier and TypeField and Description
private BiFunction<String, Throwable, T>
private OptionValueExceptionFactory.ArgumentsMapper
private BiFunction<String, Object[], String>
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv OptionValueExceptionFactory<T>
pack-priv OptionValueExceptionFactory.Builder<T>
pack-priv OptionValueExceptionFactory.Builder<T>
pack-priv OptionValueExceptionFactory.Builder<T>
pack-priv OptionValueExceptionFactory.Builder<T>
printOptionPrefix(boolean v)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ctorback to summary
private BiFunction<String, Throwable, T> ctor
formatArgumentsTransformerback to summary
private OptionValueExceptionFactory.ArgumentsMapper formatArgumentsTransformer
messageFormatterback to summary
private BiFunction<String, Object[], String> messageFormatter
printOptionPrefixback to summary
private boolean printOptionPrefix

Constructor Detail

Builderback to summary
public Builder()

Method Detail

createback to summary
pack-priv OptionValueExceptionFactory<T> create()
ctorback to summary
pack-priv OptionValueExceptionFactory.Builder<T> ctor(BiFunction<String, Throwable, T> v)
formatArgumentsTransformerback to summary
pack-priv OptionValueExceptionFactory.Builder<T> formatArgumentsTransformer(OptionValueExceptionFactory.ArgumentsMapper v)
messageFormatterback to summary
pack-priv OptionValueExceptionFactory.Builder<T> messageFormatter(BiFunction<String, Object[], String> v)
printOptionPrefixback to summary
pack-priv OptionValueExceptionFactory.Builder<T> printOptionPrefix(boolean v)
jdk.jpackage.internal.cli back to summary

public final Enum OptionValueExceptionFactory.StandardArgumentsMapper

extends Enum<OptionValueExceptionFactory.StandardArgumentsMapper>
implements ArgumentsMapper
Class Inheritance
All Implemented Interfaces
jdk.jpackage.internal.cli.OptionValueExceptionFactory.ArgumentsMapper

Field Summary

Modifier and TypeField and Description
private final OptionValueExceptionFactory.ArgumentsMapper
public static final OptionValueExceptionFactory.StandardArgumentsMapper
public static final OptionValueExceptionFactory.StandardArgumentsMapper
public static final OptionValueExceptionFactory.StandardArgumentsMapper
public static final OptionValueExceptionFactory.StandardArgumentsMapper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String[]
public static OptionValueExceptionFactory.StandardArgumentsMapper
public static OptionValueExceptionFactory.StandardArgumentsMapper[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

implback to summary
private final OptionValueExceptionFactory.ArgumentsMapper impl
NAME_AND_VALUEback to summary
public static final OptionValueExceptionFactory.StandardArgumentsMapper NAME_AND_VALUE
NONEback to summary
public static final OptionValueExceptionFactory.StandardArgumentsMapper NONE
VALUEback to summary
public static final OptionValueExceptionFactory.StandardArgumentsMapper VALUE
VALUE_AND_NAMEback to summary
public static final OptionValueExceptionFactory.StandardArgumentsMapper VALUE_AND_NAME

Constructor Detail

StandardArgumentsMapperback to summary
private StandardArgumentsMapper(OptionValueExceptionFactory.ArgumentsMapper impl)

Method Detail

applyback to summary
public String[] apply(String formattedOptionName, StringToken optionValue)

Implements jdk.jpackage.internal.cli.OptionValueExceptionFactory.ArgumentsMapper.apply.

Annotations
@Override
valueOfback to summary
public static OptionValueExceptionFactory.StandardArgumentsMapper valueOf(String name)
valuesback to summary
public static OptionValueExceptionFactory.StandardArgumentsMapper[] values()