本文整理了Java中play.libs.Scala.varargs()
方法的一些代码示例,展示了Scala.varargs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scala.varargs()
方法的具体详情如下:
包路径:play.libs.Scala
类名称:Scala
方法名:varargs
[英]Converts a Java varargs to Scala Seq.
[中]将Java varargs转换为Scala Seq。
代码示例来源:origin: com.typesafe.play/play_2.12
/**
* Generates a JavaScript reverse router.
*
* @param name the router's name
* @param ajaxMethod which asynchronous call method the user's browser will use (e.g. "jQuery.ajax")
* @param host the host to use for the reverse route
* @param routes the reverse routes for this router
* @return the router
*/
public static JavaScript create(String name, String ajaxMethod, String host, JavaScriptReverseRoute... routes) {
return play.api.routing.JavaScriptReverseRouter.apply(
name, Scala.Option(ajaxMethod), host, Scala.varargs(routes)
);
}
代码示例来源:origin: com.typesafe.play/play_2.11
/**
* Generates a JavaScript reverse router.
*
* @param name the router's name
* @param ajaxMethod which asynchronous call method the user's browser will use (e.g. "jQuery.ajax")
* @param host the host to use for the reverse route
* @param routes the reverse routes for this router
* @return the router
*/
public static JavaScript create(String name, String ajaxMethod, String host, JavaScriptReverseRoute... routes) {
return play.api.routing.JavaScriptReverseRouter.apply(
name, Scala.Option(ajaxMethod), host, Scala.varargs(routes)
);
}
代码示例来源:origin: com.typesafe.play/play
/**
* Generates a JavaScript reverse router.
*
* @param name the router's name
* @param ajaxMethod which asynchronous call method the user's browser will use (e.g. "jQuery.ajax")
* @param host the host to use for the reverse route
* @param routes the reverse routes for this router
* @return the router
*/
public static JavaScript create(String name, String ajaxMethod, String host, JavaScriptReverseRoute... routes) {
return play.api.routing.JavaScriptReverseRouter.apply(
name, Scala.Option(ajaxMethod), host, Scala.varargs(routes)
);
}
代码示例来源:origin: com.typesafe.play/play_2.12
/**
* Removes keys from the map, returning a new instance of the map.
*
* @param keys The keys to remove.
* @return A new instance of the map with the entries removed.
*/
public TypedMap remove(TypedKey<?>... keys) {
play.api.libs.typedmap.TypedMap newUnderlying = underlying;
for (TypedKey<?> k : keys) {
newUnderlying = newUnderlying.$minus(Scala.varargs(k.asScala()));
}
return new TypedMap(newUnderlying);
}
代码示例来源:origin: com.typesafe.play/play
/**
* Removes keys from the map, returning a new instance of the map.
*
* @param keys The keys to remove.
* @return A new instance of the map with the entries removed.
*/
public TypedMap remove(TypedKey<?>... keys) {
play.api.libs.typedmap.TypedMap newUnderlying = underlying;
for (TypedKey<?> k : keys) {
newUnderlying = newUnderlying.$minus(Scala.varargs(k.asScala()));
}
return new TypedMap(newUnderlying);
}
代码示例来源:origin: com.typesafe.play/play_2.11
/**
* Removes keys from the map, returning a new instance of the map.
*
* @param keys The keys to remove.
* @return A new instance of the map with the entries removed.
*/
public TypedMap remove(TypedKey<?>... keys) {
play.api.libs.typedmap.TypedMap newUnderlying = underlying;
for (TypedKey<?> k : keys) {
newUnderlying = newUnderlying.$minus(Scala.varargs(k.asScala()));
}
return new TypedMap(newUnderlying);
}
代码示例来源:origin: com.typesafe.play/play-guice_2.12
/**
* Override bindings using guiceable modules.
*
* @param modules the set of Guice modules whose bindings override some previously configured ones
* @return a copy of this builder re-configured with the provided bindings
*/
public final Self overrides(GuiceableModule... modules) {
return newBuilder(delegate.overrides(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-java_2.10
/**
* Override bindings using guiceable modules.
*/
public final Self overrides(GuiceableModule... modules) {
return newBuilder(delegate.overrides(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-guice_2.12
/**
* Add bindings from guiceable modules.
*
* @param modules the set of modules to bind
* @return a copy of this builder configured with those modules
*/
public final Self bindings(GuiceableModule... modules) {
return newBuilder(delegate.bindings(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-guice_2.11
/**
* Override bindings using guiceable modules.
*
* @param modules the set of Guice modules whose bindings override some previously configured ones
* @return a copy of this builder re-configured with the provided bindings
*/
public final Self overrides(GuiceableModule... modules) {
return newBuilder(delegate.overrides(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-java_2.10
/**
* Add bindings from guiceable modules.
*/
public final Self bindings(GuiceableModule... modules) {
return newBuilder(delegate.bindings(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-java_2.10
/**
* Override the module loader with the given guiceable modules.
*/
public GuiceApplicationBuilder load(GuiceableModule... modules) {
return newBuilder(delegate.load(Scala.varargs(modules)));
}
代码示例来源:origin: play/play-test
/**
* Add addtional session to this request.
*/
@SuppressWarnings(value = "unchecked")
public FakeRequest withFlash(String name, String value) {
fake = fake.withFlash(Scala.varargs(Scala.Tuple(name, value)));
return this;
}
代码示例来源:origin: play/play-test
/**
* Add addtional session to this request.
*/
@SuppressWarnings(value = "unchecked")
public FakeRequest withSession(String name, String value) {
fake = fake.withSession(Scala.varargs(Scala.Tuple(name, value)));
return this;
}
代码示例来源:origin: com.typesafe.play/play-guice_2.11
/**
* Add bindings from guiceable modules.
*
* @param modules the set of modules to bind
* @return a copy of this builder configured with those modules
*/
public final Self bindings(GuiceableModule... modules) {
return newBuilder(delegate.bindings(Scala.varargs(modules)));
}
代码示例来源:origin: play/play-test
/**
* Add additional headers to this request.
*/
@SuppressWarnings(value = "unchecked")
public FakeRequest withHeader(String name, String value) {
fake = fake.withHeaders(Scala.varargs(Scala.Tuple(name, value)));
return this;
}
代码示例来源:origin: com.typesafe.play/play-guice_2.11
/**
* Override the module loader with the given guiceable modules.
*
* @param modules the set of overriding modules
* @return an application builder that incorporates the overrides
*/
public GuiceApplicationBuilder load(GuiceableModule... modules) {
return newBuilder(delegate.load(Scala.varargs(modules)));
}
代码示例来源:origin: com.typesafe.play/play-guice_2.12
/**
* Override the module loader with the given guiceable modules.
*
* @param modules the set of overriding modules
* @return an application builder that incorporates the overrides
*/
public GuiceApplicationBuilder load(GuiceableModule... modules) {
return newBuilder(delegate.load(Scala.varargs(modules)));
}
代码示例来源:origin: play/play-test
/**
* Add cookies to this request
*/
@SuppressWarnings(value = "unchecked")
public FakeRequest withCookies(Http.Cookie... cookies) {
List <play.api.mvc.Cookie> scalacookies = new ArrayList<play.api.mvc.Cookie>();
for (Http.Cookie c : cookies) {
scalacookies.add(new play.api.mvc.Cookie(c.name(), c.value(), Scala.<Object>Option(c.maxAge()), c.path(), Scala.Option(c.domain()), c.secure(), c.httpOnly()) );
}
fake = fake.withCookies(Scala.varargs(scalacookies.toArray()));
return this;
}
内容来源于网络,如有侵权,请联系作者删除!