本文整理了Java中org.jboss.shrinkwrap.api.asset.UrlAsset.<init>()
方法的一些代码示例,展示了UrlAsset.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UrlAsset.<init>()
方法的具体详情如下:
包路径:org.jboss.shrinkwrap.api.asset.UrlAsset
类名称:UrlAsset
方法名:<init>
[英]Create a new resource with a URL
source.
[中]使用URL
源创建新资源。
代码示例来源:origin: org.eclipse.microprofile.config/microprofile-config-tck
public static void addFile(JavaArchive archive, String originalPath) {
archive.addAsResource(new UrlAsset(Thread.currentThread().getContextClassLoader().getResource("internal/" + originalPath)),
originalPath);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
/**
* {@inheritDoc}
*
* @see org.jboss.shrinkwrap.api.container.ManifestContainer#setManifest(java.net.URL)
*/
@Override
public T setManifest(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
return setManifest(new UrlAsset(resource));
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T setResourceAdapterXML(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
return setResourceAdapterXML(new UrlAsset(resource));
}
代码示例来源:origin: shrinkwrap/shrinkwrap
@Override
public T setApplicationXML(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
return setApplicationXML(new UrlAsset(resource));
}
代码示例来源:origin: shrinkwrap/shrinkwrap
@Override
public T setWebXML(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
return setWebXML(new UrlAsset(resource));
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T setApplicationXML(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
return setApplicationXML(new UrlAsset(resource));
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T setWebXML(URL resource) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
return setWebXML(new UrlAsset(resource));
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsResource(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
File file = new File(resource.getFile());
if (file.exists()) {
return addAsResource(file, target);
}
return addAsResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsManifestResource(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
File file = new File(resource.getFile());
if (file.exists()) {
return addAsManifestResource(file, target);
}
return addAsManifestResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsModule(final URL resource, final ArchivePath targetPath) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
Validate.notNull(targetPath, "Target Path must be specified");
Asset asset = new UrlAsset(resource);
return addAsModule(asset, targetPath);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsWebResource(URL resource, String target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
return addAsWebResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-spring-boot-impl
/**
* {@inheritDoc}
*
* @see SpringBootContainer#addAsBootInfResource(URL, String)
*/
@Override
public T addAsBootInfResource(final URL resource, final String target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNullOrEmpty(target, "Target should be specified");
return addAsBootInfResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsWebResource(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
return addAsWebResource(new UrlAsset(resource), target);
}
代码示例来源:origin: shrinkwrap/shrinkwrap
@Override
public T addAsApplicationResource(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
Validate.notNull(target, "Target must be specified");
return addAsApplicationResource(new UrlAsset(resource), target);
}
代码示例来源:origin: shrinkwrap/shrinkwrap
@Override
public T addAsWebResource(URL resource, String target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
return addAsWebResource(new UrlAsset(resource), target);
}
代码示例来源:origin: shrinkwrap/shrinkwrap
/**
* {@inheritDoc}
*
* @see org.jboss.shrinkwrap.api.container.WebContainer#addAsWebInfResource(java.net.URL,
* org.jboss.shrinkwrap.api.ArchivePath)
*/
@Override
public T addAsWebInfResource(final URL resource, final ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
return addAsWebInfResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
/**
* {@inheritDoc}
*
* @see org.jboss.shrinkwrap.api.container.WebContainer#addAsWebInfResource(java.net.URL, java.lang.String)
*/
@Override
public T addAsWebInfResource(final URL resource, final String target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNullOrEmpty(target, "Target should be specified");
return addAsWebInfResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsApplicationResource(URL resource, String target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
Validate.notNull(target, "Target must be specified");
return addAsApplicationResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
/**
* {@inheritDoc}
*
* @see org.jboss.shrinkwrap.api.container.WebContainer#addAsWebInfResource(java.net.URL,
* org.jboss.shrinkwrap.api.ArchivePath)
*/
@Override
public T addAsWebInfResource(final URL resource, final ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource should be specified");
Validate.notNull(target, "Target should be specified");
return addAsWebInfResource(new UrlAsset(resource), target);
}
代码示例来源:origin: org.jboss.shrinkwrap/shrinkwrap-impl-base
@Override
public T addAsApplicationResource(URL resource, ArchivePath target) throws IllegalArgumentException {
Validate.notNull(resource, "Resource must be specified");
Validate.notNull(target, "Target must be specified");
return addAsApplicationResource(new UrlAsset(resource), target);
}
内容来源于网络,如有侵权,请联系作者删除!