Package play
Interface Application
-
- All Known Implementing Classes:
DefaultApplication
public interface Application
A Play application.Application creation is handled by the framework engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description play.api.Application
asScala()
Get the application as a Scala application.default ClassLoader
classloader()
Get the application classloader.com.typesafe.config.Config
config()
Get the application configuration.Environment
environment()
Get the application environment.play.api.Application
getWrappedApplication()
Deprecated.UseasScala()
instead.Injector
injector()
Get the runtime injector for this application.default boolean
isDev()
Check whether the application is inMode.DEV
mode.default boolean
isProd()
Check whether the application is inMode.PROD
mode.default boolean
isTest()
Check whether the application is inMode.TEST
mode.default File
path()
Get the application path.
-
-
-
Method Detail
-
getWrappedApplication
@Deprecated play.api.Application getWrappedApplication()
Deprecated.UseasScala()
instead.Get the underlying Scala application.- Returns:
- the application
- See Also:
method
-
asScala
play.api.Application asScala()
Get the application as a Scala application.- Returns:
- this application as a Scala application.
- See Also:
Application
-
environment
Environment environment()
Get the application environment.- Returns:
- the environment.
-
config
com.typesafe.config.Config config()
Get the application configuration.- Returns:
- the configuration
-
injector
Injector injector()
Get the runtime injector for this application. In a runtime dependency injection based application, this can be used to obtain components as bound by the DI framework.- Returns:
- the injector
-
path
default File path()
Get the application path.- Returns:
- the application path
-
classloader
default ClassLoader classloader()
Get the application classloader.- Returns:
- the application classloader
-
isDev
default boolean isDev()
Check whether the application is inMode.DEV
mode.- Returns:
- true if the application is in DEV mode
-
isProd
default boolean isProd()
Check whether the application is inMode.PROD
mode.- Returns:
- true if the application is in PROD mode
-
isTest
default boolean isTest()
Check whether the application is inMode.TEST
mode.- Returns:
- true if the application is in TEST mode
-
-