Class GuiceInteractionControllerInstantiator

java.lang.Object
io.github.kaktushose.jdac.guice.internal.GuiceInteractionControllerInstantiator
All Implemented Interfaces:
io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator

@Internal public class GuiceInteractionControllerInstantiator extends Object implements io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator

    io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator.Context
  • Constructor Summary

    Constructors
    Constructor
    Description
    GuiceInteractionControllerInstantiator(io.github.kaktushose.jdac.message.i18n.I18n i18n, com.google.inject.Injector injector)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator
    forRuntime(String id, net.dv8tion.jda.api.JDA jda)
    Creates a new child injector with its own InteractionControllerInstantiatorModule for each runtime.
    <T> T
    instance(Class<T> clazz, io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator.Context context)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GuiceInteractionControllerInstantiator

      public GuiceInteractionControllerInstantiator(io.github.kaktushose.jdac.message.i18n.I18n i18n, com.google.inject.Injector injector)
  • Method Details

    • instance

      public <T> T instance(Class<T> clazz, io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator.Context context)
      Specified by:
      instance in interface io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator
    • forRuntime

      public io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator forRuntime(String id, net.dv8tion.jda.api.JDA jda)
      Creates a new child injector with its own InteractionControllerInstantiatorModule for each runtime. This has the effect, that each class annotated with Interaction will be treated as a runtime scoped singleton.
      Specified by:
      forRuntime in interface io.github.kaktushose.jdac.dispatching.instance.InteractionControllerInstantiator