Package play.inject
Class DelegateInjector
- Object
-
- play.inject.DelegateInjector
-
-
Field Summary
Fields Modifier and Type Field Description play.api.inject.Injectorinjector
-
Constructor Summary
Constructors Constructor Description DelegateInjector(play.api.inject.Injector injector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description play.api.inject.InjectorasScala()Get as an instance of the Scala injector.<T> TinstanceOf(Class<T> clazz)Get an instance of the given class from the injector.<T> TinstanceOf(play.api.inject.BindingKey<T> key)Get an instance of the given class from the injector.
-
-
-
Method Detail
-
instanceOf
public <T> T instanceOf(Class<T> clazz)
Description copied from interface:InjectorGet an instance of the given class from the injector.- Specified by:
instanceOfin interfaceInjector- 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:InjectorGet an instance of the given class from the injector.- Specified by:
instanceOfin interfaceInjector- Type Parameters:
T- the type of the instance- Parameters:
key- The key of the binding- Returns:
- The instance
-
-