Interface PluginModule

All Superinterfaces:
com.google.inject.Module
All Known Subinterfaces:
ProcessorModule
All Known Implementing Classes:
AbstractProcessorModule, PluginComponentModule, ProviderModule, ServiceModule

public interface PluginModule extends com.google.inject.Module
This class should be extended by any module that is used by the WinterBoot plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    default List<Class<? extends PluginModule>>
    List of modules that this module should be loaded before them
    default void
    configure(com.google.inject.Binder binder)
     
    default List<Class<? extends PluginModule>>
    List of modules that this module depends on
    default boolean
    Called when the plugin is disabled
    NOTE: Plugin injections are available at this point
    default boolean
    Called when the plugin is enabled
    NOTE: Plugin injections are available at this point
    default boolean
    Called when the plugin is loaded
    NOTE: Plugin injections are not available at this point
  • Method Details

    • depends

      default List<Class<? extends PluginModule>> depends(WinterPlugin plugin)
      List of modules that this module depends on
      Parameters:
      plugin - the plugin instance which is loaded
      Returns:
      list of modules that this module depends on, and will be loaded before this module
    • before

      default List<Class<? extends PluginModule>> before(WinterPlugin plugin)
      List of modules that this module should be loaded before them
      Parameters:
      plugin - the plugin instance which is loaded
      Returns:
      list of modules that this module should be loaded before them
    • onLoad

      default boolean onLoad(WinterPlugin plugin) throws Exception
      Called when the plugin is loaded
      NOTE: Plugin injections are not available at this point
      Parameters:
      plugin - the plugin instance which is loaded
      Throws:
      Exception
    • onEnable

      default boolean onEnable(WinterPlugin plugin) throws Exception
      Called when the plugin is enabled
      NOTE: Plugin injections are available at this point
      Parameters:
      plugin - the plugin instance which is enabled
      Throws:
      Exception
    • onDisable

      default boolean onDisable(WinterPlugin plugin) throws Exception
      Called when the plugin is disabled
      NOTE: Plugin injections are available at this point
      Parameters:
      plugin - the plugin instance which is disabled
      Throws:
      Exception
    • configure

      default void configure(com.google.inject.Binder binder)
      Specified by:
      configure in interface com.google.inject.Module