/** * Instantiates a new form that wraps the specified class. * * @deprecated inject a {@link FormFactory} instead, since 2.5.0 */ @Deprecated public static <T> Form<T> form(Class<T> clazz) { return new Form<>( clazz, play.api.Play.current().injector().instanceOf(MessagesApi.class), play.api.Play.current().injector().instanceOf(Formatters.class)); }
/** * Instantiates a new form that wraps the specified class. * * @deprecated inject a {@link FormFactory} instead, since 2.5.0 */ @Deprecated public static <T> Form<T> form(String name, Class<T> clazz, Class<?> group) { return new Form<>( name, clazz, group, play.api.Play.current().injector().instanceOf(MessagesApi.class), play.api.Play.current().injector().instanceOf(Formatters.class)); }
/** Stops an application. */ public static void stop(FakeApplication fakeApplication) { play.api.Play.stop(); }
/** Starts a new application. */ public static void start(FakeApplication fakeApplication) { play.api.Play.start(fakeApplication.getWrappedApplication()); }
/** * Instantiates a dynamic form. * * @deprecated inject a {@link FormFactory} instead, since 2.5.0 */ @Deprecated public static DynamicForm form() { return new DynamicForm( play.api.Play.current().injector().instanceOf(MessagesApi.class), play.api.Play.current().injector().instanceOf(Formatters.class)); }
/** Returns `true` if the current application is `DEV` mode. */ private static boolean isDev() { return play.api.Play.isDev(play.api.Play.current()); }
/** Stops an application. */ public static void stop(Application application) { play.api.Play.stop(application.getWrappedApplication()); }