DynamicAccess

class DynamicAccess(val classLoader: ClassLoader)

Utility class for creating instances from a FQCN, see [1] for the original source. It uses reflection to turn fully-qualified class names into a Class[_] from which instances can be created. All methods in this class are unsafe and might throw exceptions that should be handled by users if this class.

[1] https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/ReflectiveDynamicAccess.scala

class Object
trait Matchable
class Any

Value members

Concrete methods

def createInstanceFor[T : ClassTag](clazz: Class[_], args: Seq[(Class[_], AnyRef)]): T

Tries to create an instance of the provided class, passing the provided arguments to the constructor.

Tries to create an instance of the provided class, passing the provided arguments to the constructor.

def createInstanceFor[T : ClassTag](fqcn: String, args: Seq[(Class[_], AnyRef)]): T

Tries to create an instance of the provided fully-qualified class name, passing the provided arguments to the constructor.

Tries to create an instance of the provided fully-qualified class name, passing the provided arguments to the constructor.

def getClassFor[T : ClassTag](fqcn: String): Class[_ <: T]

Tries to load a class that matches the provided fully-qualified class name.

Tries to load a class that matches the provided fully-qualified class name.

Concrete fields

val classLoader: ClassLoader