Interface Resolver
-
public interface Resolver
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Resolver.ClassLoaderDescriptor
Abstract a classloader adding the metadata about the resolution done to create it.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Resolver.ClassLoaderDescriptor
mapDescriptorToClassLoader(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).Collection<File>
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 Detail
-
mapDescriptorToClassLoader
Resolver.ClassLoaderDescriptor mapDescriptorToClassLoader(InputStream descriptor)
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
default Resolver.ClassLoaderDescriptor mapDescriptorToClassLoader(List<String> gavs)
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
Collection<File> resolveFromDescriptor(InputStream descriptor)
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
default Collection<File> resolveFromDescriptor(List<String> gavs)
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.
-
-