public class JavaApplicationClassLoader extends java.lang.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 |
---|---|
java.lang.Class<?> |
getClassforName(java.lang.String className)
Returns the
Class for the given class name similar
to Class.forName(String) . |
<S> java.lang.Iterable<S> |
loadServices(java.lang.Class<?> contextClass,
java.lang.Class<S> service)
Loads all configured services similar to
ServiceLoader.load(Class) . |
public java.lang.Class<?> getClassforName(java.lang.String className) throws java.lang.ClassNotFoundException
Class
for the given class name similar
to Class.forName(String)
.getClassforName
in interface IClassLoader
className
- The name of the class.Class
instance.java.lang.ClassNotFoundException
- Occurred Exception if Class
is not available.public <S> java.lang.Iterable<S> loadServices(java.lang.Class<?> contextClass, java.lang.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.