Package play.inject

Class DelegateInjector

  • All Implemented Interfaces:
    Injector

    @Singleton
    public class DelegateInjector
    extends Object
    implements Injector
    • Field Detail

      • injector

        public final play.api.inject.Injector injector
    • Constructor Detail

      • DelegateInjector

        @Inject
        public DelegateInjector​(play.api.inject.Injector injector)
    • Method Detail

      • instanceOf

        public <T> T instanceOf​(Class<T> clazz)
        Description copied from interface: Injector
        Get an instance of the given class from the injector.
        Specified by:
        instanceOf in interface Injector
        Type Parameters:
        T - the type of the instance
        Parameters:
        clazz - The class to get the instance of
        Returns:
        The instance
      • instanceOf

        public <T> T instanceOf​(play.api.inject.BindingKey<T> key)
        Description copied from interface: Injector
        Get an instance of the given class from the injector.
        Specified by:
        instanceOf in interface Injector
        Type Parameters:
        T - the type of the instance
        Parameters:
        key - The key of the binding
        Returns:
        The instance
      • asScala

        public play.api.inject.Injector asScala()
        Description copied from interface: Injector
        Get as an instance of the Scala injector.
        Specified by:
        asScala in interface Injector
        Returns:
        an instance of the Scala injector.
        See Also:
        Injector