public final class InstantiationFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
<C> C |
create(java.lang.Class<C> c,
java.lang.String className,
java.lang.Class<?>[] parameterTypes,
java.lang.Object... parameters)
This is a helper method .
|
<C> C |
createAndInitialize(java.lang.Class<C> c,
java.lang.String className,
Configuration configuration)
This is a helper method trying to find, create and initialize the given class, using its public constructor which accepts a single
Configuration. |
static <C> C |
createWithConfiguration(java.lang.Class<C> implementedInterface,
java.lang.String className,
Configuration configuration)
This is a helper method trying to find, create and initialize the given class, using its
public constructor which accepts a single
Configuration. |
static InstantiationFactory |
getInstance(Configuration configuration)
Get an instance of the controller factory for the given configuration.
|
public static InstantiationFactory getInstance(Configuration configuration)
configuration - The configuration to usepublic <C> C createAndInitialize(java.lang.Class<C> c,
java.lang.String className,
Configuration configuration)
Configuration.C - The type of the returned class.c - This class defines the expected result of the method call.className - The name of the class to be created.configuration - The configuration which will be used to initialize the class in question.public static <C> C createWithConfiguration(java.lang.Class<C> implementedInterface,
java.lang.String className,
Configuration configuration)
throws ConfigurationException
Configuration.C - The type of the returned class.implementedInterface - This class defines the expected result of the method call.className - The name of the class to be created.configuration - The configuration which will be used to initialize the class in question.ConfigurationException - on configuration errors during instantiationpublic <C> C create(java.lang.Class<C> c,
java.lang.String className,
java.lang.Class<?>[] parameterTypes,
java.lang.Object... parameters)
C - The type of the returned class.c - This class defines the expected result of the method call.className - The name of the class to be created.parameterTypes - types of the parametersparameters - parameter for the constructorCopyright 2021 Kieker Project, http://kieker-monitoring.net