Package org.galliumpowered.plugin
Class PluginContainer
java.lang.Object
org.galliumpowered.plugin.PluginContainer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.inject.InjectorGets the Guice injector used on the containerGets the instance of the plugingetMeta()Gets the plugin's metadataClass<?>Gets the class of the pluginvoidsetInjector(com.google.inject.Injector injector) Sets the plugin container'sInjectorvoidsetInstance(Object instance) Sets the plugin's instancevoidSets the lifecycle state of the container and triggers the lifecycle event in the plugin's main classvoidsetMeta(PluginMeta meta) Sets the plugin's metadata
-
Constructor Details
-
PluginContainer
public PluginContainer()
-
-
Method Details
-
getInstance
Gets the instance of the plugin- Returns:
- Plugin instance
-
getMeta
Gets the plugin's metadata- Returns:
- The plugin's
PluginMeta
-
getInjector
public com.google.inject.Injector getInjector()Gets the Guice injector used on the container- Returns:
- Guice injector
-
setInstance
Sets the plugin's instance- Parameters:
instance- The instance
-
setMeta
Sets the plugin's metadata- Parameters:
meta- ThePluginMeta
-
getPluginClass
Gets the class of the plugin- Returns:
- Plugin's main class as a
Class
-
setInjector
public void setInjector(com.google.inject.Injector injector) Sets the plugin container'sInjector- Parameters:
injector- The injector
-
setLifecycleState
Sets the lifecycle state of the container and triggers the lifecycle event in the plugin's main class- Parameters:
state- The state in which the container will enter
-