java.lang.Object
edu.hm.hafner.analysis.ModuleDetector
Detects module names by parsing the name of a source file, the Maven pom.xml file or the ANT build.xml file.
- Author:
- Ullrich Hafner, Christoph Laeubrich (support for OSGi-Bundles)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFacade for file system operations. -
Constructor Summary
ConstructorsConstructorDescriptionModuleDetector(Path workspace, ModuleDetector.FileSystem fileSystem) Creates a new instance ofModuleDetector. -
Method Summary
Modifier and TypeMethodDescriptionguessModuleName(String originalFileName) Uses the path prefixes of pom.xml or build.xml files to guess a module name for the specified file.
-
Constructor Details
-
ModuleDetector
Creates a new instance ofModuleDetector.- Parameters:
workspace- the workspace to scan for Maven pom.xml or ant build.xml filesfileSystem- file system facade to find and load files with
-
-
Method Details
-
guessModuleName
Uses the path prefixes of pom.xml or build.xml files to guess a module name for the specified file.- Parameters:
originalFileName- file name to guess a module for, must be an absolute path- Returns:
- a module name or an empty string
-