public final class JkDependencyResolver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
JkResolutionParameters |
parameters |
Modifier and Type | Method and Description |
---|---|
JkDependencyResolver |
addRepos(JkRepo... repos)
Adds the given repositories to the dependency resolver.
|
JkDependencyResolver |
addRepos(JkRepoSet repos)
Adds the given repositories to the dependency resolver.
|
JkDependencyResolver |
cleanCache()
Removes all cached results and deletes the contents of the file system cache directory, if it exists.
|
JkResolutionParameters |
getDefaultParams()
Returns the parameters of this dependency resolver.
|
JkRepoSet |
getRepos()
Returns the repositories the resolution is made on.
|
boolean |
isUseFileSystemCache()
Returns a boolean indicating whether the file system cache is used by the dependency resolver.
|
boolean |
isUseInMemoryCache()
Returns whether the in-memory cache is used.se.
|
static JkDependencyResolver |
of()
Creates an empty (without repo) dependency resolver fetching module dependencies.
|
static JkDependencyResolver |
of(JkRepo repo)
Creates a JkDependencyResolver using the specified JkRepo.
|
static JkDependencyResolver |
of(JkRepoSet repos)
Creates a JkDependencyResolver using the specified JkRepoSet.
|
JkResolveResult |
resolve(JkCoordinateDependency coordinateDependency)
Resolves the specified JkCoordinateDependency by calling the resolve method with it,
using the default resolution parameters of this dependency resolver.
|
JkResolveResult |
resolve(JkCoordinateDependency coordinateDependency,
JkResolutionParameters params)
Resolves the specified coordinate dependency using the given resolution parameters.
|
JkResolveResult |
resolve(JkDependencySet dependencies)
Resolves the specified dependencies and returns the resolve result with default params.
|
JkResolveResult |
resolve(JkDependencySet dependencies,
JkResolutionParameters params)
Resolves the specified dependencies with specified resolution params.
|
JkResolveResult |
resolve(JkQualifiedDependencySet qualifiedDependencies,
JkResolutionParameters params)
Resolves the specified qualified dependencies.
|
JkResolveResult |
resolve(java.lang.String coordinate)
Resolves the specified dependency by converting it
to JkCoordinateDependency and calling the resolve method with it.
|
java.util.List<java.nio.file.Path> |
resolveFiles(JkDependencySet dependencies)
Resolves the specified dependencies and returns a sequence of resolved files.
|
java.util.List<java.nio.file.Path> |
resolveFiles(JkDependencySet dependencies,
JkResolutionParameters params)
Resolves the specified qualified dependencies and returns a sequence of resolved files.
|
java.util.List<java.nio.file.Path> |
resolveFiles(JkQualifiedDependencySet qualifiedDependencies,
JkResolutionParameters params)
Resolves the specified qualified dependencies and returns a sequence of resolved files.
|
java.util.List<java.nio.file.Path> |
resolveFiles(java.lang.String coordinate)
Resolves the specified coordinate and returns a sequence of resolved files.
|
java.util.List<java.lang.String> |
search(java.lang.String groupCriteria,
java.lang.String moduleNameCriteria,
java.lang.String versionCriteria)
Searches for dependencies based on the specified criteria.
|
java.util.List<java.lang.String> |
searchGroups()
Returns an alphabetical sorted list of groupId present in these repositories
|
java.util.List<java.lang.String> |
searchModuleIds(java.lang.String groupId)
Returns an alphabetical sorted list of module ids present in these repositories for the specified groupId.
|
java.util.List<java.lang.String> |
searchVersions(JkModuleId jkModuleId)
Returns an alphabetical sorted list of version present in these repositories for the specified moduleId.
|
java.util.List<java.lang.String> |
searchVersions(java.lang.String moduleId)
Returns an alphabetical sorted list of version present in these repositories for the specified moduleId.
|
JkDependencyResolver |
setDisplaySpinner(boolean displaySpinner)
Sets whether to display a spinner during the resolution process.
|
JkDependencyResolver |
setFileSystemCacheDir(java.nio.file.Path cacheDir)
Sets the file system cache directory for this dependency resolver.
|
JkDependencyResolver |
setModuleHolder(JkCoordinate versionedModule)
The underlying dependency manager can cache the resolution on file system
for faster result.
|
JkDependencyResolver |
setRepos(JkRepoSet repos)
Sets the repositories for the dependency resolver.
|
JkDependencyResolver |
setUseFileSystemCache(boolean useFileSystemCache)
Sets whether to use a file system cache for this dependency resolver.
|
JkDependencyResolver |
setUseInMemoryCache(boolean useInMemoryCache)
Sets whether to use an in-memory cache for dependency resolution.
|
java.lang.String |
toString() |
public final JkResolutionParameters parameters
public static JkDependencyResolver of()
public static JkDependencyResolver of(JkRepoSet repos)
public static JkDependencyResolver of(JkRepo repo)
public JkRepoSet getRepos()
public JkDependencyResolver setRepos(JkRepoSet repos)
public JkDependencyResolver addRepos(JkRepoSet repos)
public JkDependencyResolver addRepos(JkRepo... repos)
public JkDependencyResolver setUseInMemoryCache(boolean useInMemoryCache)
public JkDependencyResolver setUseFileSystemCache(boolean useFileSystemCache)
public JkDependencyResolver setFileSystemCacheDir(java.nio.file.Path cacheDir)
public JkDependencyResolver setDisplaySpinner(boolean displaySpinner)
public boolean isUseInMemoryCache()
public boolean isUseFileSystemCache()
public JkDependencyResolver cleanCache()
public JkResolutionParameters getDefaultParams()
public JkDependencyResolver setModuleHolder(JkCoordinate versionedModule)
public JkResolveResult resolve(JkCoordinateDependency coordinateDependency)
public JkResolveResult resolve(java.lang.String coordinate)
public JkResolveResult resolve(JkCoordinateDependency coordinateDependency, JkResolutionParameters params)
public JkResolveResult resolve(JkDependencySet dependencies)
public JkResolveResult resolve(JkDependencySet dependencies, JkResolutionParameters params)
public JkResolveResult resolve(JkQualifiedDependencySet qualifiedDependencies, JkResolutionParameters params)
qualifiedDependencies
- the dependencies to resolve.public java.util.List<java.nio.file.Path> resolveFiles(JkQualifiedDependencySet qualifiedDependencies, JkResolutionParameters params)
This methods can leverage of direct resolution caching, while resolve
methods can not.
public java.util.List<java.nio.file.Path> resolveFiles(JkDependencySet dependencies, JkResolutionParameters params)
This methods can leverage of direct resolution caching, while resolve
methods can not.
public java.util.List<java.nio.file.Path> resolveFiles(JkDependencySet dependencies)
public java.util.List<java.nio.file.Path> resolveFiles(java.lang.String coordinate)
public java.util.List<java.lang.String> searchGroups()
public java.util.List<java.lang.String> search(java.lang.String groupCriteria, java.lang.String moduleNameCriteria, java.lang.String versionCriteria)
public java.util.List<java.lang.String> searchModuleIds(java.lang.String groupId)
public java.util.List<java.lang.String> searchVersions(JkModuleId jkModuleId)
public java.util.List<java.lang.String> searchVersions(java.lang.String moduleId)
public java.lang.String toString()
toString
in class java.lang.Object