Package play.inject
Class DelegateInjector
java.lang.Object
play.inject.DelegateInjector
- All Implemented Interfaces:
Injector
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionplay.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.
-
Field Details
-
injector
public final play.api.inject.Injector injector
-
-
Constructor Details
-
DelegateInjector
@Inject public DelegateInjector(play.api.inject.Injector injector)
-
-
Method Details
-
instanceOf
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
-
asScala
public play.api.inject.Injector asScala()Description copied from interface:InjectorGet as an instance of the Scala injector.
-