Class ProjectLayoutManager

java.lang.Object
org.machanism.machai.project.ProjectLayoutManager

public class ProjectLayoutManager extends Object
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 Details

    • detectProjectLayout

      public static ProjectLayout detectProjectLayout(File projectDir) throws FileNotFoundException
      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 ProjectLayout implementation matching the project type.
      Throws:
      FileNotFoundException - If project directory does not exist.