Package org.jboss.classloader.spi

Examples of org.jboss.classloader.spi.ClassLoaderDomain


  
   public void testCustomLoaderBeforeNotFound() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader(false);
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.BEFORE, loader);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(ClassLoaderDomain.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here


  
   public void testCustomLoaderAfterNotReached() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.AFTER, loader);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(MockLoader.class, Loader.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

  
   public void testCustomLoaderAfterReached() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.AFTER, loader);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
      assertLoadClass(MockLoader.class, classLoader, null, true);
View Full Code Here

   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      NoMatchClassFilter filter = new NoMatchClassFilter(MockLoader.class);
      ParentPolicy parentPolicy = new ParentPolicy(filter, ClassFilter.NOTHING);
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", parentPolicy, loader);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(MockLoader.class, Loader.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

  
   public void testCustomLoaderBeforeGetResource() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.BEFORE, loader);
      domain.setUseLoadClassForParent(false);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(MockLoader.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

  
   public void testCustomLoaderBeforeNotFoundGetResource() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.BEFORE, loader);
      domain.setUseLoadClassForParent(false);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(ClassLoaderDomain.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

  
   public void testCustomLoaderAfterNotReachedGetResource() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.AFTER, loader);
      domain.setUseLoadClassForParent(false);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(MockLoader.class, Loader.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

  
   public void testCustomLoaderAfterReachedGetResource() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", ParentPolicy.AFTER, loader);
      domain.setUseLoadClassForParent(false);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
      assertLoadClass(MockLoader.class, classLoader, null, true);
View Full Code Here

   {
      ClassLoaderSystem system = createClassLoaderSystem();
      MockLoader loader = new MockLoader();
      NoMatchClassFilter filter = new NoMatchClassFilter(MockLoader.class);
      ParentPolicy parentPolicy = new ParentPolicy(filter, ClassFilter.NOTHING);
      ClassLoaderDomain domain = system.createAndRegisterDomain("test", parentPolicy, loader);
      domain.setUseLoadClassForParent(false);
     
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPathsAndPackageNames(MockLoader.class, Loader.class);
      ClassLoader classLoader = system.registerClassLoaderPolicy(domain, policy);
     
View Full Code Here

   }
  
   public void testGetResourceFromParentBefore() throws Exception
   {
      ClassLoaderSystem system = createClassLoaderSystem();
      ClassLoaderDomain parent = system.createAndRegisterDomain("parent");
      MockClassLoaderPolicy policy = createMockClassLoaderPolicy();
      policy.setPrefix("a/");
      policy.setPath("com/acme/p1");
      policy.setPackageNames(new String[] { "com.acme.p1" } );
      system.registerClassLoaderPolicy(parent, policy);

      ClassLoaderDomain child = system.createAndRegisterDomain("child", ParentPolicy.BEFORE, parent);
      MockClassLoaderPolicy policy2 = createMockClassLoaderPolicy();
      policy2.setPrefix("b/");
      policy2.setPath("com/acme/p1");
      ClassLoader classLoader = system.registerClassLoaderPolicy(child, policy2);
     
View Full Code Here

TOP

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

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.