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

pack-priv final Class AppImageFile

extends Object
Class Inheritance
Static Imports
java.util.stream.Collectors.joining, .Collectors.toUnmodifiableMap, .Collectors.toUnmodifiableSet, jdk.jpackage.internal.cli.StandardAppImageFileOption.APP_VERSION, .StandardAppImageFileOption.DESCRIPTION, .StandardAppImageFileOption.LAUNCHER_AS_SERVICE, .StandardAppImageFileOption.LAUNCHER_NAME, jdk.jpackage.internal.util.function.ThrowingFunction.toFunction

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static enum
private static record

Field Summary

Modifier and TypeField and Description
private final String
private final Map<String, String>
private static final String
private final List<AppImageFile.LauncherInfo>
private static final Map<OperatingSystem, String>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static Path
getPathInAppImage(ApplicationLayout
the application layout
appLayout
)

Returns the path to the application image info file in the given application layout.

pack-priv static String
pack-priv static String
pack-priv static ExternalApplication
load(ApplicationLayout
the application layout
appLayout
,
OperatingSystem
the OS defining extra properties of the application and additional launchers
os
)

Loads application image info from the specified application layout and OS.

pack-priv void
save(ApplicationLayout
the application layout
appLayout
)

Writes the values captured in this instance into the application image info file in the given application layout.

pack-priv void
save(ApplicationLayout
the application layout
appLayout
,
OperatingSystem
the target OS
os
)

Writes the values captured in this instance into the application image info file in the given application layout.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appVersionback to summary
private final String appVersion
extraback to summary
private final Map<String, String> extra
FILENAMEback to summary
private static final String FILENAME
launcherInfosback to summary
private final List<AppImageFile.LauncherInfo> launcherInfos
PLATFORM_LABELSback to summary
private static final Map<OperatingSystem, String> PLATFORM_LABELS

Constructor Detail

AppImageFileback to summary
pack-priv AppImageFile(Application app)

Method Detail

getPathInAppImageback to summary
pack-priv static Path getPathInAppImage(ApplicationLayout appLayout)

Returns the path to the application image info file in the given application layout.

Parameters
appLayout:ApplicationLayout

the application layout

getPlatformback to summary
pack-priv static String getPlatform(OperatingSystem os)
getVersionback to summary
pack-priv static String getVersion()
loadback to summary
pack-priv static ExternalApplication load(ApplicationLayout appLayout, OperatingSystem os)

Loads application image info from the specified application layout and OS.

Parameters
appLayout:ApplicationLayout

the application layout

os:OperatingSystem

the OS defining extra properties of the application and additional launchers

saveback to summary
pack-priv void save(ApplicationLayout appLayout) throws IOException

Writes the values captured in this instance into the application image info file in the given application layout.

It is an equivalent to calling save(ApplicationLayout, OperatingSystem) method with OperatingSystem.current() for the second parameter.

Parameters
appLayout:ApplicationLayout

the application layout

Exceptions
IOException:
if an I/O error occurs when writing
saveback to summary
pack-priv void save(ApplicationLayout appLayout, OperatingSystem os) throws IOException

Writes the values captured in this instance into the application image info file in the given application layout.

Parameters
appLayout:ApplicationLayout

the application layout

os:OperatingSystem

the target OS

Exceptions
IOException:
if an I/O error occurs when writing
jdk.jpackage.internal back to summary

private final Class AppImageFile.AppImageProperties

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Set<String>
private static final String
private static final Set<String>
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static Map<String, String>
launcher(Element launcherNode, XPath xPath)

pack-priv static Map<String, String>
main(Document xml, XPath xPath)

private static Map<String, String>
queryProperties(Element e, XPath xPath, String xpathExpr)

private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LAUNCHER_ATTR_NAMESback to summary
private static final Set<String> LAUNCHER_ATTR_NAMES
LAUNCHER_PROPERTIES_XPATH_QUERYback to summary
private static final String LAUNCHER_PROPERTIES_XPATH_QUERY
MAIN_ELEMENT_NAMESback to summary
private static final Set<String> MAIN_ELEMENT_NAMES
MAIN_PROPERTIES_XPATH_QUERYback to summary
private static final String MAIN_PROPERTIES_XPATH_QUERY

Constructor Detail

AppImagePropertiesback to summary
private AppImageProperties()

Method Detail

launcherback to summary
pack-priv static Map<String, String> launcher(Element launcherNode, XPath xPath) throws XPathExpressionException
mainback to summary
pack-priv static Map<String, String> main(Document xml, XPath xPath) throws XPathExpressionException
queryPropertiesback to summary
private static Map<String, String> queryProperties(Element e, XPath xPath, String xpathExpr) throws XPathExpressionException
xpathQueryForExtraPropertiesback to summary
private static String xpathQueryForExtraProperties(Set<String> excludeNames)
jdk.jpackage.internal back to summary

private Class AppImageFile.InvalidAppImageFileException

extends RuntimeException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

InvalidAppImageFileExceptionback to summary
pack-priv InvalidAppImageFileException()
InvalidAppImageFileExceptionback to summary
pack-priv InvalidAppImageFileException(Throwable t)
jdk.jpackage.internal back to summary

private final Enum AppImageFile.LauncherElement

extends Enum<AppImageFile.LauncherElement>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AppImageFile.LauncherElement
private final String
public static final AppImageFile.LauncherElement

Constructor Summary

AccessConstructor and Description
private
LauncherElement(String elementName)

Method Summary

Modifier and TypeMethod and Description
pack-priv List<Map<String, String>>
readAll(Document xml, XPath xPath)

public static AppImageFile.LauncherElement
public static AppImageFile.LauncherElement[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ADDITIONALback to summary
public static final AppImageFile.LauncherElement ADDITIONAL
elementNameback to summary
private final String elementName
MAINback to summary
public static final AppImageFile.LauncherElement MAIN

Constructor Detail

LauncherElementback to summary
private LauncherElement(String elementName)

Method Detail

readAllback to summary
pack-priv List<Map<String, String>> readAll(Document xml, XPath xPath) throws XPathExpressionException
valueOfback to summary
public static AppImageFile.LauncherElement valueOf(String name)
valuesback to summary
public static AppImageFile.LauncherElement[] values()
jdk.jpackage.internal back to summary

private final Record AppImageFile.LauncherInfo

extends Record
Class Inheritance
Record Components
name:String 
properties:Map<String, String> 

Field Summary

Modifier and TypeField and Description
private final String
name

Record Component accessed by name().

private final Map<String, String>
properties

Record Component accessed by properties().

Constructor Summary

AccessConstructor and Description
pack-priv
LauncherInfo(String name, Map<String, String> properties)

pack-priv

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 final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public String
name()

Record Component getter of name.

private static Map<String, String>
properties(Launcher launcher)

public Map<String, String>
properties()

Record Component getter of properties.

pack-priv void
save(XMLStreamWriter xml, String elementName)

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

nameback to summary
private final String name

Record Component accessed by name().

propertiesback to summary
private final Map<String, String> properties

Record Component accessed by properties().

Constructor Detail

LauncherInfoback to summary
pack-priv LauncherInfo(String name, Map<String, String> properties)
LauncherInfoback to summary
pack-priv LauncherInfo(Launcher launcher)

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).
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.

nameback to summary
public String name()

Record Component getter of name.

propertiesback to summary
private static Map<String, String> properties(Launcher launcher)
propertiesback to summary
public Map<String, String> properties()

Record Component getter of properties.

saveback to summary
pack-priv void save(XMLStreamWriter xml, String elementName) throws IOException, XMLStreamException
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.