Class TestVersionFilterContext
java.lang.Object
org.eclipse.aether.internal.test.util.TestVersionFilterContext
- All Implemented Interfaces:
Iterable<Version>,VersionFilter.VersionFilterContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Dependencyprivate final VersionRangeResultprivate final RepositorySystemSession -
Constructor Summary
ConstructorsConstructorDescriptionTestVersionFilterContext(RepositorySystemSession session, VersionRangeResult result) -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
session
-
dependency
-
result
-
versions
-
-
Constructor Details
-
TestVersionFilterContext
TestVersionFilterContext(RepositorySystemSession session, VersionRangeResult result)
-
-
Method Details
-
getSession
Description copied from interface:VersionFilter.VersionFilterContextGets the repository system session during which the version filtering happens.- Specified by:
getSessionin interfaceVersionFilter.VersionFilterContext- Returns:
- The repository system session, never
null.
-
getDependency
Description copied from interface:VersionFilter.VersionFilterContextGets the dependency whose version range is being filtered.- Specified by:
getDependencyin interfaceVersionFilter.VersionFilterContext- Returns:
- The dependency, never
null.
-
getCount
public int getCount()Description copied from interface:VersionFilter.VersionFilterContextGets the total number of available versions. This count reflects any removals made during version filtering.- Specified by:
getCountin interfaceVersionFilter.VersionFilterContext- Returns:
- The total number of available versions.
-
iterator
Description copied from interface:VersionFilter.VersionFilterContextGets 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:
iteratorin interfaceIterable<Version>- Specified by:
iteratorin interfaceVersionFilter.VersionFilterContext- Returns:
- The iterator of available versions, never
null.
-
getVersionConstraint
Description copied from interface:VersionFilter.VersionFilterContextGets the version constraint that was parsed from the dependency's version string.- Specified by:
getVersionConstraintin interfaceVersionFilter.VersionFilterContext- Returns:
- The parsed version constraint, never
null.
-
getRepository
Description copied from interface:VersionFilter.VersionFilterContextGets the repository from which the specified version was resolved.- Specified by:
getRepositoryin 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
nullif unknown.
-
getRepositories
Description copied from interface:VersionFilter.VersionFilterContextGets the remote repositories from which the versions were resolved.- Specified by:
getRepositoriesin interfaceVersionFilter.VersionFilterContext- Returns:
- The (read-only) list of repositories, never
null.
-