S - The ArchiveInputStream type.E - The ArchiveEntry type.D - The ArchiveDescriptor type.public abstract class AbstractArchiveInputStreamScannerPlugin<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor> extends AbstractContainerScannerPlugin<S,E,D>
<p>Abstract base class for archive scanners based on commons compress.</p>
| Constructor and Description |
|---|
AbstractArchiveInputStreamScannerPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(S item,
String path,
com.buschmais.jqassistant.core.scanner.api.Scope scope) |
protected void |
enterContainer(S container,
D containerDescriptor,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Create a scope depending on the container type, e.g. a JAR file should
return classpath scope.
|
protected String |
getContainerPath(S container,
String path)
<p>Return the normalized path to the container.
|
protected Iterable<? extends E> |
getEntries(S container)
<p>Return an iterable which delivers the entries of the container.
|
protected Resource |
getEntry(S container,
E entry)
<p>Return a
Resource representing an entry. |
protected abstract E |
getNextEntry(S container) |
protected String |
getRelativePath(S container,
E entry)
<p>Return the relative path of an element within the container.
|
protected void |
leaveContainer(S container,
D containerDescriptor,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Destroy the container dependent scope.
|
getContainerDescriptor, scangetDescriptorType, getTypeconfigure, configure, equals, getBooleanProperty, getDirectoryPath, getName, getProperties, getProperty, getScannerContext, getStringProperty, getTypeParameter, hashCodepublic AbstractArchiveInputStreamScannerPlugin()
protected abstract E getNextEntry(S container) throws IOException
IOExceptionpublic boolean accepts(S item, String path, com.buschmais.jqassistant.core.scanner.api.Scope scope) throws IOException
IOExceptionprotected Iterable<? extends E> getEntries(S 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<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.IOException - If the entries cannot be determined.protected String getContainerPath(S container, String path)
AbstractContainerScannerPlugin<p>Return the normalized path to the container.</p>
getContainerPath in class AbstractContainerScannerPlugin<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.protected String getRelativePath(S container, E 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<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.entry - The entry.protected void enterContainer(S container, D containerDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext) 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<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.containerDescriptor - The container descriptor.scannerContext - The scanner context.IOExceptionprotected void leaveContainer(S container, D containerDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext) throws IOException
AbstractContainerScannerPlugin<p>Destroy the container dependent scope.</p>
leaveContainer in class AbstractContainerScannerPlugin<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.containerDescriptor - The container descriptorscannerContext - The scanner context.IOExceptionprotected Resource getEntry(S container, E entry)
AbstractContainerScannerPlugin<p>Return a Resource representing an entry.</p>
getEntry in class AbstractContainerScannerPlugin<S extends org.apache.commons.compress.archivers.ArchiveInputStream,E extends org.apache.commons.compress.archivers.ArchiveEntry,D extends ArchiveDescriptor>container - The container.entry - The entry.FileResource
.Copyright © 2016–2021 jQAssistant Development Team. All rights reserved.