Class DefaultChecksumAlgorithmFactorySelector
java.lang.Object
org.eclipse.aether.internal.impl.checksum.DefaultChecksumAlgorithmFactorySelector
- All Implemented Interfaces:
ChecksumAlgorithmFactorySelector
@Singleton
@Named
public class DefaultChecksumAlgorithmFactorySelector
extends Object
implements ChecksumAlgorithmFactorySelector
Default implementation.
- Since:
- 1.8.0
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionReturns immutable collection of all supported algorithms.booleanisChecksumExtension(String extension) Returnstrueif passed in extension matches any known checksum extension.Returns factory for given algorithm name, or throws if algorithm not supported.selectList(Collection<String> algorithmNames) Returns a list of factories in same order as algorithm names are ordered, or throws if any of the algorithm name is not supported.
-
Constructor Details
-
DefaultChecksumAlgorithmFactorySelector
@Inject public DefaultChecksumAlgorithmFactorySelector(Map<String, ChecksumAlgorithmFactory> factories)
-
-
Method Details
-
select
Description copied from interface:ChecksumAlgorithmFactorySelectorReturns factory for given algorithm name, or throws if algorithm not supported.- Specified by:
selectin interfaceChecksumAlgorithmFactorySelector
-
selectList
Description copied from interface:ChecksumAlgorithmFactorySelectorReturns a list of factories in same order as algorithm names are ordered, or throws if any of the algorithm name is not supported. The returned list has equal count of elements as passed in collection of names, and if names contains duplicated elements, the returned list of algorithms will have duplicates as well.- Specified by:
selectListin interfaceChecksumAlgorithmFactorySelector
-
getChecksumAlgorithmFactories
Description copied from interface:ChecksumAlgorithmFactorySelectorReturns immutable collection of all supported algorithms. This set represents ALL the algorithms supported by Resolver, and is NOT in any relation to given repository layout used checksums, returned by methodRepositoryLayout.getChecksumAlgorithmFactories()(in fact, is super set of it).- Specified by:
getChecksumAlgorithmFactoriesin interfaceChecksumAlgorithmFactorySelector
-
isChecksumExtension
Description copied from interface:ChecksumAlgorithmFactorySelectorReturnstrueif passed in extension matches any known checksum extension. The extension string may start or contain dot ("."), but does not have to. In former case "ends with" is checked (i.e. "jar.sha1" -> true; ".sha1" -> true) while in latter equality (i.e. "sha1" -> true).- Specified by:
isChecksumExtensionin interfaceChecksumAlgorithmFactorySelector
-