本文整理了Java中javax.ws.rs.core.UriBuilder.uri()
方法的一些代码示例,展示了UriBuilder.uri()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UriBuilder.uri()
方法的具体详情如下:
包路径:javax.ws.rs.core.UriBuilder
类名称:UriBuilder
方法名:uri
[英]Parses the uriTemplate string and copies the parsed components of the supplied URI to the UriBuilder replacing any existing values for those components.
[中]解析uriTemplate字符串,并将所提供URI的已解析组件复制到UriBuilder,替换这些组件的任何现有值。
代码示例来源:origin: jersey/jersey
@Override
public Builder link(javax.ws.rs.core.Link link) {
uriBuilder.uri(link.getUri());
params.clear();
params.putAll(link.getParams());
return this;
}
代码示例来源:origin: jersey/jersey
@Override
public Builder link(javax.ws.rs.core.Link link) {
uriBuilder.uri(link.getUri());
params.clear();
params.putAll(link.getParams());
return this;
}
代码示例来源:origin: com.github.robozonky/robozonky-common
static URI addQueryParams(final URI info, final Map<String, Object[]> params) {
final UriBuilder builder = UriBuilder.fromUri(info);
builder.uri(info);
params.forEach(builder::queryParam);
return builder.build();
}
代码示例来源:origin: javax/javaee-web-api
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: org.jboss.spec.javax.ws.rs/jboss-jaxrs-api_2.0_spec
/**
* Create a new instance initialized from an existing URI.
*
* @param uriTemplate a URI template that will be used to initialize the UriBuilder, may
* contain URI parameters.
* @return a new UriBuilder.
* @throws IllegalArgumentException if {@code uriTemplate} is not a valid URI template or
* is {@code null}.
*/
public static UriBuilder fromUri(String uriTemplate) {
return newInstance().uri(uriTemplate);
}
代码示例来源:origin: javax/javaee-web-api
/**
* Create a new instance initialized from an existing URI.
*
* @param uriTemplate a URI template that will be used to initialize the UriBuilder, may
* contain URI parameters.
* @return a new UriBuilder.
* @throws IllegalArgumentException if {@code uriTemplate} is not a valid URI template or
* is {@code null}.
*/
public static UriBuilder fromUri(String uriTemplate) {
return newInstance().uri(uriTemplate);
}
代码示例来源:origin: alex-shpak/rx-jersey
private static URI merge(String value, UriInfo uriInfo) {
URI target = URI.create(value);
if (target.getHost() == null) {
target = UriBuilder.fromUri(uriInfo.getBaseUri()).uri(target).build();
}
return target;
}
代码示例来源:origin: org.jboss.resteasy/jaxrs-api
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Create a new instance initialized from an existing URI.
*
* @param uriTemplate a URI template that will be used to initialize the UriBuilder, may
* contain URI parameters.
* @return a new UriBuilder.
* @throws IllegalArgumentException if {@code uriTemplate} is not a valid URI template or
* is {@code null}.
*/
public static UriBuilder fromUri(String uriTemplate) {
return newInstance().uri(uriTemplate);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: org.jboss.spec.javax.ws.rs/jboss-jaxrs-api_2.0_spec
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: org.jboss.resteasy/jaxrs-api
/**
* Create a new instance initialized from an existing URI.
*
* @param uriTemplate a URI template that will be used to initialize the UriBuilder, may
* contain URI parameters.
* @return a new UriBuilder.
* @throws IllegalArgumentException if {@code uriTemplate} is not a valid URI template or
* is {@code null}.
*/
public static UriBuilder fromUri(String uriTemplate) {
return newInstance().uri(uriTemplate);
}
代码示例来源:origin: org.jboss.spec.javax.ws.rs/jboss-jaxrs-api_2.1_spec
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Create a new instance initialized from an existing URI.
*
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder.
* @throws IllegalArgumentException if uri is {@code null}.
*/
public static UriBuilder fromUri(URI uri) {
return newInstance().uri(uri);
}
代码示例来源:origin: org.jboss.spec.javax.ws.rs/jboss-jaxrs-api_2.1_spec
/**
* Create a new instance initialized from an existing URI.
*
* @param uriTemplate a URI template that will be used to initialize the UriBuilder, may
* contain URI parameters.
* @return a new UriBuilder.
* @throws IllegalArgumentException if {@code uriTemplate} is not a valid URI template or
* is {@code null}.
*/
public static UriBuilder fromUri(String uriTemplate) {
return newInstance().uri(uriTemplate);
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
/**
* Create a new instance initialized from an existing URI.
* @param uri a URI that will be used to initialize the UriBuilder.
* @return a new UriBuilder
* @throws IllegalArgumentException if uri is null
*/
public static UriBuilder fromUri(URI uri) throws IllegalArgumentException {
UriBuilder b = newInstance();
b.uri(uri);
return b;
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
@Override
public Builder link(javax.ws.rs.core.Link link) {
uriBuilder.uri(link.getUri());
params.clear();
params.putAll(link.getParams());
return this;
}
代码示例来源:origin: org.glassfish.jersey.core/jersey-common
@Override
public Builder link(javax.ws.rs.core.Link link) {
uriBuilder.uri(link.getUri());
params.clear();
params.putAll(link.getParams());
return this;
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
@Override
public Builder link(javax.ws.rs.core.Link link) {
uriBuilder.uri(link.getUri());
params.clear();
params.putAll(link.getParams());
return this;
}
内容来源于网络,如有侵权,请联系作者删除!