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

pack-priv final Class OptionsAnalyzer

extends Object
Class Inheritance
Static Imports
jdk.jpackage.internal.cli.StandardOption.ADD_MODULES, .StandardOption.INPUT, .StandardOption.JLINK_OPTIONS, .StandardOption.MAC_APP_IMAGE_SIGN_IDENTITY, .StandardOption.MAC_APP_STORE, .StandardOption.MAC_INSTALLER_SIGN_IDENTITY, .StandardOption.MAC_SIGN, .StandardOption.MAC_SIGNING_KEY_NAME, .StandardOption.MAIN_JAR, .StandardOption.MODULE, .StandardOption.MODULE_PATH, .StandardOption.PREDEFINED_APP_IMAGE, .StandardOption.PREDEFINED_RUNTIME_IMAGE, .StandardOption.TYPE

Analyzes jpackage command line structure.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static record
private static record

Field Summary

Modifier and TypeField and Description
private final StandardBundlingOperation
private final Options
private final boolean
private final boolean
private static final List<OptionsAnalyzer.MutualExclusiveOptions>
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
private
OptionsAnalyzer(Options cmdline, StandardBundlingOperation bundlingOperation, boolean typedOptions)

Method Summary

Modifier and TypeMethod and Description
private static List<Option>
asOptionList(OptionValue<?>... options)

pack-priv BundlingOperationDescriptor
private Set<BundlingOperationModifier>
private static RuntimeException
error(String formatId, Object... args)

private static OptionsAnalyzer.ExceptionWithOrigin
errorWithOrigin(Exception error, OptionSpec<?>... origin)

private static OptionsAnalyzer.ExceptionWithOrigin
errorWithOrigin(Exception error, List<? extends OptionSpec<?>> origin)

pack-priv List<OptionsAnalyzer.ExceptionWithOrigin>
private List<OptionsAnalyzer.ExceptionWithOrigin>
private static StandardBundlingOperation
private boolean

Returns:

true if the bundling operation will create an app image as an intermediate or final step
isBuildingAppImage
()

Returns true if the bundling operation will create an app image as an intermediate or final step.

private boolean

Returns:

true if the output of the bundling operation is either a new app image or a new native package
isBundling
()

Returns true if the output of the bundling operation is either a new app image or a new native package.

private boolean

Returns:

true if the output of the bundling operation is a new app image
isBundlingAppImage
()

Returns true if the output of the bundling operation is a new app image.

private boolean

Returns:

true if the output of the bundling operation is a new native package
isBundlingNativePackage
()

Returns true if the output of the bundling operation is a new native package.

private static boolean
isRuntimeInstaller(Options cmdline, OptionScope bundlingOperation)

private Object[]
private static Predicate<OptionSpec<?>>
private static Predicate<OptionSpec<?>>
private RuntimeException
pack-priv static Stream<OptionsAnalyzer.ExceptionWithOrigin>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bundlingOperationback to summary
private final StandardBundlingOperation bundlingOperation
cmdlineback to summary
private final Options cmdline
hasAppImageback to summary
private final boolean hasAppImage
isRuntimeInstallerback to summary
private final boolean isRuntimeInstaller
MUTUAL_EXCLUSIVE_OPTIONSback to summary
private static final List<OptionsAnalyzer.MutualExclusiveOptions> MUTUAL_EXCLUSIVE_OPTIONS
typedOptionsback to summary
private final boolean typedOptions

Constructor Detail

OptionsAnalyzerback to summary
pack-priv OptionsAnalyzer(Options cmdline, OperatingSystem os, BundlingEnvironment bundlingEnv)
OptionsAnalyzerback to summary
pack-priv OptionsAnalyzer(Options cmdline, StandardBundlingOperation bundlingOperation)
OptionsAnalyzerback to summary
private OptionsAnalyzer(Options cmdline, StandardBundlingOperation bundlingOperation, boolean typedOptions)

Method Detail

asOptionListback to summary
private static List<Option> asOptionList(OptionValue<?>... options)
bundlingOperationback to summary
pack-priv BundlingOperationDescriptor bundlingOperation()
bundlingOperationModifiersback to summary
private Set<BundlingOperationModifier> bundlingOperationModifiers()
errorback to summary
private static RuntimeException error(String formatId, Object... args)
errorWithOriginback to summary
private static OptionsAnalyzer.ExceptionWithOrigin errorWithOrigin(Exception error, OptionSpec<?>... origin)
errorWithOriginback to summary
private static OptionsAnalyzer.ExceptionWithOrigin errorWithOrigin(Exception error, List<? extends OptionSpec<?>> origin)
findErrorsback to summary
pack-priv List<OptionsAnalyzer.ExceptionWithOrigin> findErrors()
findErrorsInTypedOptionsback to summary
private List<OptionsAnalyzer.ExceptionWithOrigin> findErrorsInTypedOptions()
getBundlingOperationback to summary
private static StandardBundlingOperation getBundlingOperation(Options cmdline, OperatingSystem os, BundlingEnvironment env)
isBuildingAppImageback to summary
private boolean isBuildingAppImage()

