hudson.plugins.pmd.util
Class ModuleDetector

java.lang.Object
  extended by hudson.plugins.pmd.util.ModuleDetector

public final class ModuleDetector
extends java.lang.Object

Detects module names by parsing the name of a source file, the Maven pom.xml file or the ANT build.xml file.

Author:
Ulli Hafner

Constructor Summary
ModuleDetector()
           
 
Method Summary
 java.lang.String guessModuleName(java.lang.String fileName)
          Guesses a maven module name based on the source folder.
 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
 

Constructor Detail

ModuleDetector

public ModuleDetector()
Method Detail

setFileInputStreamFactory

public void setFileInputStreamFactory(FileInputStreamFactory fileInputStreamFactory)
Sets the factory to the specified value.

Parameters:
fileInputStreamFactory - the value to set

guessModuleName

public java.lang.String guessModuleName(java.lang.String fileName)
Guesses a maven module name based on the source folder.

Parameters:
fileName - the absolute path of the file (UNIX style) to guess the module for
Returns:
the guessed module name or an empty string if the name could not be resolved


Copyright © 2008. All Rights Reserved.