public class JavaApplicationClassLoader extends Object implements IClassLoader
IClassLoader
implementation for Java Applications.
In a Java Application all Class
es are loaded by the same ClassLoader
and thus the Java API can be used directly to realize the functionality.
Constructor and Description |
---|
JavaApplicationClassLoader() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getClassforName(String className)
Returns the
Class for the given class name similar
to Class.forName(String) . |
<S> Iterable<S> |
loadServices(Class<?> contextClass,
Class<S> service)
Loads all configured services similar to
ServiceLoader.load(Class) . |
public Class<?> getClassforName(String className) throws ClassNotFoundException
Class
for the given class name similar
to Class.forName(String)
.getClassforName
in interface IClassLoader
className
- The name of the class.Class
instance.ClassNotFoundException
- Occurred Exception if Class
is not available.public <S> Iterable<S> loadServices(Class<?> contextClass, Class<S> service)
ServiceLoader.load(Class)
.loadServices
in interface IClassLoader
contextClass
- The calling Class
which ClassLoader
knows the configuration-file.service
- The requested service.Iterable
with the created service instances.