public class InstantiationHelper extends Object
BreakHandler
class.
The class given needs to have a public one-argument constructor.Constructor and Description |
---|
InstantiationHelper() |
Modifier and Type | Method and Description |
---|---|
static <R,P> BreakHandler<R> |
constructSingleParamInstance(Class<? extends BreakHandler> handlerClass,
P constructorParam)
Creates new instances of given
BreakHandler class. |
public static <R,P> BreakHandler<R> constructSingleParamInstance(Class<? extends BreakHandler> handlerClass, P constructorParam) throws BreakHandlerException
BreakHandler
class. The class given needs to have a publicly accessible(!)
one-argument constructor.R
- the return type of real-method for which a break handler is createdP
- the type of constructor parameter which is used to create new instance of break handlerhandlerClass
- the class representing break handler which should be createdconstructorParam
- constructor parameter of break handler which should be createdBreakHandler
constructed using single parameter constructor with given parameter
valueBreakHandlerException
- in case instantiation failedCopyright © 2017. All rights reserved.