public class JarScriptArchive extends java.lang.Object implements ScriptArchive
JarFile.
The jar file may optionally contain a module specification. If it does, then the module specification
is deserialized and used to construct the archive. Otherwise, a module specification with default values
is created.| Modifier and Type | Class and Description |
|---|---|
static class |
JarScriptArchive.Builder
Used to Construct a
JarScriptArchive. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_MODULE_SPEC_FILE_NAME
Default file name of the optional
ScriptModuleSpec in the archive |
| Modifier | Constructor and Description |
|---|---|
protected |
JarScriptArchive(ScriptModuleSpec moduleSpec,
java.nio.file.Path jarPath,
long createTime) |
protected |
JarScriptArchive(ScriptModuleSpec moduleSpec,
java.nio.file.Path jarPath,
java.lang.String moduleSpecEntry,
long createTime) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.Set<java.lang.String> |
getArchiveEntryNames() |
long |
getCreateTime()
Timestamp used to resolve multiple revisions of the archive.
|
java.net.URL |
getEntry(java.lang.String entryName) |
ScriptModuleSpec |
getModuleSpec() |
java.net.URL |
getRootUrl()
Gets the root path in the form of 'file://path/to/jarfile/jarfile.jar".
|
int |
hashCode() |
void |
setModuleSpec(ScriptModuleSpec spec)
Set the module spec for this archive.
|
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_MODULE_SPEC_FILE_NAME
ScriptModuleSpec in the archiveprotected JarScriptArchive(ScriptModuleSpec moduleSpec, java.nio.file.Path jarPath, long createTime) throws java.io.IOException
java.io.IOExceptionprotected JarScriptArchive(ScriptModuleSpec moduleSpec, java.nio.file.Path jarPath, java.lang.String moduleSpecEntry, long createTime) throws java.io.IOException
java.io.IOExceptionpublic ScriptModuleSpec getModuleSpec()
getModuleSpec in interface ScriptArchivepublic void setModuleSpec(ScriptModuleSpec spec)
ScriptArchivesetModuleSpec in interface ScriptArchivespec - the module spec to set to.public java.net.URL getRootUrl()
getRootUrl in interface ScriptArchiveURLs representing the contents of this archive. should be
suitable for passing to a URLClassLoaderpublic java.util.Set<java.lang.String> getArchiveEntryNames()
getArchiveEntryNames in interface ScriptArchive@Nullable
public java.net.URL getEntry(java.lang.String entryName)
throws java.io.IOException
getEntry in interface ScriptArchivejava.io.IOExceptionpublic long getCreateTime()
ScriptArchivegetCreateTime in interface ScriptArchivepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object