Interface Application
- All Known Subinterfaces:
LinuxApplication
,MacApplication
,WinApplication
- All Known Implementing Classes:
Application.Stub
public interface Application
A generic application for packaging.
- See Also:
- API Note:
- All paths of startup configurations of application launchers
returned by
launchers()
call must be relative to the path returned bysrcDir()
call.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
Default implementation ofApplication
interface. -
Method Summary
Modifier and TypeMethodDescriptionGets the additional application launchers of this application.default Path
Gets the name of the root app image directory of this application.default Optional
<ApplicationLayout> Gets the unresolved app image layout of this application asApplicationLayout
type or an emptyOptional
instance if the return value ofimageLayout()
call is not an instance ofApplicationLayout
type.Gets the input content directories of this application.Gets the copyright of this application.Gets the description of this application.Gets the additional properties of this application for the application entry in the app image (".jpackage") file.default Stream
<FileAssociation> Gets the file associations of all application launchers of this application.Gets the unresolved app image layout of this application.default boolean
Returnstrue
if this application is Java runtime.default boolean
Returnstrue
if any of application launchers of this application are configured as services.Gets the application launchers of this application.Returns the main application launcher of this application or an emptyOptional
instance if the application doesn't have launchers.name()
Gets the name of this application.Gets the runtime builder of this application if available or an emptyOptional
instance.srcDir()
Gets the source directory of this application if available or an emptyOptional
instance.vendor()
Gets the vendor of this application.version()
Gets the version of this application.
-
Method Details
-
name
-
description
String description()Gets the description of this application.- Returns:
- the description of this application
-
version
-
vendor
-
copyright
String copyright()Gets the copyright of this application.- Returns:
- the copyright of this application
-
srcDir
-
contentDirs
-
imageLayout
AppImageLayout imageLayout()Gets the unresolved app image layout of this application.- Returns:
- the unresolved app image layout of this application
-
asApplicationLayout
Gets the unresolved app image layout of this application asApplicationLayout
type or an emptyOptional
instance if the return value ofimageLayout()
call is not an instance ofApplicationLayout
type.Returns an empty
Optional
instance ifisRuntime()
returnstrue
.- Returns:
- the unresolved app image layout of this application as
ApplicationLayout
- See Also:
-
runtimeBuilder
Optional<RuntimeBuilder> runtimeBuilder()Gets the runtime builder of this application if available or an emptyOptional
instance.- Returns:
- the runtime builder of this application
-
appImageDirName
Gets the name of the root app image directory of this application.- Returns:
- the name of the root app image directory of this application
-
launchers
Gets the application launchers of this application.If the returned list is not empty, the first element in the list is the main launcher.
Returns an empty list if
isRuntime()
returnstrue
.- Returns:
- the application launchers of this application
- See Also:
-
mainLauncher
Returns the main application launcher of this application or an emptyOptional
instance if the application doesn't have launchers.Returns an empty
Optional
instance ifisRuntime()
returnstrue
.- Returns:
- the main application launcher of this application
- See Also:
-
additionalLaunchers
Gets the additional application launchers of this application.Returns an empty list if this application doesn't have additional launchers.
Returns an empty list if
isRuntime()
returnstrue
.- Returns:
- the additional application launchers of this application
- See Also:
-
isRuntime
default boolean isRuntime()Returnstrue
if this application is Java runtime.- Returns:
true
if this application is Java runtime
-
isService
default boolean isService()Returnstrue
if any of application launchers of this application are configured as services.- Returns:
true
if any of application launchers of this application are configured as services- See Also:
-
extraAppImageFileData
-
fileAssociations
Gets the file associations of all application launchers of this application.- Returns:
- the file associations of all application launchers of this application
- See Also:
-