Package org.apache.pekko.actor
Class DynamicAccess
java.lang.Object
org.apache.pekko.actor.DynamicAccess
- Direct Known Subclasses:
ReflectiveDynamicAccess
The DynamicAccess implementation is the class which is used for
loading all configurable parts of an actor system (the
pekko.actor.ReflectiveDynamicAccess is the default implementation).
This is an internal facility and users are not expected to encounter it unless they are extending Pekko in ways which go beyond simple Extensions.
Not for user extension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanclassIsOnClasspath(String fqcn) abstract ClassLoaderThis is the class loader to be used in those special cases where the other factory method are not applicable (e.g.abstract <T> scala.util.Try<T>createInstanceFor(Class<?> clazz, scala.collection.immutable.Seq<scala.Tuple2<Class<?>, Object>> args, scala.reflect.ClassTag<T> evidence$1) Convenience method which given aClass[_]object and a constructor description will create a new instance of that class.abstract <T> scala.util.Try<T>createInstanceFor(String fqcn, scala.collection.immutable.Seq<scala.Tuple2<Class<?>, Object>> args, scala.reflect.ClassTag<T> evidence$3) Obtain an object conforming to the type T, which is expected to be instantiated from a class designated by the fully-qualified class name given, where the constructor is selected and invoked according to theargsargument.abstract <T> scala.util.Try<Class<? extends T>>getClassFor(String fqcn, scala.reflect.ClassTag<T> evidence$2) Obtain aClass[_]object loaded with the right class loader (i.e.abstract <T> scala.util.Try<T>getObjectFor(String fqcn, scala.reflect.ClassTag<T> evidence$4) Obtain the Scala “object” instance for the given fully-qualified class name, if there is one.
-
Constructor Details
-
DynamicAccess
public DynamicAccess()
-
-
Method Details
-
classIsOnClasspath
-
classLoader
This is the class loader to be used in those special cases where the other factory method are not applicable (e.g. when constructing a ClassLoaderBinaryInputStream). -
createInstanceFor
public abstract <T> scala.util.Try<T> createInstanceFor(Class<?> clazz, scala.collection.immutable.Seq<scala.Tuple2<Class<?>, Object>> args, scala.reflect.ClassTag<T> evidence$1) Convenience method which given aClass[_]object and a constructor description will create a new instance of that class.val obj = DynamicAccess.createInstanceFor(clazz, Seq(classOf[Config] -> config, classOf[String] -> name)) -
createInstanceFor
public abstract <T> scala.util.Try<T> createInstanceFor(String fqcn, scala.collection.immutable.Seq<scala.Tuple2<Class<?>, Object>> args, scala.reflect.ClassTag<T> evidence$3) Obtain an object conforming to the type T, which is expected to be instantiated from a class designated by the fully-qualified class name given, where the constructor is selected and invoked according to theargsargument. The exact usage of args depends on which type is requested, see the relevant requesting code for details. -
getClassFor
public abstract <T> scala.util.Try<Class<? extends T>> getClassFor(String fqcn, scala.reflect.ClassTag<T> evidence$2) Obtain aClass[_]object loaded with the right class loader (i.e. the one returned byclassLoader). -
getObjectFor
public abstract <T> scala.util.Try<T> getObjectFor(String fqcn, scala.reflect.ClassTag<T> evidence$4) Obtain the Scala “object” instance for the given fully-qualified class name, if there is one.
-