Package org.jboss.virtual

Examples of org.jboss.virtual.VirtualFileFilter


  @SuppressWarnings("unchecked")
  @Override
  protected T mergeFiles(VFSDeploymentUnit unit, T root,List<VirtualFile> files, Set<String> missingFiles) throws Exception {
   
    List<VirtualFile> matched = unit.getMetaDataFiles(new VirtualFileFilter() {
      @Override
      public boolean accepts(VirtualFile file) {
        return file.getName().endsWith(suffix2);
      }
    });
View Full Code Here


  public IndexMetadataFactory(URL url) throws IOException, URISyntaxException {
    VFS.init();
    ZipEntryContext context = new ZipEntryContext(url);
    VirtualFileHandler vfh = context.getRoot();
    VirtualFile vdb = new VirtualFile(vfh);
    List<VirtualFile> children = vdb.getChildrenRecursively(new VirtualFileFilter() {
      @Override
      public boolean accepts(VirtualFile file) {
        return file.getName().endsWith(IndexConstants.NAME_DELIM_CHAR+IndexConstants.INDEX_EXT);
      }
    });
View Full Code Here

   public List<VirtualFile> getMetaDataFiles(String name, String suffix, MetaDataTypeFilter mdtf)
   {
      if (name == null && suffix == null)
         throw new IllegalArgumentException("Null name and suffix");

      VirtualFileFilter filter = new MetaDataMatchFilter(name, suffix);
      return getMetaDataFiles(filter, mdtf);
   }
View Full Code Here

   public List<VirtualFile> getMetaDataFiles(String name, String suffix)
   {
      if (name == null && suffix == null)
         throw new IllegalArgumentException("Null name and suffix");

      VirtualFileFilter filter = new MetaDataMatchFilter(name, suffix);
      return getMetaDataFiles(filter);
   }
View Full Code Here

         for (String lib : libs)
         {
            VirtualFile libVF = file.getChild(lib);
            if (libVF != null)
            {
               VirtualFileFilter lf = filters.get(lib);
               if (lf == null)
                  lf = libFilter;

               List<VirtualFile> archives = libVF.getChildren(lf);
               for (VirtualFile archive : archives)
                  addClassPath(structureContext, archive, true, true, context);
            }
            else
            {
               if (log.isTraceEnabled())
                  log.trace("No such lib: " + lib + ", " + file);
            }
         }

         // check only children of defined sub-dirs / groups
         for (String group : groups)
         {
            VirtualFile groupVF = file.getChild(group);
            if (groupVF != null)
            {
               VirtualFileFilter gf = filters.get(group);
               if (gf == null)
                  gf = groupFilter;

               List<VirtualFile> children = groupVF.getChildren(gf);
               for (VirtualFile child : children)
View Full Code Here

      VisitorAttributes attributes = visitor.getAttributes();
      boolean includeRoot = attributes.isIncludeRoot();
      boolean leavesOnly = attributes.isLeavesOnly();
      boolean ignoreErrors = attributes.isIgnoreErrors();
      boolean includeHidden = attributes.isIncludeHidden();
      VirtualFileFilter recurseFilter = attributes.getRecurseFilter();
      visit(handler, visitor, includeRoot, leavesOnly, ignoreErrors, includeHidden, recurseFilter);
   }
View Full Code Here

      assertNotNull(children);
      assertEquals(10, children.size());

      sar.clear();

      sar.addPath(jar1, new VirtualFileFilter()
      {
         public boolean accepts(VirtualFile file)
         {
            return "META-INF".equalsIgnoreCase(file.getName());
         }
View Full Code Here

            for (String lib : libs)
            {
                VirtualFile libVF = file.getChild(lib);
                if (libVF != null)
                {
                    VirtualFileFilter lf = filters.get(lib);
                    if (lf == null)
                        lf = libFilter;

                    List<VirtualFile> archives = libVF.getChildren(lf);
                    for (VirtualFile archive : archives)
                        addClassPath(structureContext, archive, true, true, context);
                } else
                {
                    if (log.isTraceEnabled())
                        log.info("No such lib: " + lib + ", " + file);
                }
            }

            // check only children of defined sub-dirs / groups
            for (String group : groups)
            {
                VirtualFile groupVF = file.getChild(group);
                if (groupVF != null)
                {
                    VirtualFileFilter gf = filters.get(group);
                    if (gf == null)
                        gf = groupFilter;

                    List<VirtualFile> children = groupVF.getChildren(gf);
                    for (VirtualFile child : children)
View Full Code Here

         VisitorAttributes va = new VisitorAttributes();
         va.setLeavesOnly(true);
         SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
         va.setRecurseFilter(noJars);

         VirtualFileFilter filter = new VirtualFileFilter()
         {

            public boolean accepts(VirtualFile file)
            {
               boolean matched = false;
View Full Code Here

      VisitorAttributes attributes = visitor.getAttributes();
      boolean includeRoot = attributes.isIncludeRoot();
      boolean leavesOnly = attributes.isLeavesOnly();
      boolean ignoreErrors = attributes.isIgnoreErrors();
      boolean includeHidden = attributes.isIncludeHidden();
      VirtualFileFilter recurseFilter = attributes.getRecurseFilter();
      visit(handler, visitor, includeRoot, leavesOnly, ignoreErrors, includeHidden, recurseFilter);
   }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.VirtualFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.