|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.maven.plugin.clover.internal.scanner.AbstractSourceScanner
public abstract class AbstractSourceScanner
Code common to compute the list of source files to instrument (main sources, test sources) for Java and Groovy languages.
| Constructor Summary | |
|---|---|
AbstractSourceScanner(CompilerConfiguration configuration,
String outputSourceDirectory)
|
|
| Method Summary | |
|---|---|
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/xxx/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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.maven.plugin.clover.internal.scanner.CloverSourceScanner |
|---|
isSourceRootForLanguage |
| Constructor Detail |
|---|
public AbstractSourceScanner(@NotNull
CompilerConfiguration configuration,
@NotNull
String outputSourceDirectory)
configuration - compiler configurationoutputSourceDirectory - where to put instrumented sources| Method Detail |
|---|
public 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 List<String> getCompileSourceRoots()
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()
protected void removeSourceRoot(Set<String> sourceRoots,
String sourceRootToRemove)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||