Package org.machanism.machai.project


package org.machanism.machai.project
Detects project layouts and traverses their module trees.

ProjectLayoutManager is the package's layout-detection entry point. It checks descriptors in this order: Maven (pom.xml), Gradle (build.gradle), JavaScript or TypeScript (package.json), and Python (pyproject.toml). An existing directory without a recognized descriptor uses DefaultProjectLayout; a missing directory causes FileNotFoundException.

ProjectProcessor is the traversal entry point. It detects the root layout and recursively scans each module returned by ProjectLayout.getModules(). A null module list identifies a leaf and invokes ProjectProcessor.processFolder(org.machanism.machai.project.layout.ProjectLayout). A non-null empty list identifies a parent with no modules and does not invoke that hook. Implementations should therefore make folder processing safe to invoke once for each discovered leaf.

Layouts expose root-relative production-source, test, and documentation paths when supported by the build system. They may also expose module paths and metadata such as names, identifiers, and parent identifiers. Resolve returned paths against ProjectLayout.getProjectDir() before accessing the filesystem.

Typical usage


 java.io.File projectDir = new java.io.File("path/to/project");
 org.machanism.machai.project.ProjectProcessor processor = createProcessor();
 processor.scanFolder(projectDir);
 

Use the org.machanism.machai.project.layout package for concrete layout implementations, descriptor-specific behavior, path conventions, and metadata limitations.

Since:
0.0.2