Returns an instance of a given type obtained via reflection.
Returns an instance of a given type obtained via reflection. If the specified class name refers to a companion
object, i.e. it ends with $
, the object is returned. Otherwise, if the specified class has a default
constructor, a new instance is created that way.
the type of the class being loaded
the fully qualified name of the class
an instance of A
obtained via reflection and wrapped in a Some
, or None
if it couldn't be obtained.
Utilities for loading objects and instantiate classes using reflection.