play.libs.Scala.None()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(287)

本文整理了Java中play.libs.Scala.None()方法的一些代码示例,展示了Scala.None()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scala.None()方法的具体详情如下:
包路径:play.libs.Scala
类名称:Scala
方法名:None

Scala.None介绍

暂无

代码示例

代码示例来源:origin: com.typesafe.play/play-test_2.10

/**
 * A test Netty web server.
 *
 * @param port HTTP port to bind on.
 * @param application The Application to load in this server.
 */
public TestServer(int port, Application application) {
  super(port, application.getWrappedApplication(), play.libs.Scala.<Object>None(), play.libs.Scala.<ServerProvider>None());
}

代码示例来源:origin: com.typesafe.play/play-test_2.11

/**
 * A test web server.
 *
 * @param port HTTP port to bind on.
 * @param application The Application to load in this server.
 */
public TestServer(int port, Application application) {
  super(createServerConfig(Optional.of(port), Optional.empty()), application.asScala(),
      play.libs.Scala.None());
}

代码示例来源:origin: com.typesafe.play/play-test_2.12

/**
 * A test web server.
 *
 * @param port HTTP port to bind on.
 * @param application The Application to load in this server.
 */
public TestServer(int port, Application application) {
  super(createServerConfig(Optional.of(port), Optional.empty()), application.asScala(),
      play.libs.Scala.None());
}

代码示例来源:origin: com.typesafe.play/play-test_2.12

/**
 * A test web server with HTTPS support
 *
 * @param port HTTP port to bind on
 * @param application The Application to load in this server
 * @param sslPort HTTPS port to bind on
 */
public TestServer(int port, Application application, int sslPort) {
  super(createServerConfig(Optional.of(port), Optional.of(sslPort)), application.asScala(),
      play.libs.Scala.None());
}

代码示例来源:origin: com.typesafe.play/play-test_2.11

/**
 * A test web server with HTTPS support
 *
 * @param port HTTP port to bind on
 * @param application The Application to load in this server
 * @param sslPort HTTPS port to bind on
 */
public TestServer(int port, Application application, int sslPort) {
  super(createServerConfig(Optional.of(port), Optional.of(sslPort)), application.asScala(),
      play.libs.Scala.None());
}

代码示例来源:origin: com.typesafe.play/play-test_2.10

/**
 * A test Netty web server with HTTPS support
 * @param port HTTP port to bind on
 * @param application The Application to load in this server
 * @param sslPort HTTPS port to bind on
 */
public TestServer(int port, Application application, int sslPort) {
  super(port, application.getWrappedApplication(), Option.<Object>apply(sslPort), play.libs.Scala.<ServerProvider>None());
}

代码示例来源:origin: com.typesafe.play/play_2.11

/**
   * Convert this result to a Scala result.
   *
   * @return the Scala result.
   */
  public play.api.mvc.Result asScala() {
    return new play.api.mvc.Result(
      header.asScala(),
      body.asScala(),
      session == null ? Scala.None() : Scala.Option(play.api.mvc.Session.fromJavaSession(session)),
      flash == null ? Scala.None() : Scala.Option(play.api.mvc.Flash.fromJavaFlash(flash)),
      JavaHelpers$.MODULE$.cookiesToScalaCookies(cookies)
    );
  }
}

代码示例来源:origin: com.typesafe.play/play

/**
   * Convert this result to a Scala result.
   *
   * @return the Scala result.
   */
  public play.api.mvc.Result asScala() {
    return new play.api.mvc.Result(
      header.asScala(),
      body.asScala(),
      session == null ? Scala.None() : Scala.Option(play.api.mvc.Session.fromJavaSession(session)),
      flash == null ? Scala.None() : Scala.Option(play.api.mvc.Flash.fromJavaFlash(flash)),
      JavaHelpers$.MODULE$.cookiesToScalaCookies(cookies)
    );
  }
}

代码示例来源:origin: com.typesafe.play/play_2.12

