Class DefaultProjectLayout
java.lang.Object
org.machanism.machai.project.layout.ProjectLayout
org.machanism.machai.project.layout.DefaultProjectLayout
Minimal fallback
ProjectLayout implementation.
This layout performs a lightweight filesystem inspection and treats each
immediate subdirectory of the configured project root as a potential module
(excluding entries listed in ProjectLayout.getExcludeDirs()). It does not
try to infer language-specific source, test or documentation roots; those
accessors return null.
- Since:
- 0.0.2
- Author:
- Viktor Tovstyi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of documentation roots for this layout.Returns a list of module directory names present in the configured project directory.Returns a list of source roots for this layout.getTests()Returns a list of test source roots for this layout.projectDir(File projectDir) Sets the project root directory used by this layout.Methods inherited from class org.machanism.machai.project.layout.ProjectLayout
findDirectories, findFiles, getExcludeDirs, getParentId, getProjectDir, getProjectId, getProjectLayoutType, getProjectName, getRelativePath, getRelativePath, getRelativePath
-
Constructor Details
-
DefaultProjectLayout
public DefaultProjectLayout()
-
-
Method Details
-
getModules
Returns a list of module directory names present in the configured project directory.The default implementation treats each immediate subdirectory as a module.
DefaultProjectLayout layout = new DefaultProjectLayout(); java.util.List<String> modules = layout.projectDir(new java.io.File("C:\\repo")).getModules();- Overrides:
getModulesin classProjectLayout- Returns:
- a list of module directory names (never
null)
-
getSources
Returns a list of source roots for this layout.- Specified by:
getSourcesin classProjectLayout- Returns:
- empty list; not inferred by the default layout
-
getDocuments
Returns a list of documentation roots for this layout.- Specified by:
getDocumentsin classProjectLayout- Returns:
- empty list; not inferred by the default layout
-
getTests
Returns a list of test source roots for this layout.- Specified by:
getTestsin classProjectLayout- Returns:
- empty list; not inferred by the default layout
-
projectDir
Description copied from class:ProjectLayoutSets the project root directory used by this layout.- Overrides:
projectDirin classProjectLayout- Parameters:
projectDir- the project root directory- Returns:
- this instance for chaining
-