Class JarState

  • All Implemented Interfaces:
    Serializable

    public final class JarState
    extends Object
    implements Serializable
    Grabs a jar and its dependencies from maven, and makes it easy to access the collection in a classloader. Serializes the full state of the jar, so it can catch changes in a SNAPSHOT version.
    See Also:
    Serialized Form
    • Method Detail

      • getClassLoader

        public ClassLoader getClassLoader()
        Returns a classloader containing the only jars in this JarState. Look-up of classes in the org.slf4j package are not taken from the JarState, but instead redirected to the class loader of this class to enable passthrough logging.
        The lifetime of the underlying cacheloader is controlled by SpotlessCache.
      • getClassLoader

        public ClassLoader getClassLoader​(Serializable key)
        Returns a classloader containing the only jars in this JarState. Look-up of classes in the org.slf4j package are not taken from the JarState, but instead redirected to the class loader of this class to enable passthrough logging.
        The lifetime of the underlying cacheloader is controlled by SpotlessCache.
      • getMavenCoordinates

        public Set<String> getMavenCoordinates()
        Returns unmodifiable view on sorted Maven coordinates