Class FWFunctionalityFactory
java.lang.Object
net.simplace.pipe.functionality.FWFunctionalityFactory
Creates functionality instances (
FWAbstractFunctionality) by class name.- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FWAbstractFunctionalitygetFunctionality(String aClass, Map<String, Object> aParameterMap) Creates a functionality without function model, initialised with the given parameters.static FWAbstractFunctionalitygetFunctionality(FWFunctionalityModel aFunctionModel) Creates the functionality of the class given in the model, initialised with the model.
-
Constructor Details
-
FWFunctionalityFactory
public FWFunctionalityFactory()
-
-
Method Details
-
getFunctionality
public static FWAbstractFunctionality getFunctionality(String aClass, Map<String, Object> aParameterMap) throws InstantiationException, ClassNotFoundExceptionCreates a functionality without function model, initialised with the given parameters.- Parameters:
aClass- fully qualified class name of the functionalityaParameterMap- initial parameters- Returns:
- the functionality, or
nullif the constructor is not accessible (error is logged) - Throws:
InstantiationException- if the class cannot be instantiatedClassNotFoundException- if the class is not found
-
getFunctionality
public static FWAbstractFunctionality getFunctionality(FWFunctionalityModel aFunctionModel) throws InstantiationException, ClassNotFoundException Creates the functionality of the class given in the model, initialised with the model.- Parameters:
aFunctionModel- the function model- Returns:
- the functionality, or
nullif the model isnullor the class cannot be instantiated (error is logged) - Throws:
InstantiationException- declared, not thrown (all exceptions are caught)ClassNotFoundException- declared, not thrown (all exceptions are caught)
-