Examples of loadClass()


Examples of org.springframework.instrument.classloading.ShadowingClassLoader.loadClass()

        Object cachedContext = contextCache.get(combinationOfContextLocationsForThisTestClass);

        if (cachedContext == null) {

          // Create the LoadTimeWeaver.
          Class shadowingLoadTimeWeaverClass = shadowingClassLoader.loadClass(ShadowingLoadTimeWeaver.class.getName());
          Constructor constructor = shadowingLoadTimeWeaverClass.getConstructor(ClassLoader.class);
          constructor.setAccessible(true);
          Object ltw = constructor.newInstance(shadowingClassLoader);

          // Create the BeanFactory.
View Full Code Here

Examples of org.springsource.loaded.test.infra.TestClassLoader.loadClass()

      ZipEntry ze = entries.nextElement();
      System.out.println(ze.getName());
      String name = ze.getName();
      if (name.endsWith(".class")) {
        name = name.substring(0,name.length()-6);
        tcl.loadClass(name.replaceAll("/","."));
      }
    }
//    URL url = tcl.findResource("data/SimpleClass.class");
//    Assert.assertNotNull(url);
//    url = tcl.findResource("data/MissingClass.class");
View Full Code Here

Examples of org.tempuri.javac.util.MemoryClassFactory.loadClass()

                                     msg += errorMessage;
                                     System.err.println(msg);
                                 }
                             });
       
        Class clazz = factory.loadClass("test.main.Main");
        Runnable runner = (Runnable)clazz.newInstance();
        runner.run();
    }

}
View Full Code Here

Examples of org.tempuri.javacImpl.util.MemoryClassFactoryImpl.loadClass()

                                     msg += errorMessage;
                                     System.err.println(msg);
                                 }
                             });
       
        Class clazz = factory.loadClass("test.main.Main");
        Runnable runner = (Runnable)clazz.newInstance();
        runner.run();
    }

}
View Full Code Here

Examples of org.vertx.java.platform.impl.java.CompilingClassLoader.loadClass()

        if (isJavaSource(main)) {
            // TODO - is this right???
            // Don't we want one CompilingClassLoader per instance of this?
            CompilingClassLoader compilingLoader = new CompilingClassLoader(cl, main);
            className = compilingLoader.resolveMainClassName();
            clazz = compilingLoader.loadClass(className);
        } else {
            clazz = cl.loadClass(className);
        }
        Verticle verticle = createRealVerticle(clazz);
        verticle.setVertx(vertx);
View Full Code Here

Examples of ptolemy.backtrack.eclipse.ast.LocalClassLoader.loadClass()

                return simpleName;
            } else {
                try {
                    // Test if a class with the same name exists in the
                    // package.
                    loader.loadClass(importedPackage + "." + simpleName);

                    // If exists, conflict.
                    return name;
                } catch (ClassNotFoundException e) {
                }
View Full Code Here

Examples of ptolemy.backtrack.util.ClassFileLoader.loadClass()

                    }

                    Class c = null;

                    try {
                        c = loader.loadClass(new File(fileName));
                    } catch (Exception e) {
                        /*System.err.println("Skipping \"" + files[j] + "\". "
                                + "Cause: " + e.getMessage());
                        continue;*/
                        System.err.println("***********************");
 
View Full Code Here

Examples of railo.commons.lang.PhysicalClassLoader.loadClass()

  // LOAD CLASS
      //print.out(className);
    // check last Mod
    if(classFile.lastModified()>=classFileOriginal.lastModified()) {
      try {
        Class clazz=cl.loadClass(className);
        if(clazz!=null && !hasChangesOfChildren(classFile.lastModified(),clazz))return registerTypeMapping(clazz);
      }
      catch(Throwable t){}
    }
    if(!create) return null;
View Full Code Here

Examples of ro.fortsoft.pf4j.PluginClassLoader.loadClass()

  public synchronized List<Class<?>> getExtensionClasses(String pluginId) {
    List<Class<?>> list = new ArrayList<Class<?>>();
    PluginClassLoader loader = pf4j.getPluginClassLoader(pluginId);
    for (String className : pf4j.getExtensionClassNames(pluginId)) {
      try {
        list.add(loader.loadClass(className));
      } catch (ClassNotFoundException e) {
        logger.error(String.format("Failed to find %s in %s", className, pluginId), e);
      }
    }
    return list;
View Full Code Here

Examples of scalaExec.ClassLoaders.ExtensionClassLoader.loadClass()

             int javaNameIdx = javaFile.indexOf(classNameToLoad);
             String pathToAdd = javaFile.substring(0, javaNameIdx-1);   // path to add the the extension class loader class path
             extClassLoader.extendClassPath(pathToAdd)// append the path
                      
           try {   // try to load the class
                        Class  loadedClass = extClassLoader.loadClass(classNameToLoad);
                        Method m = null;
                        // used for invoking the main method of a Java class
                        try {
                            m = loadedClass.getMethod("main", formals);
                        }
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.