hudson.plugins.pmd.util
Class MavenModuleDetector

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

public final class MavenModuleDetector
extends java.lang.Object

Detects maven module names by parsing the name of a source file.

Author:
Ulli Hafner

Constructor Summary
MavenModuleDetector()
           
 
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

MavenModuleDetector

public MavenModuleDetector()
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.