Class AbstractZipArchiveScannerPlugin<D extends ZipArchiveDescriptor>
java.lang.Object
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin<FileResource,D>
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractZipArchiveScannerPlugin<D>
- All Implemented Interfaces:
ScannerPlugin<FileResource,,D> com.buschmais.jqassistant.core.shared.lifecycle.ContextualConfigurableLifecycleAware<ScannerContext,,Map<String, Object>> com.buschmais.jqassistant.core.shared.lifecycle.LifecycleAware
- Direct Known Subclasses:
ZipScannerPlugin
public abstract class AbstractZipArchiveScannerPlugin<D extends ZipArchiveDescriptor>
extends AbstractScannerPlugin<FileResource,D>
Abstract base implementation for archive scanners.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.buschmais.jqassistant.core.scanner.api.ScannerPlugin
ScannerPlugin.Requires -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(FileResource file, String path, Scope scope) protected abstract ScopecreateScope(Scope currentScope, D archiveDescriptor, ScannerContext scannerContext) Create a scope depending of the archive type.protected abstract voiddestroyScope(ScannerContext scannerContext) Destroy the scope.protected abstract StringReturn the file extension to match.Class<? extends FileResource>getType()scan(FileResource file, String path, Scope currentScope, Scanner scanner) Methods inherited from class com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin
configure, configure, equals, getBooleanProperty, getDirectoryPath, getName, getProperties, getProperty, getScannerContext, getStringProperty, getTypeParameter, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.buschmais.jqassistant.core.scanner.api.ScannerPlugin
destroy, initialize
-
Constructor Details
-
AbstractZipArchiveScannerPlugin
public AbstractZipArchiveScannerPlugin()
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceScannerPlugin<FileResource,D extends ZipArchiveDescriptor> - Overrides:
getTypein classAbstractScannerPlugin<FileResource,D extends ZipArchiveDescriptor>
-
getDescriptorType
- Specified by:
getDescriptorTypein interfaceScannerPlugin<FileResource,D extends ZipArchiveDescriptor> - Overrides:
getDescriptorTypein classAbstractScannerPlugin<FileResource,D extends ZipArchiveDescriptor>
-
accepts
- Throws:
IOException
-
scan
public D scan(FileResource file, String path, Scope currentScope, Scanner scanner) throws IOException - Throws:
IOException
-
getExtension
Return the file extension to match.- Returns:
- The file extension
-
createScope
protected abstract Scope createScope(Scope currentScope, D archiveDescriptor, ScannerContext scannerContext) Create a scope depending of the archive type.- Parameters:
currentScope- The current scope.archiveDescriptor- The created archive descriptor.scannerContext- The scanner context- Returns:
- The new scope.
-
destroyScope
Destroy the scope.- Parameters:
scannerContext- The scanner context
-