Class DefaultVersionFilterContext
java.lang.Object
org.eclipse.aether.internal.impl.collect.DefaultVersionFilterContext
- All Implemented Interfaces:
Iterable<Version>
,VersionFilter.VersionFilterContext
public final class DefaultVersionFilterContext
extends Object
implements VersionFilter.VersionFilterContext
Default implementation of
VersionFilter.VersionFilterContext
.
Internal helper class for collector implementations.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionget()
int
getCount()
Gets the total number of available versions.Gets the dependency whose version range is being filtered.Gets the remote repositories from which the versions were resolved.getRepository
(Version version) Gets the repository from which the specified version was resolved.Gets the repository system session during which the version filtering happens.Gets the version constraint that was parsed from the dependency's version string.iterator()
Gets an iterator over the available versions of the dependency.void
set
(Dependency dependency, VersionRangeResult result) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DefaultVersionFilterContext
-
-
Method Details
-
set
-
get
-
getSession
Description copied from interface:VersionFilter.VersionFilterContext
Gets the repository system session during which the version filtering happens.- Specified by:
getSession
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The repository system session, never
null
.
-
getDependency
Description copied from interface:VersionFilter.VersionFilterContext
Gets the dependency whose version range is being filtered.- Specified by:
getDependency
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The dependency, never
null
.
-
getVersionConstraint
Description copied from interface:VersionFilter.VersionFilterContext
Gets the version constraint that was parsed from the dependency's version string.- Specified by:
getVersionConstraint
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The parsed version constraint, never
null
.
-
getCount
Description copied from interface:VersionFilter.VersionFilterContext
Gets the total number of available versions. This count reflects any removals made during version filtering.- Specified by:
getCount
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The total number of available versions.
-
getRepository
Description copied from interface:VersionFilter.VersionFilterContext
Gets the repository from which the specified version was resolved.- Specified by:
getRepository
in interfaceVersionFilter.VersionFilterContext
- 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.
-
getRepositories
Description copied from interface:VersionFilter.VersionFilterContext
Gets the remote repositories from which the versions were resolved.- Specified by:
getRepositories
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The (read-only) list of repositories, never
null
.
-
iterator
Description copied from interface:VersionFilter.VersionFilterContext
Gets an iterator over the available versions of the dependency. The iterator returns versions in ascending order. UseIterator.remove()
to exclude a version from further consideration in the dependency graph.- Specified by:
iterator
in interfaceIterable<Version>
- Specified by:
iterator
in interfaceVersionFilter.VersionFilterContext
- Returns:
- The iterator of available versions, never
null
.
-
toString
-