Package org.machanism.machai.project
Class ProjectLayoutManager
java.lang.Object
org.machanism.machai.project.ProjectLayoutManager
Manages detection and instantiation of specific
ProjectLayout
implementations based on the structure of a given project directory.
This class determines the appropriate project layout for various languages and build tools such as Maven, Node (package.json), and Python, defaulting to a generic layout if necessary.
Usage Example:
File dir = new File("/path/to/project");
ProjectLayout layout = ProjectLayoutManager.detectProjectLayout(dir);
- Since:
- 0.0.2
- Author:
- Viktor Tovstyi
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProjectLayoutdetectProjectLayout(File projectDir) Detects the project layout based on the contents of the specified directory.
-
Method Details
-
detectProjectLayout
Detects the project layout based on the contents of the specified directory. Supports Maven, Node.js (package.json), Python, or a default layout.- Parameters:
projectDir- The directory of the project to analyze.- Returns:
- The detected
ProjectLayoutimplementation matching the project type. - Throws:
FileNotFoundException- If project directory does not exist.
-