本文整理了Java中org.jboss.virtual.VFS.getRoot()
方法的一些代码示例,展示了VFS.getRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VFS.getRoot()
方法的具体详情如下:
包路径:org.jboss.virtual.VFS
类名称:VFS
方法名:getRoot
暂无
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
/**
* Get the virtual file.
* Create file from root url and path if it doesn't exist yet.
*
* @return virtual file root
* @throws IOException for any error
*/
@SuppressWarnings("deprecation")
protected VirtualFile getFile() throws IOException
{
if (file == null)
{
VirtualFile root = VFS.getRoot(rootUrl);
file = root.findChild(path);
}
return file;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss500Beta4
private org.jboss.deployers.client.spi.Deployment createDeploymentContext(URL warURL) throws Exception
{
VirtualFile file = VFS.getRoot(warURL);
return VFSDeploymentFactory.getInstance().createVFSDeployment(file);
}
}
代码示例来源:origin: org.graniteds/granite-server
VirtualFile top = VFS.getRoot(vfsurl);
top = top.getChild(relative);
while (parentDepth > 0) {
代码示例来源:origin: org.jboss.jsfunit/jboss-jsfunit-microdeployer
private void addClasspaths(VFSDeploymentUnit unit) throws MalformedURLException
{
if (classpathUrls == null) return;
for (String testUrl : classpathUrls)
{
testUrl = StringPropertyReplacer.replaceProperties(testUrl);
URL url = new URL(testUrl);
try
{
VirtualFile vFile = VFS.getRoot(url);
unit.addClassPath(vFile);
// add jar files if url is a directory
if (!vFile.isLeaf())
{
for (VirtualFile jarFile : vFile.getChildrenRecursively(JAR_FILTER))
{
unit.addClassPath(jarFile);
}
}
}
catch (IOException e)
{
log.warn("Unable to add URL to classpath: " + url.toString());
}
}
}
代码示例来源:origin: org.jboss.microcontainer/jboss-deployers-vfs
@Override
protected ProtectionDomain getProtectionDomain(String className, String path)
{
VirtualFile clazz = findChild(path);
if (clazz == null)
{
log.trace("Unable to determine class file for " + className);
return null;
}
try
{
VirtualFile root = clazz.getVFS().getRoot();
URL codeSourceURL = root.toURL();
Certificate[] certs = null; // TODO JBMICROCONT-182 determine certificates
CodeSource cs = new CodeSource(codeSourceURL, certs);
PermissionCollection permissions = Policy.getPolicy().getPermissions(cs);
return new ProtectionDomain(cs, permissions);
}
catch (Exception e)
{
throw new Error("Error determining protection domain for " + clazz, e);
}
}
代码示例来源:origin: org.graniteds/granite-server
VirtualFile markerFile = VFS.getRoot(markerUrl);
markerItem = new VFSFileScannedItem(this, null, markerFile, markerFile);
for (ScannedItemHandler handler : handlers) {
代码示例来源:origin: org.jboss.ws/jbossws-jboss510-metadata
private void writeObject(ObjectOutputStream out) throws IOException, URISyntaxException
{
URL url = rootUrl;
if (url == null)
{
VFS vfs = getFile().getVFS();
url = vfs.getRoot().toURL();
}
String pathName = path;
if (pathName == null)
pathName = getFile().getPathName();
ObjectOutputStream.PutField fields = out.putFields();
fields.put("rootUrl", url);
fields.put("path", pathName);
out.writeFields();
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss510
uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2
uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
内容来源于网络,如有侵权,请联系作者删除!