Package org.xmlvm.proc.lib

Examples of org.xmlvm.proc.lib.LibraryLoader


      if (arguments.option_greenlist() != null)
      { // Force loading of all greenlist classes
        preloadGreenlistFiles(arguments.option_greenlist(), xmlvmResources);
      }

      LibraryLoader libraryLoader= new LibraryLoader(arguments);

      // Add all required resources, that will not be referenced to the
      // usual way.
      for (XmlvmResource requiredResource : libraryLoader.loadMonolithicLibraries())
      {
        xmlvmResources.put(requiredResource.getFullName(), requiredResource);
      }

      // Make sure we have all types that are referenced loaded.
      libraryLoader.loadAllReferencedTypes(xmlvmResources);
    }
    bundle.addResources(xmlvmResources.values());
    return true;
  }
View Full Code Here


  }

  private void preloadGreenlistFiles(String greenlistFile, Map<String, XmlvmResource> resources)
  {
    UniversalFile greenList= UniversalFileCreator.createFile(new File(greenlistFile));
    LibraryLoader libraryLoader= new LibraryLoader(arguments);
    UniversalFile defaultGreenList= UniversalFileCreator.createFile("/lib/greenlist.txt", "lib/greenlist.txt");
    for (UniversalFile file : new UniversalFile[] { greenList, defaultGreenList })
    {
      Set<String> classes= ClassListLoader.loadGreenlist(file);
      if (classes != null)
      { // If any green list exists, force inclusion of its contents
        for (String className : classes)
        {
          if (!resources.containsKey(className))
          {
            XmlvmResource resource= libraryLoader.load(className);
            if (resource != null)
            {
              resources.put(resource.getFullName(), resource);
            }
          }
View Full Code Here

      return preloadedResources.get(fullName);
    }
    else
    {
      Log.debug(TAG, "Loading JDK class: " + fullName);
      LibraryLoader loader= new LibraryLoader(arguments);
      XmlvmResource resource= loader.load(fullName);
      return resource;
    }
  }
View Full Code Here

TOP

Related Classes of org.xmlvm.proc.lib.LibraryLoader

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.