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 Type
    Method
    Description
    play.api.Application
    Get the application as a Scala application.
    default ClassLoader
    Get the application classloader.
    com.typesafe.config.Config
    Get the application configuration.
    Get the application environment.
    play.api.Application
    Deprecated.
    Use asScala() instead.
    Get the runtime injector for this application.
    default boolean
    Check whether the application is in Mode.DEV mode.
    default boolean
    Check whether the application is in Mode.PROD mode.
    default boolean
    Check whether the application is in Mode.TEST mode.
    default File
    Get the application path.
  • Method Details

    • getWrappedApplication

      @Deprecated play.api.Application getWrappedApplication()
      Deprecated.
      Use asScala() 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

      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 in Mode.DEV mode.
      Returns:
      true if the application is in DEV mode
    • isProd

      default boolean isProd()
      Check whether the application is in Mode.PROD mode.
      Returns:
      true if the application is in PROD mode
    • isTest

      default boolean isTest()
      Check whether the application is in Mode.TEST mode.
      Returns:
      true if the application is in TEST mode