Class ChainedVersionFilter
java.lang.Object
org.eclipse.aether.util.graph.version.ChainedVersionFilter
- All Implemented Interfaces:
VersionFilter
A version filter that combines multiple version filters into a chain where each filter gets invoked one after the
other, thereby accumulating their filtering effects.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.aether.collection.VersionFilter
VersionFilter.VersionFilterContext -
Method Summary
Modifier and TypeMethodDescriptionDerives a version filter for the specified collection context.booleanvoidFilters the available versions for a given dependency.inthashCode()static VersionFilternewInstance(Collection<? extends VersionFilter> filters) Chains the specified version filters.static VersionFilternewInstance(VersionFilter... filters) Chains the specified version filters.static VersionFilternewInstance(VersionFilter filter1, VersionFilter filter2) Chains the specified version filters.
-
Method Details
-
newInstance
Chains the specified version filters.- Parameters:
filter1- the first version filter, may benullfilter2- the second version filter, may benull- Returns:
- the chained version filter or
nullif both input filters arenull
-
newInstance
Chains the specified version filters.- Parameters:
filters- the version filters to chain, must not benullor containnull- Returns:
- the chained version filter or
nullif the input array is empty
-
newInstance
Chains the specified version filters.- Parameters:
filters- the version filters to chain, must not benullor containnull- Returns:
- the chained version filter or
nullif the input collection is empty
-
filterVersions
Description copied from interface:VersionFilterFilters the available versions for a given dependency. Implementations will usually callcontext.iterator()to inspect the available versions and useIterator.remove()to delete unacceptable versions. If no versions remain after all filtering has been performed, the dependency collection process will automatically fail, i.e. implementations need not handle this situation on their own.- Specified by:
filterVersionsin interfaceVersionFilter- Parameters:
context- The version filter context, must not benull.- Throws:
RepositoryException- If the filtering could not be performed.
-
deriveChildFilter
Description copied from interface:VersionFilterDerives a version filter for the specified collection context. The derived filter will be used to handle version ranges encountered in child dependencies of the current node. When calculating the child filter, implementors are strongly advised to simply return the current instance if nothing changed to help save memory.- Specified by:
deriveChildFilterin interfaceVersionFilter- Parameters:
context- The dependency collection context, must not benull.- Returns:
- The version filter for the target node or
nullif versions should not be filtered any more.
-
equals
-
hashCode
-