All Downloads are FREE. Search and download functionalities are using the official Maven repository.

coursier.cli.launch.SharedClassLoader.scala Maven / Gradle / Ivy

There is a newer version: 2.1.13
Show newest version
package coursier.cli.launch

import java.net.{URL, URLClassLoader}

final class SharedClassLoader(
  urls: Array[URL],
  parent: ClassLoader,
  isolationTargets: Array[String]
) extends URLClassLoader(urls, parent) {

  /**
    * Mostly deprecated.
    *
    * Applications wanting to access an isolated `ClassLoader` should inspect the hierarchy of
    * loaders, and look into each of them for this method, by reflection. Then they should
    * call it (still by reflection), and look for an agreed in advance target in it. If it is found,
    * then the corresponding `ClassLoader` is the one with isolated dependencies.
    *
    * As a substitute, users should call classOf[…].getClassLoader on a class they know is in a shared
    * classloader, to find specific classloaders.
    */
  def getIsolationTargets: Array[String] = isolationTargets

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy