Package org.eclipse.aether.resolution
Class VersionRangeResult
java.lang.Object
org.eclipse.aether.resolution.VersionRangeResult
The result of a version range resolution request.
- See Also:
-
Constructor Summary
ConstructorDescriptionVersionRangeResult
(VersionRangeRequest request) Creates a new result for the specified request. -
Method Summary
Modifier and TypeMethodDescriptionaddException
(Exception exception) Records the specified exception while resolving the version range.addVersion
(Version version) Adds the specified version to the result.Gets the exceptions that occurred while resolving the version range.Gets the highest version matching the requested range.Gets the lowest version matching the requested range.getRepository
(Version version) Gets the repository from which the specified version was resolved.Gets the resolution request that was made.Gets the version constraint that was parsed from the artifact's version string.Gets the versions (in ascending order) that matched the requested range.setRepository
(Version version, ArtifactRepository repository) Records the repository from which the specified version was resolvedsetVersionConstraint
(VersionConstraint versionConstraint) Sets the version constraint that was parsed from the artifact's version string.setVersions
(List<Version> versions) Sets the versions (in ascending order) matching the requested range.toString()
-
Constructor Details
-
VersionRangeResult
Creates a new result for the specified request.- Parameters:
request
- The resolution request, must not benull
.
-
-
Method Details
-
getRequest
Gets the resolution request that was made.- Returns:
- The resolution request, never
null
.
-
getExceptions
Gets the exceptions that occurred while resolving the version range.- Returns:
- The exceptions that occurred, never
null
.
-
addException
Records the specified exception while resolving the version range.- Parameters:
exception
- The exception to record, may benull
.- Returns:
- This result for chaining, never
null
.
-
getVersions
Gets the versions (in ascending order) that matched the requested range.- Returns:
- The matching versions (if any), never
null
.
-
addVersion
Adds the specified version to the result. Note that versions must be added in ascending order.- Parameters:
version
- The version to add, must not benull
.- Returns:
- This result for chaining, never
null
.
-
setVersions
Sets the versions (in ascending order) matching the requested range.- Parameters:
versions
- The matching versions, may be empty ornull
if none.- Returns:
- This result for chaining, never
null
.
-
getLowestVersion
Gets the lowest version matching the requested range.- Returns:
- The lowest matching version or
null
if no versions matched the requested range.
-
getHighestVersion
Gets the highest version matching the requested range.- Returns:
- The highest matching version or
null
if no versions matched the requested range.
-
getRepository
Gets the repository from which the specified version was resolved.- Parameters:
version
- The version whose source repository should be retrieved, must not benull
.- Returns:
- The repository from which the version was resolved or
null
if unknown.
-
setRepository
Records the repository from which the specified version was resolved- Parameters:
version
- The version whose source repository is to be recorded, must not benull
.repository
- The repository from which the version was resolved, may benull
.- Returns:
- This result for chaining, never
null
.
-
getVersionConstraint
Gets the version constraint that was parsed from the artifact's version string.- Returns:
- The parsed version constraint or
null
.
-
setVersionConstraint
Sets the version constraint that was parsed from the artifact's version string.- Parameters:
versionConstraint
- The parsed version constraint, may benull
.- Returns:
- This result for chaining, never
null
.
-
toString
-