Package org.jboss.classloader.spi

Examples of org.jboss.classloader.spi.DelegateLoader


      this.policy = policy;

      BaseClassLoaderPolicy basePolicy = policy;
      basePolicy.setClassLoader(this);

      loader = new DelegateLoader(policy);

      if (basePolicy.isCacheable())
         resourceCache = new ConcurrentHashMap<String, URL>();

      if (basePolicy.isBlackListable())
View Full Code Here


      WildcardRequirementDependencyItem item = new WildcardRequirementDependencyItem(module, requirement, state, state);
      if (item.resolve(controller))
      {
         Module resolvedModule = item.getResolvedModule();

         DelegateLoader loader = resolvedModule.getDelegateLoader(module, requirement);
         loader.setImportType(ImportType.AFTER); // allow normal imports to run before
         item.setLoader(loader); // remember the loader wrt item

         ClassLoaderPolicy policy = getPolicy();
         policy.addExtraDelegate(loader);
View Full Code Here

   }

   @Override
   protected Class<?> doLoadClass(String className)
   {
      DelegateLoader loader = resolve(ClassLoaderUtils.getClassPackageName(className));
      return loader != null ? loader.loadClass(className) : null;
   }
View Full Code Here

   }

   @Override
   protected URL doGetResource(String name)
   {
      DelegateLoader loader = resolve(ClassLoaderUtils.getResourcePackageName(name));
      return loader != null ? loader.getResource(name) : null;
   }
View Full Code Here

   }

   @Override
   protected void doGetResources(String name, Set<URL> urls) throws IOException
   {
      DelegateLoader loader = resolve(ClassLoaderUtils.getResourcePackageName(name));
      if (loader != null)
      {
         loader.getResources(name, urls);
      }
   }
View Full Code Here

   }

   @Override
   protected Package doGetPackage(String name)
   {
      DelegateLoader loader = resolve(ClassLoaderUtils.pathToPackage(name));
      return loader != null ? loader.getPackage(name) : null;
   }
View Full Code Here

               throw new IllegalStateException("Item not resolved: " + item);
           
            // Dynamic requirement, create it lazily
            if (requirement.isDynamic())
            {
               DelegateLoader delegate = createLazyDelegateLoader(checkDomain(), item);
               dynamic.add(delegate);
               continue;
            }

            String name = (String) item.getIDependOn();
            if (name == null)
            {
               // Optional requirement, just ignore
               if (requirement.isOptional())
                  continue;
               // Something has gone wrong
               throw new IllegalStateException("No iDependOn for item: " + item);
            }
            Module iDependOnModule = checkDomain().getModule(name);
            if (iDependOnModule == null)
               throw new IllegalStateException("Module not found with name: " + name);

            // Determine the delegate loader for the module
            Module other = item.getModule();
            DelegateLoader delegate = iDependOnModule.getDelegateLoader(other, requirement);

            // Check for re-export by the module
            if (requirement.wantReExports())
               addDelegates(iDependOnModule, delegates, dynamic, visited, true);
           
View Full Code Here

      this.policy = policy;

      BaseClassLoaderPolicy basePolicy = policy;
      basePolicy.setClassLoader(this);

      loader = new DelegateLoader(policy);

      if (basePolicy.isCacheable())
         resourceCache = new ConcurrentHashMap<String, URL>();

      if (basePolicy.isBlackListable())
View Full Code Here

      this.policy = policy;

      BaseClassLoaderPolicy basePolicy = policy;
      basePolicy.setClassLoader(this);

      loader = new DelegateLoader(policy);

      if (basePolicy.isCacheable())
         resourceCache = new ConcurrentHashMap<String, URL>();

      if (basePolicy.isBlackListable())
View Full Code Here

      this.policy = policy;

      BaseClassLoaderPolicy basePolicy = policy;
      basePolicy.setClassLoader(this);

      loader = new DelegateLoader(policy);

      if (basePolicy.isCacheable())
         resourceCache = new ConcurrentHashMap<String, URL>();

      if (basePolicy.isBlackListable())
View Full Code Here

TOP

Related Classes of org.jboss.classloader.spi.DelegateLoader

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.