Class AbstractScannerPlugin<I,D extends Descriptor>
java.lang.Object
com.buschmais.jqassistant.plugin.common.api.scanner.AbstractScannerPlugin<I,D>
- All Implemented Interfaces:
ScannerPlugin<I,,D> com.buschmais.jqassistant.core.shared.lifecycle.ContextualConfigurableLifecycleAware<ScannerContext,,Map<String, Object>> com.buschmais.jqassistant.core.shared.lifecycle.LifecycleAware
- Direct Known Subclasses:
AbstractResourceScannerPlugin,AbstractUriScannerPlugin,AbstractZipArchiveScannerPlugin,DirectoryResourceScannerPlugin,FileResourceScannerPlugin,GZIPFileScannerPlugin,TarFileScannerPlugin
public abstract class AbstractScannerPlugin<I,D extends Descriptor>
extends Object
implements ScannerPlugin<I,D>
Abstract base implementation of a
ScannerPlugin.-
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 TypeMethodDescriptionprotected voidConvenience method which might be overridden by sub-classes.final voidconfigure(ScannerContext scannerContext, Map<String, Object> properties) final booleanprotected BooleangetBooleanProperty(String name, Boolean defaultValue) Get a property as boolean.protected StringgetDirectoryPath(File directory, File entry) Return the relative path of a file within a directory.getName()Get all properties.protected <T> TgetProperty(String name, Class<T> type) Get the value of a property.protected ScannerContextReturn the scanner context.protected StringgetStringProperty(String name, String defaultValue) Get a property as string.getType()protected <T> Class<T>getTypeParameter(Class<?> expectedSuperClass, int genericTypeParameterIndex) Determines the type parameter for a generic super class.final inthashCode()Methods 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
accepts, destroy, initialize, scan
-
Constructor Details
-
AbstractScannerPlugin
public AbstractScannerPlugin()
-
-
Method Details
-
configure
- Specified by:
configurein interfacecom.buschmais.jqassistant.core.shared.lifecycle.ContextualConfigurableLifecycleAware<I,D extends Descriptor> - Specified by:
configurein interfaceScannerPlugin<I,D extends Descriptor>
-
configure
protected void configure()Convenience method which might be overridden by sub-classes. -
getType
- Specified by:
getTypein interfaceScannerPlugin<I,D extends Descriptor>
-
getDescriptorType
- Specified by:
getDescriptorTypein interfaceScannerPlugin<I,D extends Descriptor>
-
getName
- Specified by:
getNamein interfaceScannerPlugin<I,D extends Descriptor>
-
getTypeParameter
Determines the type parameter for a generic super class.- Parameters:
expectedSuperClass- The generic super class.genericTypeParameterIndex- The index, e.g. 0 for the first.- Returns:
- The type parameter.
-
getProperties
Get all properties.- Returns:
- The properties.
-
getProperty
Get the value of a property.- Type Parameters:
T- The type.- Parameters:
name- The name of the property.type- The expected type.- Returns:
- The value.
-
getStringProperty
Get a property as string.- Parameters:
name- The name.defaultValue- The default value.- Returns:
- The value.
-
getBooleanProperty
Get a property as boolean.- Parameters:
name- The name.defaultValue- The default value.- Returns:
- The value.
-
getScannerContext
Return the scanner context.- Returns:
- The scanner context.
-
getDirectoryPath
Return the relative path of a file within a directory.- Parameters:
directory- The directory.entry- The file.- Returns:
- The relative path.
-
equals
-
hashCode
public final int hashCode()
-