java.lang.Object
de.sormuras.bach.project.Base
public final class Base extends Object
A collection of project-defining directories and derived paths.
Example
Component Directory Tree Example
--------------------------------------------------------
directory --> jigsaw-quick-start
├───.bach
│ │ build.jsh
│ ├───lib
│ │ de.sormuras.bach@14-M1.jar
│ ├───src
workspace ----│-> └───workspace
│ ├───classes
│ │ └───11
│ │ ├───com.greetings
│ │ │ module-info.class
│ │ └───com
│ │ └───greetings
│ │ Main.class
│ ├───classes-test
│ ├───documentation
│ ├───image
│ ├───modules
│ │ com.greetings@1-ea.jar
│ ├───modules-test
│ ├───reports
│ └───sources
libraries --> ├───lib
└───src
└───com.greetings
│ module-info.java
└───com
└───greetings
Main.java
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Pathclasses(String realm, int release)Pathclasses(String realm, int release, String module)Pathdirectory()Pathdirectory(String entry, String... more)Pathdocumentation(String entry)Pathlibraries()Pathlibraries(String entry)Pathmodules(String realm)static Baseof()Return a new base instance for the current user directory.static Baseof(String first, String... more)Return a new base instance for the given directory.static Baseof(Path directory)Return a new base instance for the given directory.Pathreports(String entry, String... more)Pathsources(String realm)Pathworkspace()Pathworkspace(String entry, String... more)
-
Constructor Details
-
Base
Initializes a new base instance with the given component values.- Parameters:
directory- The path to the base directory of the projectlibraries- The directory that contains 3rd-party modulesworkspace- The directory that collects all generated assets
-
-
Method Details
-
of
Return a new base instance for the current user directory.directory=Path.of("")libraries=Path.of("lib")workspace=Path.of(".bach", "workspace")
- Returns:
- A new default base object
-
of
Return a new base instance for the given directory.directory=Path.of(first, more)libraries=Path.of(first, more, "lib")workspace=Path.of(first, more, ".bach", "workspace")
- Parameters:
first- The first path element to use as the base directorymore- The array of path elements to complete the base directory- Returns:
- A new base object initialized for the given directory
-
of
Return a new base instance for the given directory.directory=directorylibraries=directory.resolve("lib")workspace=directory.resolve(".bach", "workspace")
- Parameters:
directory- The path to use as the base directory- Returns:
- A new base object initialized for the given directory
-
directory
-
libraries
-
workspace
-
directory
-
libraries
-
workspace
-
classes
-
classes
-
documentation
-
modules
-
sources
-
reports
-