public static class SingleFileScriptArchive.Builder
extends java.lang.Object
PathScriptArchive
.
Default settings: * generate a moduleId using the last element of thePath
* all files under the root path will be included in the archive. * searches for a module spec file under the root directory called "moduleSpec.json" and uses theGsonScriptModuleSpecSerializer
to deserialize it.
Constructor and Description |
---|
SingleFileScriptArchive.Builder(java.nio.file.Path filePath)
Start a builder with required parameters.
|
Modifier and Type | Method and Description |
---|---|
SingleFileScriptArchive |
build()
Build the
PathScriptArchive . |
SingleFileScriptArchive.Builder |
setCreateTime(long createTime)
Set the creation time
|
SingleFileScriptArchive.Builder |
setModuleSpec(ScriptModuleSpec moduleSpec)
Set the module spec for this archive
|
public SingleFileScriptArchive.Builder(java.nio.file.Path filePath)
filePath
- absolute path to the script filepublic SingleFileScriptArchive.Builder setModuleSpec(ScriptModuleSpec moduleSpec)
public SingleFileScriptArchive.Builder setCreateTime(long createTime)
public SingleFileScriptArchive build() throws java.io.IOException
PathScriptArchive
.java.io.IOException