/**
   * Convert this result to a Scala result.
   *
   * @return the Scala result.
   */
  public play.api.mvc.Result asScala() {
    return new play.api.mvc.Result(
      header.asScala(),
      body.asScala(),
      session == null ? Scala.None() : Scala.Option(play.api.mvc.Session.fromJavaSession(session)),
      flash == null ? Scala.None() : Scala.Option(play.api.mvc.Flash.fromJavaFlash(flash)),
      JavaHelpers$.MODULE$.cookiesToScalaCookies(cookies)
    );
  }
}

代码示例来源:origin: com.typesafe.play/play_2.10

/**
 * Create an application loading context.
 *
 * Locates and loads the necessary configuration files for the application.
 *
 * @param environment The application environment.
 * @param initialSettings The initial settings. These settings are merged with the settings from the loaded
 *                        configuration files, and together form the initialConfiguration provided by the context.  It
 *                        is intended for use in dev mode, to allow the build system to pass additional configuration
 *                        into the application.
 */
public static Context create(Environment environment, Map<String, Object> initialSettings) {
  play.api.ApplicationLoader.Context scalaContext = play.api.ApplicationLoader$.MODULE$.createContext(
    environment.underlying(),
    Scala.asScala(initialSettings),
    Scala.<SourceMapper>None(),
    new DefaultWebCommands());
  return new Context(scalaContext);
}

代码示例来源:origin: com.typesafe.play/play_2.11

/**
 * Create an application loading context.
 *
 * Locates and loads the necessary configuration files for the application.
 *
 * @param environment The application environment.
 * @param initialSettings The initial settings. These settings are merged with the settings from the loaded
 *                        configuration files, and together form the initialConfiguration provided by the context.  It
 *                        is intended for use in dev mode, to allow the build system to pass additional configuration
 *                        into the application.
 * @return the created context
 */
static Context create(Environment environment, Map<String, Object> initialSettings) {
  play.api.ApplicationLoader.Context scalaContext = play.api.ApplicationLoader.Context$.MODULE$.create(
      environment.asScala(),
      Scala.asScala(initialSettings),
      new DefaultApplicationLifecycle(),
      Scala.<play.api.ApplicationLoader.DevContext>None());
  return new Context(scalaContext);
}

代码示例来源:origin: com.typesafe.play/play

/**
 * Create an application loading context.
 *
 * Locates and loads the necessary configuration files for the application.
 *
 * @param environment The application environment.
 * @param initialSettings The initial settings. These settings are merged with the settings from the loaded
 *                        configuration files, and together form the initialConfiguration provided by the context.  It
 *                        is intended for use in dev mode, to allow the build system to pass additional configuration
 *                        into the application.
 * @return the created context
 */
static Context create(Environment environment, Map<String, Object> initialSettings) {
  play.api.ApplicationLoader.Context scalaContext = play.api.ApplicationLoader.Context$.MODULE$.create(
      environment.asScala(),
      Scala.asScala(initialSettings),
      new DefaultApplicationLifecycle(),
      Scala.<play.api.ApplicationLoader.DevContext>None());
  return new Context(scalaContext);
}

代码示例来源:origin: com.typesafe.play/play_2.12

/**
 * Create an application loading context.
 *
 * Locates and loads the necessary configuration files for the application.
 *
 * @param environment The application environment.
 * @param initialSettings The initial settings. These settings are merged with the settings from the loaded
 *                        configuration files, and together form the initialConfiguration provided by the context.  It
 *                        is intended for use in dev mode, to allow the build system to pass additional configuration
 *                        into the application.
 * @return the created context
 */
static Context create(Environment environment, Map<String, Object> initialSettings) {
  play.api.ApplicationLoader.Context scalaContext = play.api.ApplicationLoader.Context$.MODULE$.create(
      environment.asScala(),
      Scala.asScala(initialSettings),
      new DefaultApplicationLifecycle(),
      Scala.<play.api.ApplicationLoader.DevContext>None());
  return new Context(scalaContext);
}

相关文章