- All Superinterfaces:
AutoCloseable
This acts as a nexus for managing the lifetime of test sources and directories, and should be used within a try-with-resources block to ensure temporary files get released after the test completes.
While this interface may seem somewhat intimidating due to the number of methods it provides, you will usually only ever need to use a small subset of them. The main ones you probably will want to use are:
-
addSourcePathPackage(Path)- for copying a source path tree from your file system. -
createSourcePathPackage()- for creating a new source path tree. -
addClassPathPackage(Path)- for adding a class path resource (usually a JAR or a directory of packages of classes). -
addModulePathModule(String, Path)- for adding a module path resource (usually a JAR or a directory of packages of classes). -
getClassPathPackages()- for fetching all class path resources. -
getModulePathModules()- for fetching all module path resources. -
getSourceOutputPackages()- for fetching all generated source packages. -
getSourceOutputModules()- for fetching all generated source modules. -
close()- to close any resources in the temporary file system.
A simple example of usage of this interface would be the following:
try (Workspace workspace = Workspaces.newWorkspace(PathStrategy.TEMP_DIRECTORIES)) {
workspace
.createSourcePathPackage()
.copyContentsFrom("src", "test", "resources", "test-data");
var compilation = someCompiler.compile(workspace);
assertThat(compilation).isSuccessful();
}
Remember that files that are created as the result of a compilation can be queried via
JctFileManager, which is accessible on the compilation result object. This may
more accurately represent the logical project structure that is the result of various
processing operations during compilation.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddAnnotationProcessorPathModule(String moduleName, Path path) Add a module to theannotation processor module path.default voidAdd a package to theannotation processor path.default voidaddClassOutputModule(String moduleName, Path path) Add a module to theclass outputs.default voidaddClassOutputPackage(Path path) Add a package to theclass outputs.default voidaddClassPathPackage(Path path) Add a package to theclass path.voidaddModule(JavaFileManager.Location location, String moduleName, Path path) Add an existing package root to this workspace and associate it with the given module name in the given location.default voidaddModulePathModule(String moduleName, Path path) Add a module to themodule path.default voidaddNativeHeaderOutputModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default voidDeprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.voidaddPackage(JavaFileManager.Location location, Path path) Add an existing package root to this workspace and associate it with the given location.default voidaddPatchModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default voidDeprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used.default voidaddSourceOutputModule(String moduleName, Path path) Add a module to thegenerated source outputs.default voidaddSourceOutputPackage(Path path) Add a package to thegenerated source outputs.default voidaddSourcePathModule(String moduleName, Path path) Add a module to themodule source path.default voidaddSourcePathPackage(Path path) Add a package to thelegacy source path.default voidaddSystemModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default voidaddUpgradeModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.voidclose()Attempt to close all resources in this workspace.default ManagedDirectorycreateAnnotationProcessorPathModule(String moduleName) Create a module in theannotation processor module path.default ManagedDirectoryCreate a package in theannotation processor path.default ManagedDirectorycreateClassOutputModule(String moduleName) Create a module in theclass outputs.default ManagedDirectoryCreate a package in theclass outputs.default ManagedDirectoryCreate a package in theclass path.createModule(JavaFileManager.Location location, String moduleName) Create a new test directory for a package root and associate it with the given module name in the given location.default ManagedDirectorycreateModulePathModule(String moduleName) Create a module in themodule path.default ManagedDirectorycreateNativeHeaderOutputModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default ManagedDirectoryDeprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.createPackage(JavaFileManager.Location location) Create a new test directory for a package root and associate it with the given location.default ManagedDirectorycreatePatchModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default ManagedDirectoryDeprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used.default ManagedDirectorycreateSourceOutputModule(String moduleName) Create a module in thegenerated source outputs.default ManagedDirectoryCreate a package in thegenerated source outputs.default ManagedDirectorycreateSourcePathModule(String moduleName) Create a module in themodule source path.default ManagedDirectoryCreate a package in thesource path.default ManagedDirectorycreateSystemModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.default ManagedDirectorycreateUpgradeModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Map<JavaFileManager.Location,List<? extends PathRoot>> Get an immutable copy of the current paths to operate on.getAnnotationProcessorPathModule(String moduleName) Get the path roots for theannotation processor module path.Get the module path roots for theannotation processor module path.Get the path roots for theannotation processor path.getClassOutputModule(String moduleName) Get the module path roots forclass outputsfor the given module name.Get the module path roots forclass outputs.Get the non-module path roots forclass outputs.Get the path roots for theclass path.getModule(JavaFileManager.Location location, String moduleName) Get the collection of path roots associated with the given module.getModulePathModule(String moduleName) Get the path roots for themodule path.Get the module path roots for themodule paths.getModules(JavaFileManager.Location location) Get the collection of modules associated with the given location.getNativeHeaderOutputModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.getPackages(JavaFileManager.Location location) Get the collection of path roots associated with the given location.getPatchModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Get the path strategy in use.Deprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used.getSourceOutputModule(String moduleName) Get the module path roots forsource outputsfor the given module name.Get the module path roots forsource outputs.Get the non-module path roots forsource outputs.getSourcePathModule(String moduleName) Get the path roots for themodule source path.Get the module path roots for themodule source paths.Get the path roots for thesource path.getSystemModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.getUpgradeModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used.booleanisClosed()Determine if the workspace is closed or not.
-
Method Details
-
close
void close()Attempt to close all resources in this workspace.- Specified by:
closein interfaceAutoCloseable- Throws:
UncheckedIOException- if an error occurs.
-
isClosed
Determine if the workspace is closed or not.- Returns:
trueif closed,falseif open.- Since:
- 0.4.0
-
getAllPaths
Map<JavaFileManager.Location,List<? extends PathRoot>> getAllPaths()Get an immutable copy of the current paths to operate on.- Returns:
- the paths.
-
getModule
Get the collection of path roots associated with the given module.Usually this should only ever contain one path root at a maximum, although
Workspacedoes not explicitly enforce this constraint.If no results were found, then an empty collection is returned.
- Parameters:
location- the module-oriented or output location.moduleName- the module name within the location.- Returns:
- the collection of paths.
- Throws:
IllegalArgumentException- if the location is neithermodule-orientedor anoutput location. This will also be raised if this method is called with an instance ofModuleLocation(you should usegetPackages(Location)instead for this).- Since:
- 0.1.0
- See Also:
-
getModules
Get the collection of modules associated with the given location.If no results were found, then an empty map is returned.
- Parameters:
location- the location to get the modules for.- Returns:
- the map of module names to lists of associated paths.
- Throws:
IllegalArgumentException- if the location is neithermodule-orientedor anoutput location. This will also be raised if this method is called with an instance ofModuleLocation.- Since:
- 0.1.0
- See Also:
-
getPathStrategy
Get the path strategy in use.- Returns:
- the path strategy.
-
getPackages
Get the collection of path roots associated with the given location.If no results were found, then an empty collection is returned.
- Parameters:
location- the location to get.- Returns:
- the collection of paths.
- Throws:
IllegalArgumentException- if the location ismodule-oriented.- Since:
- 0.1.0
- See Also:
-
addPackage
Add an existing package root to this workspace and associate it with the given location.The following constraints must be met, otherwise an
IllegalArgumentExceptionwill be thrown:-
The
locationmust not bemodule-oriented. -
The
pathmust exist.
For example, this would add the package tree in
src/test/resources/packagesinto thesource code paththat is used to compile files:var path = Path.of("src", "test", "resources", "packages"); workspace.addPackage(StandardLocation.SOURCE_PATH, path);- Parameters:
location- the location to associate with.path- the path to add.- Throws:
IllegalArgumentException- if the inputs are invalid.- See Also:
-
The
-
addModule
Add an existing package root to this workspace and associate it with the given module name in the given location.The following constraints must be met, otherwise an
IllegalArgumentExceptionwill be thrown:-
The
locationmust bemodule-orientedor anoutput location. -
The
locationmust not be amodule-location handlealready. -
The
pathmust exist.
For example, this would add the package tree in
src/test/resources/packagesinto themodule source code pathunder the module namefoo.bar:var path = Path.of("src", "test", "resources", "packages"); workspace.addModule(StandardLocation.MODULE_SOURCE_PATH, "foo.bar", path);- Parameters:
location- the location to associate with.moduleName- the name of the module.path- the path to add.- Throws:
IllegalArgumentException- if the inputs are invalid.- See Also:
-
The
-
createPackage
Create a new test directory for a package root and associate it with the given location.This path will be destroyed when the workspace is
closed.The following constraints must be met, otherwise an
IllegalArgumentExceptionwill be thrown:-
The
locationmust not bemodule-oriented.
For example, this would create a new source root that you could add files to:
workspace.createPackage(StandardLocation.SOURCE_PATH);- Parameters:
location- the location to associate with.- Returns:
- the test directory that was created.
- Throws:
IllegalArgumentException- if the inputs are invalid.- See Also:
-
The
-
createModule
Create a new test directory for a package root and associate it with the given module name in the given location.This path will be destroyed when the workspace is
closed.The following constraints must be met, otherwise an
IllegalArgumentExceptionwill be thrown:-
The
locationmust bemodule-orientedor anoutput location. -
The
locationmust not be amodule-location handlealready.
For example, this would create a new multi-module source root that you could add files to, for a module named
foo.bar:workspace.createModule(StandardLocation.MODULE_SOURCE_PATH, "foo.bar");- Parameters:
location- the location to associate with.moduleName- the module name to use.- Returns:
- the test directory that was created.
- Throws:
IllegalArgumentException- if the inputs are invalid.- See Also:
-
The
-
addClassOutputPackage
Add a package to theclass outputs.- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addClassOutputModule
Add a module to theclass outputs.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addSourceOutputPackage
Add a package to thegenerated source outputs.- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addSourceOutputModule
Add a module to thegenerated source outputs.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addClassPathPackage
Add a package to theclass path.If you are adding JPMS modules, you may want to use
addModulePathModule(String, Path)instead.- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addModulePathModule
Add a module to themodule path.If you are adding non-JPMS modules, you may want to use
addClassPathPackage(Path)instead.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addSourcePathPackage
Add a package to thelegacy source path.This is the location you will usually tend to use for your source code.
If you wish to define multiple JPMS modules in your source code tree to compile together, you will want to consider using
addSourcePathModule(String, Path)instead. For most purposes, however, this method is the one you will want to be using if your code is not in a named module directory (so not something likesrc/my.module/org/example/...).- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addSourcePathModule
Add a module to themodule source path.Note that this will signal to the compiler to run in multi-module compilation mode. Any source packages that were
addedorcreatedwill be ignored.If you are using a single-module, you can
add a source packageand include amodule-info.javain the base directory instead.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addAnnotationProcessorPathPackage
Add a package to theannotation processor path.Note that this will be ignored if the compiler is provided with explicit annotation processor instances to run.
- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addAnnotationProcessorPathModule
Add a module to theannotation processor module path.Note that this will be ignored if the compiler is provided with explicit annotation processor instances to run.
- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addPlatformClassPathPackage
Deprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used. This will be removed in v1.0.0.Add a package to theplatform class path(also known as the boot class path).- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addNativeHeaderOutputPackage
Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead calladdPackage(Location, Path), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Add a package to thenative header outputs.- Parameters:
path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addNativeHeaderOutputModule
@Deprecated(forRemoval=true, since="0.6.0") default void addNativeHeaderOutputModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead calladdModule(Location, String, Path), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Add a module to thenative header outputs.- Parameters:
moduleName- the name of the module.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addUpgradeModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default void addUpgradeModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead calladdModule(Location, String, Path), passingStandardLocation.UPGRADE_MODULE_PATHas the first parameter.Add a module to theupgrade module path.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addSystemModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default void addSystemModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead calladdModule(Location, String, Path), passingStandardLocation.SYSTEM_MODULESas the first parameter.Add a module to thesystem module path.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
addPatchModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default void addPatchModulePathModule(String moduleName, Path path) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead calladdModule(Location, String, Path), passingStandardLocation.PATCH_MODULE_PATHas the first parameter.Add a module to thepatch module path.- Parameters:
moduleName- the module name.path- the path to add.- Throws:
IllegalArgumentException- if the path does not exist.- See Also:
-
createClassOutputPackage
Create a package in theclass outputs.- Returns:
- the created test directory.
- See Also:
-
createClassOutputModule
Create a module in theclass outputs.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createSourceOutputPackage
Create a package in thegenerated source outputs.- Returns:
- the created test directory.
- See Also:
-
createSourceOutputModule
Create a module in thegenerated source outputs.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createClassPathPackage
Create a package in theclass path.If you are adding JPMS modules, you may want to use
createModulePathModule(String)instead.- Returns:
- the created test directory.
- See Also:
-
createModulePathModule
Create a module in themodule path.If you are adding non-JPMS modules, you may want to use
createClassPathPackage()instead.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createSourcePathPackage
Create a package in thesource path.If you wish to define multiple JPMS modules in your source code tree to compile together, you will want to consider using
createSourcePathModule(String)instead. For most purposes, however, this method is the one you will want to be using if your code is not in a named module directory (so not something likesrc/my.module/org/example/...).- Returns:
- the created test directory.
- See Also:
-
createSourcePathModule
Create a module in themodule source path.Note that this will signal to the compiler to run in multi-module compilation mode. Any source packages that were
createdoraddedwill be ignored.If you are using a single-module, you can
create a source packageand include amodule-info.javain the base directory instead.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createAnnotationProcessorPathPackage
Create a package in theannotation processor path.Note that this will be ignored if the compiler is provided with explicit annotation processor instances to run.
- Returns:
- the created test directory.
- See Also:
-
createAnnotationProcessorPathModule
Create a module in theannotation processor module path.Note that this will be ignored if the compiler is provided with explicit annotation processor instances to run.
- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createPlatformClassPathPackage
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createPlatformClassPathPackage()Deprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used. This will be removed in v1.0.0.Create a package in theplatform class path(also known as the boot class path).- Returns:
- the created test directory.
- See Also:
-
createNativeHeaderOutputPackage
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createNativeHeaderOutputPackage()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callcreatePackage(Location), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Create a package in thenative header outputs.- Returns:
- the created test directory.
- See Also:
-
createNativeHeaderOutputModule
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createNativeHeaderOutputModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callcreateModule(Location, String), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Create a module in thenative header outputs.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createUpgradeModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createUpgradeModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callcreateModule(Location, String), passingStandardLocation.UPGRADE_MODULE_PATHas the first parameter.Create a module in theupgrade module path.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createSystemModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createSystemModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callcreateModule(Location, String), passingStandardLocation.SYSTEM_MODULESas the first parameter.Create a module in thesystem module path.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
createPatchModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default ManagedDirectory createPatchModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callcreateModule(Location, String), passingStandardLocation.PATCH_MODULE_PATHas the first parameter.Create a module in thepatch module path.- Parameters:
moduleName- the module name.- Returns:
- the created test directory.
- See Also:
-
getClassOutputPackages
Get the non-module path roots forclass outputs.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getClassOutputModule
Get the module path roots forclass outputsfor the given module name.- Parameters:
moduleName- the module name.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getClassOutputModules
Get the module path roots forclass outputs.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getSourceOutputPackages
Get the non-module path roots forsource outputs.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getSourceOutputModule
Get the module path roots forsource outputsfor the given module name.- Parameters:
moduleName- the module name.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getSourceOutputModules
Get the module path roots forsource outputs.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getClassPathPackages
Get the path roots for theclass path.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getSourcePathPackages
Get the path roots for thesource path.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getAnnotationProcessorPathPackages
Get the path roots for theannotation processor path.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getAnnotationProcessorPathModule
Get the path roots for theannotation processor module path.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getAnnotationProcessorPathModules
Get the module path roots for theannotation processor module path.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getPlatformClassPathPackages
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getPlatformClassPathPackages()Deprecated, for removal: This API element is subject to removal in a future version.The platform class path has been mostly replaced by the use of system modules, so should not be used. This will be removed in v1.0.0.Get the path roots for theplatform class path(also known as the boot class path).- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getNativeHeaderOutputPackages
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getNativeHeaderOutputPackages()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetPackages(Location), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Get the non-module path roots fornative header outputs.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getNativeHeaderOutputModule
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getNativeHeaderOutputModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModule(Location, String), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Get the module path roots fornative header outputsfor the given module name.- Parameters:
moduleName- the module name.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getNativeHeaderOutputModules
@Deprecated(forRemoval=true, since="0.6.0") default Map<String,List<? extends PathRoot>> getNativeHeaderOutputModules()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModules(Location), passingStandardLocation.NATIVE_HEADER_OUTPUTas the first parameter.Get the module path roots fornative header outputs.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getSourcePathModule
Get the path roots for themodule source path.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getSourcePathModules
Get the module path roots for themodule source paths.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getUpgradeModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getUpgradeModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModule(Location, String), passingStandardLocation.UPGRADE_MODULE_PATHas the first parameter.Get the path roots for theupgrade module path.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getUpgradeModulePathModules
@Deprecated(forRemoval=true, since="0.6.0") default Map<String,List<? extends PathRoot>> getUpgradeModulePathModules()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModules(Location), passingStandardLocation.UPGRADE_MODULE_PATHas the first parameter.Get the module path roots for theupgrade module paths.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getSystemModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getSystemModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModule(Location, String), passingStandardLocation.SYSTEM_MODULESas the first parameter.Get the path roots for thesystem modules.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getSystemModulePathModules
@Deprecated(forRemoval=true, since="0.6.0") default Map<String,List<? extends PathRoot>> getSystemModulePathModules()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModules(Location), passingStandardLocation.SYSTEM_MODULESas the first parameter.Get the module path roots for thesystem modules.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getModulePathModule
Get the path roots for themodule path.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getModulePathModules
Get the module path roots for themodule paths.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-
getPatchModulePathModule
@Deprecated(forRemoval=true, since="0.6.0") default List<? extends PathRoot> getPatchModulePathModule(String moduleName) Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModule(Location, String), passingStandardLocation.PATCH_MODULE_PATHas the first parameter.Get the path roots for thepatch module path.- Parameters:
moduleName- the module name to get.- Returns:
- the roots in a collection, or an empty collection if none were found.
- Since:
- 0.1.0
-
getPatchModulePathModules
@Deprecated(forRemoval=true, since="0.6.0") default Map<String,List<? extends PathRoot>> getPatchModulePathModules()Deprecated, for removal: This API element is subject to removal in a future version.This is a specialist method that is usually not used. To keep the API simple, this is being removed. You should instead callgetModules(Location), passingStandardLocation.PATCH_MODULE_PATHas the first parameter.Get the module path roots for thepatch module paths.- Returns:
- the roots in a map of module names to lists of roots, or an empty map if none were found.
- Since:
- 0.1.0
-