Interface Resolver
public interface Resolver
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Abstract a classloader adding the metadata about the resolution done to create it. -
Method Summary
Modifier and TypeMethodDescriptionmapDescriptorToClassLoader
(InputStream descriptor) Creates a classloader from the passed descriptor (dependencies.txt).default Resolver.ClassLoaderDescriptor
mapDescriptorToClassLoader
(List<String> gavs) Alias to load dependencies from a plain list of gav (groupId:artifactId:version).resolveFromDescriptor
(InputStream descriptor) Resolves the dependencies from the descriptor passed as an InputStream.default Collection<File>
resolveFromDescriptor
(List<String> gavs) Alias to load dependencies from a plain list of gav (groupId:artifactId:version).
-
Method Details
-
mapDescriptorToClassLoader
Creates a classloader from the passed descriptor (dependencies.txt). WARNING: note it is very important to close the descriptor once no more used otherwise you can leak memory.- Parameters:
descriptor
- the dependencies.txt InputStream.- Returns:
- the classloader initialized with the resolved dependencies.
-
mapDescriptorToClassLoader
Alias to load dependencies from a plain list of gav (groupId:artifactId:version).- Parameters:
gavs
- the dependencies to use to resolve dependencies.- Returns:
- the collection of file representing the available dependencies.
-
resolveFromDescriptor
Resolves the dependencies from the descriptor passed as an InputStream. IMPORTANT: this is to use when you are sure the file is resolvable if you don't have a fallback. In that last case, prefer themapDescriptorToClassLoader
.- Parameters:
descriptor
- the dependencies.txt to use to resolve dependencies.- Returns:
- the collection of file representing the available dependencies.
-
resolveFromDescriptor
Alias to load dependencies from a plain list of gav (groupId:artifactId:version).- Parameters:
gavs
- the dependencies to use to resolve dependencies.- Returns:
- the collection of file representing the available dependencies.
-