ScalaClassLoader

A wrapper around java.lang.ClassLoader to lower the annoyance of java reflection.

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def asContext[T](action: => T): T

Executing an action with this classloader as context classloader

Executing an action with this classloader as context classloader

An InputStream representing the given class name, or null if not found.

An InputStream representing the given class name, or null if not found.

def classBytes(className: String): Array[Byte]

The actual bytes for a class file, or an empty array if it can't be found.

The actual bytes for a class file, or an empty array if it can't be found.

def create(path: String): AnyRef

Create an instance of a class with this classloader

Create an instance of a class with this classloader

def create[T <: AnyRef : ClassTag](path: String, errorFn: String => Unit)(args: AnyRef*): T

Create an instance with ctor args, or invoke errorFn before throwing.

Create an instance with ctor args, or invoke errorFn before throwing.

def run(objectName: String, arguments: Seq[String]): Unit

Run the main method of a class to be loaded by this classloader

Run the main method of a class to be loaded by this classloader

def tryToInitializeClass[T <: AnyRef](path: String): Option[Class[T]]

Load, link and initialize a class with this classloader

Load, link and initialize a class with this classloader

def tryToLoadClass[T <: AnyRef](path: String): Option[Class[T]]

Load and link a class with this classloader

Load and link a class with this classloader

Inherited methods

@CallerSensitive
final
Inherited from
ClassLoader
Inherited from
ClassLoader
@throws(java.io.IOException)
Inherited from
ClassLoader
@throws(java.lang.ClassNotFoundException)
def loadClass(x$0: String): Class[_ <: <FromJavaObject>]
Inherited from
ClassLoader
Inherited from
ClassLoader