I - The container type.E - The element type.D - The descriptor type.public abstract class AbstractContainerScannerPlugin<I,E,D extends FileContainerDescriptor> extends AbstractResourceScannerPlugin<I,D>
<p>Abstract base implementation for scanner plugins that handle containers of elements like directories, archives, etc.</p>
| Constructor and Description |
|---|
AbstractContainerScannerPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
enterContainer(I 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 abstract D |
getContainerDescriptor(I container,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Return the descriptor representing the artifact.
|
protected abstract String |
getContainerPath(I container,
String path)
<p>Return the normalized path to the container.
|
protected abstract Iterable<? extends E> |
getEntries(I container)
<p>Return an iterable which delivers the entries of the container.
|
protected abstract Resource |
getEntry(I container,
E entry)
<p>Return a
Resource representing an entry. |
protected abstract String |
getRelativePath(I container,
E entry)
<p>Return the relative path of an element within the container.
|
protected abstract void |
leaveContainer(I container,
D containerDescriptor,
com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Destroy the container dependent scope.
|
D |
scan(I container,
String path,
com.buschmais.jqassistant.core.scanner.api.Scope scope,
com.buschmais.jqassistant.core.scanner.api.Scanner scanner) |
getDescriptorType, getTypeconfigure, configure, equals, getBooleanProperty, getDirectoryPath, getName, getProperties, getProperty, getScannerContext, getStringProperty, getTypeParameter, hashCodepublic final D scan(I container, String path, com.buschmais.jqassistant.core.scanner.api.Scope scope, com.buschmais.jqassistant.core.scanner.api.Scanner scanner) throws IOException
IOExceptionprotected abstract D getContainerDescriptor(I container, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext)
<p>Return the descriptor representing the artifact.</p>
container - The container.scannerContext - The scanner context.protected abstract Iterable<? extends E> getEntries(I container) throws IOException
<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>
container - The container.IOException - If the entries cannot be determined.protected abstract String getContainerPath(I container, String path)
<p>Return the normalized path to the container.</p>
container - The container.protected abstract String getRelativePath(I container, E entry)
<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>
container - The container.entry - The entry.protected abstract void enterContainer(I container, D containerDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext) throws IOException
<p>Create a scope depending on the container type, e.g. a JAR file should return classpath scope.</p>
container - The container.containerDescriptor - The container descriptor.scannerContext - The scanner context.IOExceptionprotected abstract void leaveContainer(I container, D containerDescriptor, com.buschmais.jqassistant.core.scanner.api.ScannerContext scannerContext) throws IOException
<p>Destroy the container dependent scope.</p>
container - The container.containerDescriptor - The container descriptorscannerContext - The scanner context.IOExceptionprotected abstract Resource getEntry(I container, E entry)
<p>Return a Resource representing an entry.</p>
container - The container.entry - The entry.FileResource
.Copyright © 2016–2021 jQAssistant Development Team. All rights reserved.