|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.pmd.util.ModuleDetector
public class ModuleDetector
Detects module names by parsing the name of a source file, the Maven pom.xml file or the ANT build.xml file.
| Field Summary | |
|---|---|
protected static java.lang.String |
ANT_PROJECT
Filename of Ant project file. |
protected static java.lang.String |
MAVEN_POM
Filename of Maven pom. |
| Constructor Summary | |
|---|---|
ModuleDetector()
Creates a new instance of ModuleDetector. |
|
ModuleDetector(java.io.File workspace)
Creates a new instance of ModuleDetector. |
|
ModuleDetector(java.io.File workspace,
FileInputStreamFactory fileInputStreamFactory)
Creates a new instance of ModuleDetector. |
|
| Method Summary | |
|---|---|
protected java.lang.String[] |
find(java.io.File path,
java.lang.String pattern)
Finds files of the matching pattern. |
java.lang.String |
guessModuleName(java.lang.String originalFileName)
Uses the path prefixes of pom.xml or build.xml files to guess a module name for the specified file. |
java.lang.String |
guessModuleName(java.lang.String fileName,
boolean isMavenBuild,
boolean isAntBuild)
Guesses a module name based on the source folder or the content in the pom.xml or build.xml files. |
void |
setFileInputStreamFactory(FileInputStreamFactory fileInputStreamFactory)
Sets the factory to the specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String MAVEN_POM
protected static final java.lang.String ANT_PROJECT
| Constructor Detail |
|---|
public ModuleDetector()
ModuleDetector.
public ModuleDetector(java.io.File workspace)
ModuleDetector.
workspace - the workspace to scan for maven pom.xml or ant build.xml files
public ModuleDetector(java.io.File workspace,
FileInputStreamFactory fileInputStreamFactory)
ModuleDetector.
workspace - the workspace to scan for maven pom.xml or ant build.xml filesfileInputStreamFactory - the value to set| Method Detail |
|---|
public void setFileInputStreamFactory(FileInputStreamFactory fileInputStreamFactory)
fileInputStreamFactory - the value to setpublic java.lang.String guessModuleName(java.lang.String originalFileName)
originalFileName - file name to guess a module for
protected java.lang.String[] find(java.io.File path,
java.lang.String pattern)
path - root path to scan inpattern - pattern of files
public java.lang.String guessModuleName(java.lang.String fileName,
boolean isMavenBuild,
boolean isAntBuild)
fileName - the absolute path of the file (UNIX style) to guess the module
forisMavenBuild - determines whether this build uses mavenisAntBuild - determines whether this build uses maven
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||