Package play.inject.guice
Class GuiceApplicationLoader
- Object
-
- play.inject.guice.GuiceApplicationLoader
-
- All Implemented Interfaces:
ApplicationLoader
public class GuiceApplicationLoader extends Object implements ApplicationLoader
An ApplicationLoader that uses Guice to bootstrap the application.Subclasses can override the
builder
andoverrides
methods.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface play.ApplicationLoader
ApplicationLoader.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected GuiceApplicationBuilder
initialBuilder
The initial builder to start construction from.
-
Constructor Summary
Constructors Constructor Description GuiceApplicationLoader()
GuiceApplicationLoader(GuiceApplicationBuilder initialBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GuiceApplicationBuilder
builder(ApplicationLoader.Context context)
Construct a builder to use for loading the given context.Application
load(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 Detail
-
initialBuilder
protected final GuiceApplicationBuilder initialBuilder
The initial builder to start construction from.
-
-
Constructor Detail
-
GuiceApplicationLoader
public GuiceApplicationLoader()
-
GuiceApplicationLoader
public GuiceApplicationLoader(GuiceApplicationBuilder initialBuilder)
-
-
Method Detail
-
load
public final Application load(ApplicationLoader.Context context)
Description copied from interface:ApplicationLoader
Load an application given the context.- Specified by:
load
in interfaceApplicationLoader
- Parameters:
context
- the context the apps should be loaded into- Returns:
- the loaded application
-
builder
public GuiceApplicationBuilder builder(ApplicationLoader.Context context)
Construct a builder to use for loading the given context.- Parameters:
context
- the context the returned builder will load- Returns:
- the builder
-
overrides
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. 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
-
-