public class ServiceLoaderHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createClassInstance(Class<T> parent,
Class<? extends T> clazz)
Gets an instance of a class.
|
static <T> T |
createClassInstance(Class<T> parent,
String className)
Gets an instance of a class, based on its name.
|
public static <T> T createClassInstance(Class<T> parent, Class<? extends T> clazz) throws ServiceLoadingException
T - the class type.parent - the parent class.clazz - the class to instantiate.ServiceLoadingException - if an error occurs while instantiating the service implementation.public static <T> T createClassInstance(Class<T> parent, String className) throws ServiceLoadingException
T - the class type.parent - the parent class.className - the name of the class to instantiate.ServiceLoadingException - if an error occurs while instantiating the service implementation.