public class ZipFileScannerPlugin extends AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>
| Constructor and Description |
|---|
ZipFileScannerPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(ZipFileResource item,
String path,
com.buschmais.jqassistant.core.scanner.api.Scope scope) |
protected void |
enterContainer(ZipFileResource zipFile,
ZipArchiveDescriptor archiveDescriptor,
com.buschmais.jqassistant.core.scanner.api.ScannerContext context)
<p>Create a scope depending on the container type, e.g. a JAR file should
return classpath scope.
|
protected ZipArchiveDescriptor |
getContainerDescriptor(ZipFileResource zipFile,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Return the descriptor representing the artifact.
|
protected String |
getContainerPath(ZipFileResource container,
String path)
<p>Return the normalized path to the container.
|
Class<ZipArchiveDescriptor> |
getDescriptorType() |
protected Iterable<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> |
getEntries(ZipFileResource container)
<p>Return an iterable which delivers the entries of the container.
|
protected Resource |
getEntry(ZipFileResource container,
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
<p>Return a
Resource representing an entry. |
protected String |
getRelativePath(ZipFileResource container,
org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
<p>Return the relative path of an element within the container.
|
Class<? extends ZipFileResource> |
getType() |
protected void |
leaveContainer(ZipFileResource zipFile,
ZipArchiveDescriptor archiveDescriptor,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Destroy the container dependent scope.
|
scanconfigure, configure, equals, getBooleanProperty, getDirectoryPath, getName, getProperties, getProperty, getScannerContext, getStringProperty, getTypeParameter, hashCodepublic Class<? extends ZipFileResource> getType()
getType in interface com.buschmais.jqassistant.core.scanner.api.ScannerPlugin<ZipFileResource,ZipArchiveDescriptor>getType in class AbstractResourceScannerPlugin<ZipFileResource,ZipArchiveDescriptor>public Class<ZipArchiveDescriptor> getDescriptorType()
getDescriptorType in interface com.buschmais.jqassistant.core.scanner.api.ScannerPlugin<ZipFileResource,ZipArchiveDescriptor>getDescriptorType in class AbstractResourceScannerPlugin<ZipFileResource,ZipArchiveDescriptor>public boolean accepts(ZipFileResource item, String path, com.buschmais.jqassistant.core.scanner.api.Scope scope) throws IOException
IOExceptionprotected ZipArchiveDescriptor getContainerDescriptor(ZipFileResource zipFile, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
AbstractContainerScannerPlugin<p>Return the descriptor representing the artifact.</p>
getContainerDescriptor in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>zipFile - The container.scannerContext - The scanner context.protected Iterable<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries(ZipFileResource container) throws IOException
AbstractContainerScannerPlugin<p>Return an iterable which delivers the entries of the container. <p> The entries must not contain the relative root element, i.e. "/". </p></p>
getEntries in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>container - The container.IOException - If the entries cannot be determined.protected String getContainerPath(ZipFileResource container, String path)
AbstractContainerScannerPlugin<p>Return the normalized path to the container.</p>
getContainerPath in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>container - The container.protected String getRelativePath(ZipFileResource container, org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
AbstractContainerScannerPlugin<p>Return the relative path of an element within the container. <p> The following conditions must be considered: <ul> <li>The separator to use is "/".</li> <li>The path must start with "/".</li> <li>The path must not end with "/".</li> </ul></p> <p></p></p>
getRelativePath in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>container - The container.entry - The entry.protected void enterContainer(ZipFileResource zipFile, ZipArchiveDescriptor archiveDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext context) throws IOException
AbstractContainerScannerPlugin<p>Create a scope depending on the container type, e.g. a JAR file should return classpath scope.</p>
enterContainer in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>zipFile - The container.archiveDescriptor - The container descriptor.context - The scanner context.IOExceptionprotected void leaveContainer(ZipFileResource zipFile, ZipArchiveDescriptor archiveDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext) throws IOException
AbstractContainerScannerPlugin<p>Destroy the container dependent scope.</p>
leaveContainer in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>zipFile - The container.archiveDescriptor - The container descriptorscannerContext - The scanner context.IOExceptionprotected Resource getEntry(ZipFileResource container, org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)
AbstractContainerScannerPlugin<p>Return a Resource representing an entry.</p>
getEntry in class AbstractContainerScannerPlugin<ZipFileResource,org.apache.commons.compress.archivers.zip.ZipArchiveEntry,ZipArchiveDescriptor>container - The container.entry - The entry.FileResource
.Copyright © 2016–2021 jQAssistant Development Team. All rights reserved.