public abstract class AbstractSourceScanner extends Object implements CloverSourceScanner
| Constructor and Description |
|---|
AbstractSourceScanner(CompilerConfiguration configuration,
String outputSourceDirectory) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<String> |
getCompileSourceRoots() |
protected CompilerConfiguration |
getConfiguration() |
Map<String,String[]> |
getExcludedFiles()
Returns the list of excluded files that we'll need to copy.
|
protected abstract String |
getSourceDirectory() |
Map<String,String[]> |
getSourceFilesToInstrument()
Returns the list of source files to instrument taking into account the includes and excludes specified by
the user.
|
Map<String,String[]> |
getSourceFilesToInstrument(LanguageFileFilter languageFileFilter,
boolean skipGroovySourceDirectory)
This method can handle a special case: don't return excludes from native Groovy source directory (src/main/groovy
or src/test/groovy) because such files shall not be copied to instrumented sources directory
(target/clover/src-instrumented or target/clover/src-test/instrumented); a reason is that gmaven and
groovy-eclipse-plugin have the src/(main|test)/groovy location hardcoded and they will compile this source root
no matter what other compilation source roots or source directory are provided; it means that we would end
up with a 'duplicate class' build error if files would be copied.
|
protected abstract void |
removeGroovySourceRoot(Set<String> sourceRoots)
From a list of provided
sourceRoots remove those which specific for this scanner,
unless the specific folder points to the same location as the getSourceDirectory(). |
protected void |
removeSourceRoot(Set<String> sourceRoots,
String sourceRootToRemove) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSourceRootForLanguagepublic AbstractSourceScanner(@NotNull
CompilerConfiguration configuration,
@NotNull
String outputSourceDirectory)
configuration - compiler configurationoutputSourceDirectory - where to put instrumented sourcespublic Map<String,String[]> getExcludedFiles()
getExcludedFiles in interface CloverSourceScannerCloverSourceScanner.getExcludedFiles()public Map<String,String[]> getSourceFilesToInstrument()
getSourceFilesToInstrument in interface CloverSourceScannerCloverSourceScanner.getSourceFilesToInstrument()public Map<String,String[]> getSourceFilesToInstrument(LanguageFileFilter languageFileFilter, boolean skipGroovySourceDirectory)
getSourceFilesToInstrument in interface CloverSourceScannerlanguageFileFilter - extra filter (in addition to includes/excludes) based on the programming languageskipGroovySourceDirectory - if true then it will not return files located under Groovy
source directory (i.e. 'src/main/groovy' or 'src/test/groovy')protected abstract String getSourceDirectory()
protected CompilerConfiguration getConfiguration()
protected abstract void removeGroovySourceRoot(@NotNull
Set<String> sourceRoots)
sourceRoots remove those which specific for this scanner,
unless the specific folder points to the same location as the getSourceDirectory().sourceRoots - list to be modifiedgetSourceFilesToInstrument()Copyright © 2019 OpenClover.org. All rights reserved.