DualLoader

sbt.internal.inc.classpath.DualLoader
class DualLoader(parentA: ClassLoader, aOnlyClasses: String => Boolean, aOnlyResources: String => Boolean, parentB: ClassLoader, bOnlyClasses: String => Boolean, bOnlyResources: String => Boolean) extends ClassLoader

A ClassLoader with two parents parentA and parentB. The predicates direct lookups towards one parent or the other.

If aOnlyClasses returns true for a class name, class lookup delegates to parentA only. Otherwise, if bOnlyClasses returns true for a class name, class lookup delegates to parentB only. If both aOnlyClasses and bOnlyClasses are false for a given class name, both class loaders must load the same Class or a DifferentLoaders exception is thrown.

If aOnlyResources is true for a resource path, lookup delegates to parentA only. Otherwise, if bOnlyResources is true for a resource path, lookup delegates to parentB only. If neither are true for a resource path and either parentA or parentB return a valid URL, that valid URL is returned.

Attributes

Graph
Supertypes
class ClassLoader
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(parentA: ClassLoader, aOnly: String => Boolean, parentB: ClassLoader, bOnly: String => Boolean)

Concrete methods

override def getResource(name: String): URL

Attributes

Definition Classes
ClassLoader
override def getResources(name: String): Enumeration[URL]

Attributes

Definition Classes
ClassLoader
final override def loadClass(className: String, resolve: Boolean): Class[_]

Attributes

Definition Classes
ClassLoader
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def clearAssertionStatus(): Unit

Attributes

Inherited from:
ClassLoader
final def getParent(): ClassLoader

Attributes

Inherited from:
ClassLoader
def getResourceAsStream(x$0: String): InputStream

Attributes

Inherited from:
ClassLoader
def loadClass(x$0: String): Class[_ <: <FromJavaObject>]

Attributes

Inherited from:
ClassLoader
def setClassAssertionStatus(x$0: String, x$1: Boolean): Unit

Attributes

Inherited from:
ClassLoader
def setDefaultAssertionStatus(x$0: Boolean): Unit

Attributes

Inherited from:
ClassLoader
def setPackageAssertionStatus(x$0: String, x$1: Boolean): Unit

Attributes

Inherited from:
ClassLoader