本文整理汇总了Java中org.jboss.shrinkwrap.api.Assignable类的典型用法代码示例。如果您正苦于以下问题:Java Assignable类的具体用法?Java Assignable怎么用?Java Assignable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Assignable类属于org.jboss.shrinkwrap.api包,在下文中一共展示了Assignable类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: archiveWithTestInfo
import org.jboss.shrinkwrap.api.Assignable; //导入依赖的package包/类
protected Assignable archiveWithTestInfo(final Archive<?> archive) {
String name = archive.getName();
if (name.endsWith(".war") || name.endsWith(".ear")) {
name = name.substring(0, name.length() - ".war".length());
}
return archive.add(
new StringAsset(testClass.get().getJavaClass().getName() + '#' + name),
ArchivePaths.create("arquillian-tomee-info.txt"));
}
开发者ID:apache,项目名称:tomee,代码行数:10,代码来源:TomEEContainer.java
示例2: as
import org.jboss.shrinkwrap.api.Assignable; //导入依赖的package包/类
@Override
public <TYPE extends Assignable> TYPE as(Class<TYPE> clazz) {
throw new UnsupportedOperationException("Operation not supported for Undertow Archive.");
}
开发者ID:arquillian,项目名称:arquillian-container-undertow,代码行数:5,代码来源:UndertowWebArchiveImpl.java
示例3: as
import org.jboss.shrinkwrap.api.Assignable; //导入依赖的package包/类
@Override
public <TYPE extends Assignable> TYPE as(final Class<TYPE> clazz) {
return delegate.as(clazz);
}
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:5,代码来源:ServerGroupArchive.java
示例4: dumpFile
import org.jboss.shrinkwrap.api.Assignable; //导入依赖的package包/类
protected Dump dumpFile(final Archive<?> archive) {
final String tmpDir = configuration.getAppWorkingDir();
Files.deleteOnExit(new File(tmpDir));
File file;
if (configuration.isSingleDumpByArchiveName()) {
file = new File(tmpDir + File.separator + archive.getName());
Files.deleteOnExit(file);
} else {
int i = 0;
do { // be sure we don't override something existing
file = new File(tmpDir + File.separator + i++ + File.separator + archive.getName());
} while (file.getParentFile().exists()); // we will delete the parent (to clean even complicated unpacking)
Files.deleteOnExit(file.getParentFile());
}
if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) {
LOGGER.warning("can't create " + file.getParent());
}
final Assignable finalArchive;
if (isTestable(archive, deployment.get())) {
finalArchive = archiveWithTestInfo(archive);
} else {
finalArchive = archive;
}
long size = -1;
if (file.exists()) {
size = file.length();
}
final boolean created;
if (!configuration.isSingleDumpByArchiveName() || !file.exists()) {
finalArchive.as(ZipExporter.class).exportTo(file, true);
created = true;
} else {
created = false;
}
if (size > 0 && size != file.length()) {
LOGGER.warning("\nFile overwritten but size doesn't match: (now) "
+ file.length() + "/(before) " + size + " name="+ file.getName()
+ (configuration.isSingleDumpByArchiveName() ? " maybe set singleDumpByArchiveName to false" : "")
+ "\n");
}
return new Dump(file, created);
}
开发者ID:apache,项目名称:tomee,代码行数:48,代码来源:TomEEContainer.java
注:本文中的org.jboss.shrinkwrap.api.Assignable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论