Package play.inject.guice
Class GuiceApplicationLoader
java.lang.Object
play.inject.guice.GuiceApplicationLoader
- All Implemented Interfaces:
ApplicationLoader
An ApplicationLoader that uses Guice to bootstrap the application.
Subclasses can override the builder and overrides methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface play.ApplicationLoader
ApplicationLoader.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final GuiceApplicationBuilderThe initial builder to start construction from. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder(ApplicationLoader.Context context) Construct a builder to use for loading the given context.final Applicationload(ApplicationLoader.Context context) Load an application given the context.protected play.api.inject.guice.GuiceableModule[]overrides(ApplicationLoader.Context context) Identify some bindings that should be used as overrides when loading an application using this context.
-
Field Details
-
initialBuilder
The initial builder to start construction from.
-
-
Constructor Details
-
GuiceApplicationLoader
public GuiceApplicationLoader() -
GuiceApplicationLoader
-
-
Method Details
-
load
Description copied from interface:ApplicationLoaderLoad an application given the context.- Specified by:
loadin interfaceApplicationLoader- Parameters:
context- the context the apps should be loaded into- Returns:
- the loaded application
-
builder
Construct a builder to use for loading the given context.- Parameters:
context- the context the returned builder will load- Returns:
- the builder
-
overrides
Identify some bindings that should be used as overrides when loading an application using this context. The default implementation of this method provides bindings that most applications should include.- Parameters:
context- the context that should be searched for overrides- Returns:
- the bindings that should be used to override
-