public abstract class JarArchive extends Object implements org.glassfish.api.deployment.archive.Archive
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
archiveMetaData |
protected Map<Class<?>,Object> |
extraData |
protected org.glassfish.api.deployment.archive.ReadableArchive |
parentArchive |
| Constructor and Description |
|---|
JarArchive() |
| Modifier and Type | Method and Description |
|---|---|
void |
addArchiveMetaData(String metaDataKey,
Object metaData) |
Enumeration<String> |
entries(String prefix)
Returns an enumeration of the module file entries with the
specified prefix.
|
boolean |
exists(String name)
Returns the existence of the given entry name
The file name must be relative to the root of the module.
|
<T> T |
getArchiveMetaData(String metaDataKey,
Class<T> metadataType) |
<U> U |
getExtraData(Class<U> dataType)
Returns any data that could have been calculated as part of
the descriptor loading.
|
protected abstract JarEntry |
getJarEntry(String entryName) |
String |
getName()
Returns the name portion of the archive's URI.
|
org.glassfish.api.deployment.archive.ReadableArchive |
getParentArchive()
get the parent archive of this archive
|
boolean |
isDirectory(String name)
Returns true if the entry is a directory or a plain file
|
void |
removeArchiveMetaData(String metaDataKey) |
<U> void |
removeExtraData(Class<U> dataType) |
<U> void |
setExtraData(Class<U> dataType,
U instance) |
void |
setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive)
set the parent archive for this archive
|
protected org.glassfish.api.deployment.archive.ReadableArchive parentArchive
public Enumeration<String> entries(String prefix)
entries in interface org.glassfish.api.deployment.archive.Archiveprefix - the prefix of entries to be includedpublic String getName()
For JarArhive the name is all of the path that follows the last slash up to but not including the last dot.
Here are some example archive names for the specified JarArchive paths:
getName in interface org.glassfish.api.deployment.archive.Archivepublic boolean exists(String name) throws IOException
name - the file name relative to the root of the module. * @return the existence the given entry name.IOExceptionpublic boolean isDirectory(String name)
isDirectory in interface org.glassfish.api.deployment.archive.Archivename - name is one of the entries returned by Archive.entries()public void setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive)
parentArchive - the parent archivepublic org.glassfish.api.deployment.archive.ReadableArchive getParentArchive()
public <U> U getExtraData(Class<U> dataType)
dataType - the type of the extra datapublic <U> void setExtraData(Class<U> dataType, U instance)
public <U> void removeExtraData(Class<U> dataType)
public void removeArchiveMetaData(String metaDataKey)
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.