public interface Application
Modifier and Type | Method and Description |
---|---|
default java.lang.ClassLoader |
classloader()
Get the application classloader.
|
Configuration |
configuration()
Get the application configuration.
|
default java.io.File |
getFile(java.lang.String relativePath)
Get a file relative to the application root path.
|
play.api.Application |
getWrappedApplication()
Get the underlying Scala application.
|
Injector |
injector()
Get the injector for this application.
|
default boolean |
isDev()
Check whether the application is in
Mode.DEV mode. |
default boolean |
isProd()
Check whether the application is in
Mode.PROD mode. |
default boolean |
isTest()
Check whether the application is in
Mode.TEST mode. |
default java.io.File |
path()
Get the application path.
|
default <T> T |
plugin(java.lang.Class<T> pluginClass)
Get the
Plugin instance for the given class. |
default java.net.URL |
resource(java.lang.String relativePath)
Get a resource from the classpath.
|
default java.io.InputStream |
resourceAsStream(java.lang.String relativePath)
Get a resource stream from the classpath.
|
play.api.Application getWrappedApplication()
Configuration configuration()
Injector injector()
default java.io.File path()
default java.lang.ClassLoader classloader()
default java.io.File getFile(java.lang.String relativePath)
relativePath
- relative path of the file to fetchdefault java.net.URL resource(java.lang.String relativePath)
relativePath
- relative path of the resource to fetchdefault java.io.InputStream resourceAsStream(java.lang.String relativePath)
relativePath
- relative path of the resource to fetchdefault <T> T plugin(java.lang.Class<T> pluginClass)
Plugin
instance for the given class.pluginClass
- the Class of the plugindefault boolean isDev()
Mode.DEV
mode.default boolean isProd()
Mode.PROD
mode.default boolean isTest()
Mode.TEST
mode.