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.

class ClassLoader
class Object
trait Matchable
class Any

Value members

Constructors

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

Concrete methods

override def getResource(name: String): URL
Definition Classes
ClassLoader
override def getResources(name: String): Enumeration[URL]
Definition Classes
ClassLoader
final override def loadClass(className: String, resolve: Boolean): Class[_]
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.

Returns:

a string representation of the object.

Definition Classes
Any

Inherited methods

Inherited from:
ClassLoader
final def getParent(): ClassLoader
Inherited from:
ClassLoader
def getResourceAsStream(x$0: String): InputStream
Inherited from:
ClassLoader
def loadClass(x$0: String): Class[_ <: <FromJavaObject>]
Inherited from:
ClassLoader
def setClassAssertionStatus(x$0: String, x$1: Boolean): Unit
Inherited from:
ClassLoader
def setDefaultAssertionStatus(x$0: Boolean): Unit
Inherited from:
ClassLoader
def setPackageAssertionStatus(x$0: String, x$1: Boolean): Unit
Inherited from:
ClassLoader