Examples of InhabitantsParsingContextGenerator


Examples of org.jvnet.hk2.component.classmodel.InhabitantsParsingContextGenerator

    protected void populateHabitat(final Habitat habitat, InhabitantsParser ip) {
      final ClassPath classpath = ClassPath.create(habitat, true);
      Callable<InhabitantsParsingContextGenerator> populator = new Callable<InhabitantsParsingContextGenerator>() {
          @Override
          public InhabitantsParsingContextGenerator call() throws Exception {
            InhabitantsParsingContextGenerator ipcgen = InhabitantsParsingContextGenerator.create(habitat);
            Set<String> cpSet = classpath.getEntries();
            for (String fileName : cpSet) {
                File f = new File(fileName);
                if (f.exists()) {
                  try {
                    ipcgen.parse(f);
                  } catch (IOException e) {
                    e.printStackTrace();
                  }
                }
            }
            return ipcgen;
          }
      };

      InhabitantsParsingContextGenerator ipcgen;
      try {
        InhabitantsFeed feed = InhabitantsFeed.create(habitat, ip);
        ipcgen = (USE_CACHE) ? ipcgCache.get(classpath, populator) : populator.call();
        feed.populate(ipcgen);
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.