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

pack-priv Interface BuildEnv

Known Direct Implementers
jdk.jpackage.internal.BuildEnv.Internal.DefaultBuildEnv
Imports
java.nio.file.Path, java.util.Objects, .Optional, jdk.jpackage.internal.model.AppImageLayout, .ApplicationLayout

Build environment.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Method Summary

Modifier and TypeMethod and Description
public default Path

Returns:

the path of the app image directory of this build
appImageDir
()

Returns the path of the app image directory of this build.

public AppImageLayout

Returns:

the resolved app image layout of the app image directory
appImageLayout
()

Returns resolved app image layout of the app image directory.

public default Optional<ApplicationLayout>
public Path

Returns:

the root directory for intermediate build files
buildRoot
()

Returns root directory for intermediate build files.

public default Path

Returns:

the path to the directory for intermediate configuration files
configDir
()

Returns a path to a directory for intermediate configuration files.

public static BuildEnv
create(Path buildRoot, Optional<Path> resourceDir, Class<?> resourceLocator, AppImageLayout appImageLayout)

public OverridableResource

Returns:

the OverridableResource instance wrapping a resource with the given name
createResource
(String
the resource name
defaultName
)

Creates an OverridableResource instance for the given resource name.

public Optional<Path>

Returns:

the path of the resource directory or an empty Optional instance if non is configured with the build
resourceDir
()

Returns the path of the resource directory or an empty Optional instance if none is configured with the build.

public static BuildEnv
withAppImageDir(BuildEnv env, Path appImageDir)

public static BuildEnv

Method Detail

appImageDirback to summary
public default Path appImageDir()

Returns the path of the app image directory of this build.

Returns:Path

the path of the app image directory of this build

appImageLayoutback to summary
public AppImageLayout appImageLayout()

Returns resolved app image layout of the app image directory. The return layout is resolved at appImageDir() path.

Returns:AppImageLayout

the resolved app image layout of the app image directory

asApplicationLayoutback to summary
public default Optional<ApplicationLayout> asApplicationLayout()
buildRootback to summary
public Path buildRoot()

Returns root directory for intermediate build files.

Returns:Path

the root directory for intermediate build files

configDirback to summary
public default Path configDir()

Returns a path to a directory for intermediate configuration files.

Returns:Path

the path to the directory for intermediate configuration files

createback to summary
public static BuildEnv create(Path buildRoot, Optional<Path> resourceDir, Class<?> resourceLocator, AppImageLayout appImageLayout)
createResourceback to summary
public OverridableResource createResource(String defaultName)

Creates an OverridableResource instance for the given resource name.

Parameters
defaultName:String

the resource name

Returns:OverridableResource

the OverridableResource instance wrapping a resource with the given name

resourceDirback to summary
public Optional<Path> resourceDir()

Returns the path of the resource directory or an empty Optional instance if none is configured with the build.

Returns:Optional<Path>

the path of the resource directory or an empty Optional instance if non is configured with the build

withAppImageDirback to summary
public static BuildEnv withAppImageDir(BuildEnv env, Path appImageDir)
withAppImageLayoutback to summary
public static BuildEnv withAppImageLayout(BuildEnv env, AppImageLayout appImageLayout)
jdk.jpackage.internal back to summary

public final Class BuildEnv.Internal

extends Object
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Internalback to summary
public Internal()
jdk.jpackage.internal back to summary

private final Record BuildEnv.Internal.DefaultBuildEnv

extends Record
implements BuildEnv
Class Inheritance
All Implemented Interfaces
jdk.jpackage.internal.BuildEnv
Record Components
buildRoot:Path 
resourceDir:Optional<Path> 
resourceLocator:Class<?> 
appImageLayout:AppImageLayout 

Field Summary

Modifier and TypeField and Description
private final AppImageLayout
appImageLayout

Record Component accessed by appImageLayout().

private final Path
buildRoot

Record Component accessed by buildRoot().

private final Optional<Path>
resourceDir

Record Component accessed by resourceDir().

private final Class<?>
resourceLocator

Record Component accessed by resourceLocator().

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultBuildEnv(Path buildRoot, Optional<Path> resourceDir, Class<?> resourceLocator, AppImageLayout appImageLayout)

Method Summary

Modifier and TypeMethod and Description
public AppImageLayout
appImageLayout()

Record Component getter of appImageLayout.

Implements jdk.jpackage.internal.BuildEnv.appImageLayout.

Returns resolved app image layout of the app image directory.

public Path
buildRoot()

Record Component getter of buildRoot.

Implements jdk.jpackage.internal.BuildEnv.buildRoot.

Returns root directory for intermediate build files.

pack-priv BuildEnv.Internal.DefaultBuildEnv
pack-priv BuildEnv.Internal.DefaultBuildEnv
public OverridableResource
createResource(String defaultName)

Implements jdk.jpackage.internal.BuildEnv.createResource.

Creates an OverridableResource instance for the given resource name.

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 Optional<Path>
resourceDir()

Record Component getter of resourceDir.

Implements jdk.jpackage.internal.BuildEnv.resourceDir.

Returns the path of the resource directory or an empty Optional instance if none is configured with the build.

public Class<?>
resourceLocator()

Record Component getter of resourceLocator.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

appImageLayoutback to summary
private final AppImageLayout appImageLayout

Record Component accessed by appImageLayout().

buildRootback to summary
private final Path buildRoot

Record Component accessed by buildRoot().

resourceDirback to summary
private final Optional<Path> resourceDir

Record Component accessed by resourceDir().

resourceLocatorback to summary
private final Class<?> resourceLocator

Record Component accessed by resourceLocator().

Constructor Detail

DefaultBuildEnvback to summary
pack-priv DefaultBuildEnv(Path buildRoot, Optional<Path> resourceDir, Class<?> resourceLocator, AppImageLayout appImageLayout)

Method Detail

appImageLayoutback to summary
public AppImageLayout appImageLayout()

Record Component getter of appImageLayout.

Implements jdk.jpackage.internal.BuildEnv.appImageLayout.

Doc from jdk.jpackage.internal.BuildEnv.appImageLayout.

Returns resolved app image layout of the app image directory. The return layout is resolved at appImageDir() path.

buildRootback to summary
public Path buildRoot()

Record Component getter of buildRoot.

Implements jdk.jpackage.internal.BuildEnv.buildRoot.

Doc from jdk.jpackage.internal.BuildEnv.buildRoot.

Returns root directory for intermediate build files.

copyWithAppImageDirback to summary
pack-priv BuildEnv.Internal.DefaultBuildEnv copyWithAppImageDir(Path v)
copyWithAppImageLayoutback to summary
pack-priv BuildEnv.Internal.DefaultBuildEnv copyWithAppImageLayout(AppImageLayout v)
createResourceback to summary
public OverridableResource createResource(String defaultName)

Implements jdk.jpackage.internal.BuildEnv.createResource.

Doc from jdk.jpackage.internal.BuildEnv.createResource.

Creates an OverridableResource instance for the given resource name.

Annotations
@Override
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.

resourceDirback to summary
public Optional<Path> resourceDir()

Record Component getter of resourceDir.

Implements jdk.jpackage.internal.BuildEnv.resourceDir.

Doc from jdk.jpackage.internal.BuildEnv.resourceDir.

Returns the path of the resource directory or an empty Optional instance if none is configured with the build.

resourceLocatorback to summary
public Class<?> resourceLocator()

Record Component getter of resourceLocator.

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.