public class SimpleClassLoadingStrategy extends java.lang.Object implements ClassLoadingStrategy
ClassLoadingStrategy
approach and
the usage of a plain ClassLoader
, for loading Java classes.
REMARK: It does not support loading actor-oriented classes!
Constructor and Description |
---|
SimpleClassLoadingStrategy()
Construct a strategy that uses the default class loader,
i.e. the one with which this own class was loaded.
|
SimpleClassLoadingStrategy(java.lang.ClassLoader classLoader)
Construct a strategy that uses the given class loader.
|
Modifier and Type | Method and Description |
---|---|
CompositeEntity |
loadActorOrientedClass(java.lang.String className,
VersionSpecification versionSpec)
Load an actor-oriented class, which is typically a .moml file.
|
java.lang.Class |
loadJavaClass(java.lang.String className,
VersionSpecification versionSpec)
Load a Java class.
|
public SimpleClassLoadingStrategy()
public SimpleClassLoadingStrategy(java.lang.ClassLoader classLoader)
classLoader
- The class loaderpublic java.lang.Class loadJavaClass(java.lang.String className, VersionSpecification versionSpec) throws java.lang.ClassNotFoundException
loadJavaClass
in interface ClassLoadingStrategy
className
- The namee of the class.versionSpec
- The versionjava.lang.ClassNotFoundException
- If the class is not found.public CompositeEntity loadActorOrientedClass(java.lang.String className, VersionSpecification versionSpec) throws java.lang.ClassNotFoundException
loadActorOrientedClass
in interface ClassLoadingStrategy
className
- The namee of the class.versionSpec
- The versionjava.lang.ClassNotFoundException
- Always thrown in this base class.