Package org.jboss.classloading.plugins

Examples of org.jboss.classloading.plugins.AbstractClassLoadingDomain.loadClass()


   // Public --------------------------------------------------------

   public void testLoadClass() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      domain.loadClass("java.lang.String", false, null);
   }

   public void testLoadClassFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
View Full Code Here


   public void testLoadClassFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      try
      {
         domain.loadClass("java.lang.rubbish", false, null);
         fail("Should not be here!");
      }
      catch (ClassNotFoundException expected)
      {
      }
View Full Code Here

      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addClass("xyzzy.Hello", String.class);
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      domain.loadClass("xyzzy.Hello", false, null);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy.Hello");
      assertNotNull(stats);
      assertEquals(1, stats.loadClass);
     
View Full Code Here

     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy.Hello");
      assertNotNull(stats);
      assertEquals(1, stats.loadClass);
     
      domain.loadClass("xyzzy.Hello", false, null);
      assertEquals(1, stats.loadClass);
   }
  
   public void testClassCacheFailed() throws Exception
   {
View Full Code Here

      scl.addClass("xyzzy.Hello", String.class);
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      try
      {
         domain.loadClass("xyzzy.rubbish", false, null);
         fail("Should not be here!");
      }
      catch (ClassNotFoundException expected)
      {
      }
View Full Code Here

      assertNotNull(stats);
      assertEquals(1, stats.loadClass);
     
      try
      {
         domain.loadClass("xyzzy.rubbish", false, null);
         fail("Should not be here!");
      }
      catch (ClassNotFoundException expected)
      {
      }
View Full Code Here

      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addClass("xyzzy.Hello", String.class);
      DelegatingDomainClassLoader ddcl = new DelegatingDomainClassLoader(scl);
      domain.addDomainClassLoader(ddcl);
     
      domain.loadClass("xyzzy.Hello", false, null);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy.Hello");
      assertNotNull(stats);
      assertEquals(1, stats.loadClass);
View Full Code Here

      domain.removeDomainClassLoader(ddcl);
     
      try
      {
         domain.loadClass("xyzzy.Hello", false, null);
         fail("Should not be here!");
      }
      catch (ClassNotFoundException expected)
      {
      }
View Full Code Here

      catch (ClassNotFoundException expected)
      {
      }

      domain.addDomainClassLoader(ddcl);
      domain.loadClass("xyzzy.Hello", false, null);
      assertEquals(2, stats.loadClass);
   }
  
   public void testResourceCache() throws Exception
   {
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.