Package org.jboss.classloader.spi

Examples of org.jboss.classloader.spi.ParentPolicy


      Set<String> parentPackages = getParentPackages();
      String[] parentPkgs = parentPackages.toArray(new String[parentPackages.size()]);
      PackageClassFilter filter = new PackageClassFilter(parentPkgs);
      filter.setIncludeJava(true);
      CombiningClassFilter beforeFilter = CombiningClassFilter.create(filter, parentFilter);
      ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, ClassFilter.NOTHING);
      return initializeClassLoader(clazz, system, parentPolicy, policy);
   }
View Full Code Here


    * @param policy the policy
    * @return the clazz loaded from the new classloading system
    */
   public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassFilter beforeFilter, ClassFilter afterFilter, ClassLoaderPolicy policy)
   {
      ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, afterFilter);
      return initializeClassLoader(clazz, system, parentPolicy, policy);
   }
View Full Code Here

         }
         else
         {
            ClassFilter before = (beforeFilter != null) ? beforeFilter.createFilter() : ClassFilterUtils.EVERYTHING;
            ClassFilter after = (afterFilter != null) ? afterFilter.createFilter() : ClassFilterUtils.NOTHING;
            parentPolicy = new ParentPolicy(before, after, description);
         }
      }
      return parentPolicy;
   }
View Full Code Here

   }
  
   public void testHierarchyFiltered() throws Exception
   {
      NoMatchClassFilter filter = new NoMatchClassFilter(CLASS_A);
      runTest(ParentPolicy.BEFORE_BUT_JAVA_ONLY, new ParentPolicy(filter, ClassFilter.NOTHING), false);

      assertTrue("Should have been filtered", filter.filtered);
   }
View Full Code Here

   }
  
   public void testHierarchyFiltered() throws Exception
   {
      NoMatchClassFilter filter = new NoMatchClassFilter(CLASS_A);
      runTest(ParentPolicy.BEFORE_BUT_JAVA_ONLY, new ParentPolicy(filter, ClassFilter.NOTHING), false);

      assertTrue("Should have been filtered", filter.filtered);
   }
View Full Code Here

         Set<String> parentPackages = IsolatedClassLoaderTestHelper.getParentPackages();
         String[] parentPkgs = parentPackages.toArray(new String[parentPackages.size()]);
         PackageClassFilter filter = new PackageClassFilter(parentPkgs);
         filter.setIncludeJava(true);
         CombiningClassFilter beforeFilter = CombiningClassFilter.create(filter, aopFilter);
         ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, ClassFilter.NOTHING);
        
         defaultDomain.setParentPolicy(parentPolicy);
      }
      return system;
   }
View Full Code Here

      ClassLoaderSystem system = new DefaultClassLoaderSystem();
      // allow MC annotations, so that both, deployer and tester see the same
      ClassFilter mcAnnFilter = new PackageClassFilter(new String[]{"org.jboss.beans.metadata.api.annotations"});
      ClassFilter filter = new CombiningClassFilter(false, new ClassFilter[]{ClassFilter.JAVA_ONLY, mcAnnFilter});
      ParentPolicy policy = new ParentPolicy(filter, ClassFilter.NOTHING);
      system.getDefaultDomain().setParentPolicy(policy);

      AbstractLevelClassLoaderSystemDeployer clsd = new AbstractLevelClassLoaderSystemDeployer();
      clsd.setClassLoading(classLoading);
      clsd.setSystem(system);
View Full Code Here

            ClassLoaderDomain parent = null;
            String parentDomain = module.getParentDomain();
            if (parentDomain != null)
               parent = system.getDomain(parentDomain);
           
            ParentPolicy parentPolicy = module.getParentPolicy();

            domain = system.createAndRegisterDomain(domainName, parentPolicy, parent);
         }
      }
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
View Full Code Here

   {
      if (system == null)
         throw new IllegalArgumentException("Null classloader system");
     
      String domainName = getDeterminedDomainName();
      ParentPolicy parentPolicy = getDeterminedParentPolicy();
      String parentName = getDeterminedParentDomainName();
      ClassLoader result = system.registerClassLoaderPolicy(domainName, parentPolicy, parentName, getPolicy());
      this.system = system;
      return result;
   }
View Full Code Here

   {
      if (system == null)
         throw new IllegalArgumentException("Null classloader system");
     
      String domainName = getDeterminedDomainName();
      ParentPolicy parentPolicy = getDeterminedParentPolicy();
      ClassLoader result = system.registerClassLoaderPolicy(domainName, parentPolicy, loader, getPolicy());
      this.system = system;
      return result;
   }
View Full Code Here

TOP

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

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.