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
Modifier and TypeMethodDescriptionplay.api.ApplicationasScala()Get the application as a Scala application.default ClassLoaderGet the application classloader.com.typesafe.config.Configconfig()Get the application configuration.Get the application environment.play.api.ApplicationDeprecated.injector()Get the runtime injector for this application.default booleanisDev()Check whether the application is inMode.DEVmode.default booleanisProd()Check whether the application is inMode.PRODmode.default booleanisTest()Check whether the application is inMode.TESTmode.default Filepath()Get the application path.
-
Method Details
-
getWrappedApplication
Deprecated.UseasScala()instead.Get the underlying Scala application.- Returns:
- the application
- See Also:
-
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
Get the application path.- Returns:
- the application path
-
classloader
Get the application classloader.- Returns:
- the application classloader
-
isDev
default boolean isDev()Check whether the application is inMode.DEVmode.- Returns:
- true if the application is in DEV mode
-
isProd
default boolean isProd()Check whether the application is inMode.PRODmode.- Returns:
- true if the application is in PROD mode
-
isTest
default boolean isTest()Check whether the application is inMode.TESTmode.- Returns:
- true if the application is in TEST mode
-
asScala()instead.