class TestVersionFilterContext extends java.lang.Object implements VersionFilter.VersionFilterContext
| Modifier and Type | Field and Description |
|---|---|
private Dependency |
dependency |
private VersionRangeResult |
result |
private RepositorySystemSession |
session |
private java.util.List<Version> |
versions |
| Constructor and Description |
|---|
TestVersionFilterContext(RepositorySystemSession session,
VersionRangeResult result) |
| Modifier and Type | Method and Description |
|---|---|
int |
getCount()
Gets the total number of available versions.
|
Dependency |
getDependency()
Gets the dependency whose version range is being filtered.
|
java.util.List<RemoteRepository> |
getRepositories()
Gets the remote repositories from which the versions were resolved.
|
ArtifactRepository |
getRepository(Version version)
Gets the repository from which the specified version was resolved.
|
RepositorySystemSession |
getSession()
Gets the repository system session during which the version filtering happens.
|
VersionConstraint |
getVersionConstraint()
Gets the version constraint that was parsed from the dependency's version string.
|
java.util.Iterator<Version> |
iterator()
Gets an iterator over the available versions of the dependency.
|
private final RepositorySystemSession session
private final Dependency dependency
private final VersionRangeResult result
private final java.util.List<Version> versions
TestVersionFilterContext(RepositorySystemSession session, VersionRangeResult result)
public RepositorySystemSession getSession()
VersionFilter.VersionFilterContextgetSession in interface VersionFilter.VersionFilterContextnull.public Dependency getDependency()
VersionFilter.VersionFilterContextgetDependency in interface VersionFilter.VersionFilterContextnull.public int getCount()
VersionFilter.VersionFilterContextgetCount in interface VersionFilter.VersionFilterContextpublic java.util.Iterator<Version> iterator()
VersionFilter.VersionFilterContextIterator.remove() to exclude a version from further consideration in the dependency graph.iterator in interface java.lang.Iterable<Version>iterator in interface VersionFilter.VersionFilterContextnull.public VersionConstraint getVersionConstraint()
VersionFilter.VersionFilterContextgetVersionConstraint in interface VersionFilter.VersionFilterContextnull.public ArtifactRepository getRepository(Version version)
VersionFilter.VersionFilterContextgetRepository in interface VersionFilter.VersionFilterContextversion - The version whose source repository should be retrieved, must not be null.null if unknown.public java.util.List<RemoteRepository> getRepositories()
VersionFilter.VersionFilterContextgetRepositories in interface VersionFilter.VersionFilterContextnull.