Class AbstractDirectoryScannerPlugin<D extends DirectoryDescriptor>
java.lang.Object
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin<I,D>
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractResourceScannerPlugin<I,D>
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractContainerScannerPlugin<File,File,D>
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractDirectoryScannerPlugin<D>
- All Implemented Interfaces:
ScannerPlugin<File,,D> com.buschmais.jqassistant.core.shared.lifecycle.ContextualConfigurableLifecycleAware<ScannerContext,,Map<String, Object>> com.buschmais.jqassistant.core.shared.lifecycle.LifecycleAware
- Direct Known Subclasses:
DirectoryScannerPlugin
public abstract class AbstractDirectoryScannerPlugin<D extends DirectoryDescriptor>
extends AbstractContainerScannerPlugin<File,File,D>
Abstract base implementation for directory 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 TypeMethodDescriptionbooleanprotected StringgetContainerPath(File container, String path) Return the normalized path to the container.getEntries(File container) Return an iterable which delivers the entries of the container.protected ResourceReturn aResourcerepresenting an entry.protected StringgetRelativePath(File container, File entry) Return the relative path of an element within the container.protected abstract ScopeReturn the scope the plugin expects for execution.getType()Methods inherited from class com.buschmais.jqassistant.plugin.common.api.scanner.AbstractContainerScannerPlugin
enterContainer, getContainerDescriptor, leaveContainer, scanMethods 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
-
AbstractDirectoryScannerPlugin
public AbstractDirectoryScannerPlugin()
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceScannerPlugin<File,D extends DirectoryDescriptor> - Overrides:
getTypein classAbstractResourceScannerPlugin<File,D extends DirectoryDescriptor>
-
getDescriptorType
- Specified by:
getDescriptorTypein interfaceScannerPlugin<File,D extends DirectoryDescriptor> - Overrides:
getDescriptorTypein classAbstractResourceScannerPlugin<File,D extends DirectoryDescriptor>
-
accepts
- Throws:
IOException
-
getEntries
Description copied from class:AbstractContainerScannerPluginReturn an iterable which delivers the entries of the container.The entries must not contain the relative root element, i.e. "/".
- Specified by:
getEntriesin classAbstractContainerScannerPlugin<File,File, D extends DirectoryDescriptor> - Parameters:
container- The container.- Returns:
- The iterable of entries.
- Throws:
IOException- If the entries cannot be determined.
-
getRequiredScope
Return the scope the plugin expects for execution.- Returns:
- The scope.
-
getContainerPath
Description copied from class:AbstractContainerScannerPluginReturn the normalized path to the container.- Specified by:
getContainerPathin classAbstractContainerScannerPlugin<File,File, D extends DirectoryDescriptor> - Parameters:
container- The container.- Returns:
- The normalized path.
-
getRelativePath
Description copied from class:AbstractContainerScannerPluginReturn the relative path of an element within the container.The following conditions must be considered:
- The separator to use is "/".
- The path must start with "/".
- The path must not end with "/".
- Specified by:
getRelativePathin classAbstractContainerScannerPlugin<File,File, D extends DirectoryDescriptor> - Parameters:
container- The container.entry- The entry.- Returns:
- The relative path.
-
getEntry
Description copied from class:AbstractContainerScannerPluginReturn aResourcerepresenting an entry.- Specified by:
getEntryin classAbstractContainerScannerPlugin<File,File, D extends DirectoryDescriptor> - Parameters:
container- The container.entry- The entry.- Returns:
- The
FileResource.
-