public final class DefaultVersionFilterContext extends Object implements VersionFilter.VersionFilterContext
VersionFilter.VersionFilterContext
.
Internal helper class for collector implementations.Constructor and Description |
---|
DefaultVersionFilterContext(RepositorySystemSession session) |
Modifier and Type | Method and Description |
---|---|
List<Version> |
get() |
int |
getCount()
Gets the total number of available versions.
|
Dependency |
getDependency()
Gets the dependency whose version range is being filtered.
|
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.
|
Iterator<Version> |
iterator()
Gets an iterator over the available versions of the dependency.
|
void |
set(Dependency dependency,
VersionRangeResult result) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public DefaultVersionFilterContext(RepositorySystemSession session)
public void set(Dependency dependency, VersionRangeResult result)
public RepositorySystemSession getSession()
VersionFilter.VersionFilterContext
getSession
in interface VersionFilter.VersionFilterContext
null
.public Dependency getDependency()
VersionFilter.VersionFilterContext
getDependency
in interface VersionFilter.VersionFilterContext
null
.public VersionConstraint getVersionConstraint()
VersionFilter.VersionFilterContext
getVersionConstraint
in interface VersionFilter.VersionFilterContext
null
.public int getCount()
VersionFilter.VersionFilterContext
getCount
in interface VersionFilter.VersionFilterContext
public ArtifactRepository getRepository(Version version)
VersionFilter.VersionFilterContext
getRepository
in interface VersionFilter.VersionFilterContext
version
- The version whose source repository should be retrieved, must not be null
.null
if unknown.public List<RemoteRepository> getRepositories()
VersionFilter.VersionFilterContext
getRepositories
in interface VersionFilter.VersionFilterContext
null
.public Iterator<Version> iterator()
VersionFilter.VersionFilterContext
Iterator.remove()
to exclude a version from further consideration in the dependency graph.iterator
in interface Iterable<Version>
iterator
in interface VersionFilter.VersionFilterContext
null
.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.