Interface RegisterFactoryEvent

All Superinterfaces:
Event, LifecycleEvent

public interface RegisterFactoryEvent extends LifecycleEvent
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    register(Class<T> factoryClass, T factory)
    Registers an object meant to be used to churn object references

    Methods inherited from interface org.spongepowered.api.event.Event

    cause, context, source

    Methods inherited from interface org.spongepowered.api.event.lifecycle.LifecycleEvent

    game
  • Method Details

    • register

      <T> T register(Class<T> factoryClass, T factory) throws DuplicateRegistrationException
      Registers an object meant to be used to churn object references
      Type Parameters:
      T - The type
      Parameters:
      factoryClass - The factory type
      factory - The factory instance
      Returns:
      The provided factory
      Throws:
      DuplicateRegistrationException - If the type is already registered