Package play.inject

Class DelegateInjector

java.lang.Object
play.inject.DelegateInjector
All Implemented Interfaces:
Injector

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

    Fields
    Modifier and Type
    Field
    Description
    final play.api.inject.Injector
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DelegateInjector(play.api.inject.Injector injector)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    play.api.inject.Injector
    Get as an instance of the Scala injector.
    <T> T
    instanceOf(Class<T> clazz)
    Get an instance of the given class from the injector.
    <T> T
    instanceOf(play.api.inject.BindingKey<T> key)
    Get an instance of the given class from the injector.

    Methods inherited from class java.lang.Object

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

    • injector

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

    • DelegateInjector

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

    • 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