|
Play Framework/Scala example source code file (Play.java)
The Play.java Play Framework example source code
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package play;
import play.core.j.JavaModeConverter$;
/**
* High-level API to access Play global features.
*/
public class Play {
/**
* Returns the currently running application.
*/
public static Application application() {
return new Application(play.api.Play.current());
}
/**
* Returns the current mode of the application.
*/
public static Mode mode() {
return JavaModeConverter$.MODULE$.asJavaMode(play.api.Play.mode(play.api.Play.current()));
}
/**
* Returns `true` if the current application is `DEV` mode.
*/
public static boolean isDev() {
return play.api.Play.isDev(play.api.Play.current());
}
/**
* Returns `true` if the current application is `PROD` mode.
*/
public static boolean isProd() {
return play.api.Play.isProd(play.api.Play.current());
}
/**
* Returns `true` if the current application is `TEST` mode.
*/
public static boolean isTest() {
return play.api.Play.isTest(play.api.Play.current());
}
public static String langCookieName() {
return play.api.Play.langCookieName(play.api.Play.current());
}
}
Other Play Framework source code examplesHere is a short list of links related to this Play Framework Play.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.