Package play
Interface Application
-
- All Known Implementing Classes:
DefaultApplication
public interface ApplicationA 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.ApplicationasScala()Get the application as a Scala application.default ClassLoaderclassloader()Get the application classloader.com.typesafe.config.Configconfig()Get the application configuration.Environmentenvironment()Get the application environment.play.api.ApplicationgetWrappedApplication()Deprecated.UseasScala()instead.Injectorinjector()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 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.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
-
-