Returns true if the bundling operation will create an app image as an intermediate or final step.

Returns:boolean

true if the bundling operation will create an app image as an intermediate or final step

isBundlingback to summary
private boolean isBundling()

Returns true if the output of the bundling operation is either a new app image or a new native package.

Returns:boolean

true if the output of the bundling operation is either a new app image or a new native package

isBundlingAppImageback to summary
private boolean isBundlingAppImage()

Returns true if the output of the bundling operation is a new app image.

Returns:boolean

true if the output of the bundling operation is a new app image

isBundlingNativePackageback to summary
private boolean isBundlingNativePackage()

Returns true if the output of the bundling operation is a new native package.

Returns:boolean

true if the output of the bundling operation is a new native package

isRuntimeInstallerback to summary
private static boolean isRuntimeInstaller(Options cmdline, OptionScope bundlingOperation)
mapFormatArgumentsback to summary
private Object[] mapFormatArguments(Object... args)
matchInScopeback to summary
private static Predicate<OptionSpec<?>> matchInScope(Collection<? extends OptionScope> scope)
matchInScopeback to summary
private static Predicate<OptionSpec<?>> matchInScope(OptionScope... scope)
onOutOfScopeOptionback to summary
private RuntimeException onOutOfScopeOption(OptionSpec<?> optionSpec)
orderErrorsback to summary
pack-priv static Stream<OptionsAnalyzer.ExceptionWithOrigin> orderErrors(List<OptionName> optionNames, Collection<OptionsAnalyzer.ExceptionWithOrigin> unorderedErrors)
jdk.jpackage.internal.cli back to summary

pack-priv final Record OptionsAnalyzer.ExceptionWithOrigin

extends Record
Class Inheritance
Record Components
error:Exception 
origin:List<? extends OptionSpec<?>> 

Field Summary

Modifier and TypeField and Description
private final Exception
error

Record Component accessed by error().

private final List<? extends OptionSpec<?>>
origin

Record Component accessed by origin().

Constructor Summary

AccessConstructor and Description
pack-priv
ExceptionWithOrigin(Exception error, List<? extends OptionSpec<?>> origin)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public Exception
error()

Record Component getter of error.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public List<? extends OptionSpec<?>>
origin()

Record Component getter of origin.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

errorback to summary
private final Exception error

Record Component accessed by error().

originback to summary
private final List<? extends OptionSpec<?>> origin

Record Component accessed by origin().

Constructor Detail

ExceptionWithOriginback to summary
pack-priv ExceptionWithOrigin(Exception error, List<? extends OptionSpec<?>> origin)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
errorback to summary
public Exception error()

Record Component getter of error.

hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

originback to summary
public List<? extends OptionSpec<?>> origin()

Record Component getter of origin.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

jdk.jpackage.internal.cli back to summary

private final Record OptionsAnalyzer.MutualExclusiveOptions

extends Record
Class Inheritance
Record Components
options:List<Option> 
createException:Function<Object[], RuntimeException> 

Field Summary

Modifier and TypeField and Description
private final Function<Object[], RuntimeException>
createException

Record Component accessed by createException().

private final List<Option>
options

Record Component accessed by options().

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Function<Object[], RuntimeException>
createException()

Record Component getter of createException.

public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public List<Option>
options()

Record Component getter of options.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

pack-priv Optional<OptionsAnalyzer.ExceptionWithOrigin>
validate(Options cmdline)

Field Detail

createExceptionback to summary
private final Function<Object[], RuntimeException> createException

Record Component accessed by createException().

optionsback to summary
private final List<Option> options

Record Component accessed by options().

Constructor Detail

MutualExclusiveOptionsback to summary
pack-priv MutualExclusiveOptions(List<Option> options, Function<Object[], RuntimeException> createException)
MutualExclusiveOptionsback to summary
pack-priv MutualExclusiveOptions(List<Option> options)

Method Detail

createExceptionback to summary
public Function<Object[], RuntimeException> createException()

Record Component getter of createException.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

optionsback to summary
public List<Option> options()

Record Component getter of options.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

validateback to summary
pack-priv Optional<OptionsAnalyzer.ExceptionWithOrigin> validate(Options cmdline)