Package de.osshangar.plugin
Class Plugin<T,C extends Class<T>>
java.lang.Object
de.osshangar.plugin.Plugin<T,C>
- Type Parameters:
T- type of the object createdC- the interface class that the plugin has to implement
This class loads the plugins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionload(JarInputStream jarInputStream) This loads the plugin from the provided JarInputStream.load(JarInputStream jarInputStream, Arguments constructorArguments)
-
Constructor Details
-
Plugin
public Plugin()
-
-
Method Details
-
load
public T load(JarInputStream jarInputStream) throws FileFormatException, IOException, ClassNotFoundException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException This loads the plugin from the provided JarInputStream.- Parameters:
jarInputStream- The input stream to a jar package to load the plugin from- Returns:
- The instantiated plugin instance
- Throws:
FileFormatExceptionIOExceptionClassNotFoundExceptionInvocationTargetExceptionNoSuchMethodExceptionInstantiationExceptionIllegalAccessException
-
load
public T load(JarInputStream jarInputStream, Arguments constructorArguments) throws FileFormatException, IOException, ClassNotFoundException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException
-