Package com.io7m.montarre.api.natives
Class MNativeWorkspaceConfiguration.Builder
java.lang.Object
com.io7m.montarre.api.natives.MNativeWorkspaceConfiguration.Builder
- Enclosing class:
MNativeWorkspaceConfiguration
Builds instances of type
MNativeWorkspaceConfiguration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newMNativeWorkspaceConfiguration.from(MNativeWorkspaceConfigurationType instance) Fill a builder with attribute values from the providedMNativeWorkspaceConfigurationTypeinstance.setBaseDirectory(Path baseDirectory) Initializes the value for thebaseDirectoryattribute.setJavaRuntimeDownloadFormat(MArchiveFormat javaRuntimeDownloadFormat) Initializes the value for thejavaRuntimeDownloadFormatattribute.setJavaRuntimeDownloadSHA256(String javaRuntimeDownloadSHA256) Initializes the value for thejavaRuntimeDownloadSHA256attribute.setJavaRuntimeDownloadURI(URI javaRuntimeDownloadURI) Initializes the value for thejavaRuntimeDownloadURIattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMNativeWorkspaceConfigurationTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setBaseDirectory
Initializes the value for thebaseDirectoryattribute.- Parameters:
baseDirectory- The value for baseDirectory- Returns:
thisbuilder for use in a chained invocation
-
setJavaRuntimeDownloadFormat
public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadFormat(MArchiveFormat javaRuntimeDownloadFormat) Initializes the value for thejavaRuntimeDownloadFormatattribute.- Parameters:
javaRuntimeDownloadFormat- The value for javaRuntimeDownloadFormat- Returns:
thisbuilder for use in a chained invocation
-
setJavaRuntimeDownloadURI
public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadURI(URI javaRuntimeDownloadURI) Initializes the value for thejavaRuntimeDownloadURIattribute.- Parameters:
javaRuntimeDownloadURI- The value for javaRuntimeDownloadURI- Returns:
thisbuilder for use in a chained invocation
-
setJavaRuntimeDownloadSHA256
public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadSHA256(String javaRuntimeDownloadSHA256) Initializes the value for thejavaRuntimeDownloadSHA256attribute.- Parameters:
javaRuntimeDownloadSHA256- The value for javaRuntimeDownloadSHA256- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMNativeWorkspaceConfiguration.- Returns:
- An immutable instance of MNativeWorkspaceConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-