Package org.machanism.machai.project
ProjectLayoutManager is the package's layout-detection entry
point. It examines a directory for 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 every 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 project 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. Descriptor-backed layouts may parse and
cache build metadata when their accessors are called; consult the concrete
layout's documentation for descriptor-specific failure behavior.
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. Use ProjectLayoutManager when callers need
descriptor detection without selecting an implementation themselves.
- Since:
- 0.0.2
-
ClassesClassDescriptionDetects and configures the
ProjectLayoutappropriate for a project directory.Traverses a detected project structure and delegates leaf-folder processing to subclasses.