Examples of loadClass()


Examples of java.net.URLClassLoader.loadClass()

      cache.start();

      URLClassLoader ucl1 = createOrphanClassLoader();
      Thread.currentThread().setContextClassLoader(ucl1);

      Class clazz1 = ucl1.loadClass(INSTANCE_CLASS_NAME);
      cache.put(fqn("/a"), "key", clazz1.newInstance());

      Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
      try
      {
View Full Code Here

Examples of javassist.Loader.loadClass()

        try
        {
            loader.addTranslator(pool, this);

            Class result = loader.loadClass(implementationClassName);

            firstTime = false;

            return result;
        }
View Full Code Here

Examples of javax.management.loading.ClassLoaderRepository.loadClass()

                } catch (ClassNotFoundException e) {
                    final ClassLoaderRepository clr =
                        getClassLoaderRepository();
                    try {
                        if (clr == null) throw new ClassNotFoundException(className);
                        return clr.loadClass(className);
                    } catch (ClassNotFoundException ex) {
                        caughtException[0] = ex;
                    }
                }
                return null;
View Full Code Here

Examples of javax.management.loading.MLet.loadClass()

     
         Class c = null;
     
         try
         {
            c  = mlet.loadClass("test.compliance.loading.support.AClass");
         }
         catch (ClassNotFoundException e)
         {
            URL[] urls = mlet.getURLs();
            fail("FAILS IN RI: SUN JMX RI builds a malformed URL from an MLet text file URL '" +
View Full Code Here

Examples of javolution.lang.Initializer.loadClass()

  }

  /** Initializes all real-time classes. */
  public static synchronized boolean initializeRealtimeClasses() {
    Initializer initializer = new Initializer(OSGiServices.class.getClassLoader());
    initializer.loadClass(MathLib.class);
    initializer.loadClass(Text.class);
    initializer.loadClass(TypeFormat.class);
    initializer.loadClass(Struct.class);
    initializer.loadClass(FastBitSet.class);
    initializer.loadClass(FastSortedMap.class);
View Full Code Here

Examples of jodd.util.cl.ExtendedURLClassLoader.loadClass()

    URL[] urls = new URL[0];

    // parent-first
    ExtendedURLClassLoader cl1 = new ExtendedURLClassLoader(urls, null, true);

    Class c1 = cl1.loadClass("java.lang.String");
    assertEquals(String.class, c1);

    // parent-last, still loaded by system loader
    ExtendedURLClassLoader cl2 = new ExtendedURLClassLoader(urls, null, false);
View Full Code Here

Examples of junit.runner.TestCaseClassLoader.loadClass()

*/
public class TestCaseClassLoaderTest extends TestCase {

  public void testClassLoading() throws Exception {
    TestCaseClassLoader loader= new TestCaseClassLoader();
    Class loadedClass= loader.loadClass("junit.tests.runner.ClassLoaderTest", true);
    Object o= loadedClass.newInstance();
    //
    // Invoke the assertClassLoaders method via reflection.
    // We use reflection since the class is loaded by
    // another class loader and we can't do a successful downcast to
View Full Code Here

Examples of kilim.WeavingClassLoader.loadClass()

            usage();
        }
        String className = args[0];
        args = processArgs(args);
        WeavingClassLoader wcl = new WeavingClassLoader(Thread.currentThread().getContextClassLoader());
        Class<?> mainClass = wcl.loadClass(className);
        Method mainMethod = mainClass.getMethod("main", new Class[]{String[].class});
        mainMethod.invoke(null,new Object[] {args});
    }

    private static void usage() {
View Full Code Here

Examples of l2p.extensions.scripts.Compiler.MemoryClassLoader.loadClass()

          {
            continue;
          } // пропускаем вложенные классы
          try
          {
            c = classLoader.loadClass(name);
            Script s = new Script(c);
            _classes.put(name, s);
          }
          catch(ClassNotFoundException e)
          {
View Full Code Here

Examples of l2p.extensions.scripts.jarloader.JarClassLoader.loadClass()

          if(name.contains("$"))
          {
            continue;
          } // пропускаем вложенные классы
          name = name.replace(".class", "").replace("/", ".");
          c = jcl.loadClass(name);
          Script s = new Script(c);
          _classes.put(c.getName(), s);
        }
      }
      catch(Exception e)
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.