Class PluginInstantiator
java.lang.Object
de.julianweinelt.datacat.dbx.api.plugins.PluginInstantiator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) DbxPlugininstantiate(PluginDescriptor descriptor, ClassLoader loader) Instantiates a plugin based on its descriptor and class loader.
-
Constructor Details
-
PluginInstantiator
public PluginInstantiator()
-
-
Method Details
-
instantiate
DbxPlugin instantiate(PluginDescriptor descriptor, ClassLoader loader) throws PluginInvalidException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException Instantiates a plugin based on its descriptor and class loader.- Parameters:
descriptor- APluginDescriptorobject containing technical plugin metadata.loader- The class loader to use for loading the plugin's main class.- Returns:
- An instance of the plugin as a
DbxPlugin. - Throws:
PluginInvalidException- If the main class is not a child class ofDbxPluginClassNotFoundException- If the main class specified in the descriptor cannot be found.NoSuchMethodException- If the main class does not have a default constructor.InvocationTargetException- If the constructor of the main class throws an exception.InstantiationException- If the main class cannot be instantiated.IllegalAccessException- If the constructor of the main class is not accessible.
-