Package com.subhajit.common.util.CommonUtils

Examples of com.subhajit.common.util.CommonUtils.IResource


        progress.increment(1, "Indexing...");
      }
      int count = 0;
      Iterator<IResource> it = parser.iterator();
      while (it.hasNext()) {
        final IResource resource = it.next();
        if (resource.isDirectory()) {
          continue;
        }
        if (resource.getName().endsWith(".class")) {
          final String className = resource.getName().substring(0,
              resource.getName().lastIndexOf(".class")).replace(
              '/', '.');
          executor.submit(new Callable<ClassInfo>() {
            public ClassInfo call() throws Exception {
              return load(resource.getInputStream(), className);
            }
          });
          count++;
        }
      }
View Full Code Here


    IRepositoryParser parser = null;
    try {
      parser = new CommonUtils.ZipParser(new ZipFile(indexFile));
      Iterator<IResource> it = parser.iterator();
      while (it.hasNext()) {
        IResource resource = it.next();
        if (!resource.isDirectory()) {
          visitResource(visitor, resource);
        }
      }
    } finally {
      if (parser != null) {
View Full Code Here

      Iterator<IResource> it = parser.iterator();
      CompletionExecutor<Void> executor = null;
      try {
        executor = new CompletionExecutor<Void>(threads);
        while (it.hasNext()) {
          final IResource resource = it.next();
          if (!resource.isDirectory()) {
            executor.submit(new Callable<Void>() {
              public Void call() throws Exception {
                visitResource(visitor, resource);
                return null;
              }
View Full Code Here

            }

            // Examine the resources to check if they are inner or
            // anonymous classes of "className".
            while (resources.hasNext()) {
              IResource next = resources.next();
              String name = next.getName();
              if (name.endsWith(".class")) {
                String testClassName = name.substring(0,
                    name.lastIndexOf(".class")).replace(
                    '\\', '/').replace('/', '.');
                if (testClassName.indexOf('$') != -1
View Full Code Here

TOP

Related Classes of com.subhajit.common.util.CommonUtils.IResource

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.