Package org.eclipse.aether.resolution
Class VersionResult
- java.lang.Object
-
- org.eclipse.aether.resolution.VersionResult
-
public final class VersionResult extends java.lang.Object
The result of a version resolution request.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Exception>
exceptions
private ArtifactRepository
repository
private VersionRequest
request
private java.lang.String
version
-
Constructor Summary
Constructors Constructor Description VersionResult(VersionRequest request)
Creates a new result for the specified request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VersionResult
addException(java.lang.Exception exception)
Records the specified exception while resolving the version.java.util.List<java.lang.Exception>
getExceptions()
Gets the exceptions that occurred while resolving the version.ArtifactRepository
getRepository()
Gets the repository from which the version was eventually resolved.VersionRequest
getRequest()
Gets the resolution request that was made.java.lang.String
getVersion()
Gets the resolved version.VersionResult
setRepository(ArtifactRepository repository)
Sets the repository from which the version was resolved.VersionResult
setVersion(java.lang.String version)
Sets the resolved version.java.lang.String
toString()
-
-
-
Field Detail
-
request
private final VersionRequest request
-
exceptions
private java.util.List<java.lang.Exception> exceptions
-
version
private java.lang.String version
-
repository
private ArtifactRepository repository
-
-
Constructor Detail
-
VersionResult
public VersionResult(VersionRequest request)
Creates a new result for the specified request.- Parameters:
request
- The resolution request, must not benull
.
-
-
Method Detail
-
getRequest
public VersionRequest getRequest()
Gets the resolution request that was made.- Returns:
- The resolution request, never
null
.
-
getExceptions
public java.util.List<java.lang.Exception> getExceptions()
Gets the exceptions that occurred while resolving the version.- Returns:
- The exceptions that occurred, never
null
.
-
addException
public VersionResult addException(java.lang.Exception exception)
Records the specified exception while resolving the version.- Parameters:
exception
- The exception to record, may benull
.- Returns:
- This result for chaining, never
null
.
-
getVersion
public java.lang.String getVersion()
Gets the resolved version.- Returns:
- The resolved version or
null
if the resolution failed.
-
setVersion
public VersionResult setVersion(java.lang.String version)
Sets the resolved version.- Parameters:
version
- The resolved version, may benull
.- Returns:
- This result for chaining, never
null
.
-
getRepository
public ArtifactRepository getRepository()
Gets the repository from which the version was eventually resolved.- Returns:
- The repository from which the version was resolved or
null
if unknown.
-
setRepository
public VersionResult setRepository(ArtifactRepository repository)
Sets the repository from which the version was resolved.- Parameters:
repository
- The repository from which the version was resolved, may benull
.- Returns:
- This result for chaining, never
null
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-