Examples of loadClass()


Examples of org.jivesoftware.openfire.container.PluginClassLoader.loadClass()

                if ("clustering".equals(pluginName) || "admin".equals(pluginName)) {
                    continue;
                }
                PluginClassLoader pluginClassloader = pluginManager.getPluginClassloader(plugin);
                try {
                    return pluginClassloader.loadClass(name);
                }
                catch (ClassNotFoundException e1) {
                    // Do nothing. Continue to the next plugin
                }
            }
View Full Code Here

Examples of org.jnode.vm.VmSystemClassLoader.loadClass()

    public static void main(String[] args)
        throws Exception {

        final String className = (args.length > 0) ? args[0] : "java.lang.Object";
        final VmSystemClassLoader loader = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture32());
        final VmType vmClass = loader.loadClass(className, true);

        for (int i = 0; i < vmClass.getNoDeclaredMethods(); i++) {
            TestCFG(vmClass.getDeclaredMethod(i));
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader.loadClass()

        final String arrClsName = vmClass.getArrayClassName();
        final VmType<?> arrCls;
        try {
            final VmClassLoader curLoader = vmClass.getLoader();
            arrCls = curLoader.loadClass(arrClsName, true);
            if (arrCls == null) {
                throw new NoClassDefFoundError(arrClsName);
            }
        } catch (ClassNotFoundException ex) {
            throw new NoClassDefFoundError(arrClsName);
View Full Code Here

Examples of org.jruby.compiler.impl.StandardASMCompiler.loadClass()

                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }
            script = (Script)asmCompiler.loadClass(classLoader).newInstance();

            if (config.isJitLogging()) {
                System.err.println("compiled: " + node.getPosition().getFile());
            }
        } catch (NotCompilableException nce) {
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader.loadClass()

            ClassReader cr = new ClassReader(buf);
            String className = cr.getClassName().replace('/', '.');

            Class clazz = null;
            try {
                clazz = jcl.loadClass(className);
            } catch (ClassNotFoundException cnfe) {
                clazz = jcl.defineClass(className, buf);
            }
           
            // if it's a compiled JRuby script, instantiate and run it
View Full Code Here

Examples of org.jwebsocket.factory.JWebSocketJarClassLoader.loadClass()

            lJarFilePath = JWebSocketConfig.getLibraryFolderPath(lValue);
            if (mLog.isDebugEnabled()) {
              mLog.debug("Trying to load class '" + lClassName + "' from jar '" + lJarFilePath + "'...");
            }
            lClassLoader.addFile(lJarFilePath);
            lClass = lClassLoader.loadClass(lClassName);
            if (mLog.isDebugEnabled()) {
              mLog.debug("Class '" + lClassName + "' successfully loaded from '" + lJarFilePath + "'.");
            }
          } catch (Exception ex) {
            mLog.error(ex.getClass().getSimpleName() + " loading jar '" + lJarFilePath + "': " + ex.getMessage());
View Full Code Here

Examples of org.kie.internal.utils.CompositeClassLoader.loadClass()

                final boolean resolve ) throws ClassNotFoundException {
            Class<?> cls = fastFindClass( name );

            if (cls == null) {
                final CompositeClassLoader parent = (CompositeClassLoader) getParent();
                cls = parent.loadClass( name,
                                        resolve,
                                        this );
            }

            if (cls == null) {
View Full Code Here

Examples of org.kie.util.CompositeClassLoader.loadClass()

                final boolean resolve ) throws ClassNotFoundException {
            Class<?> cls = fastFindClass( name );

            if (cls == null) {
                final CompositeClassLoader parent = (CompositeClassLoader) getParent();
                cls = parent.loadClass( name,
                                        resolve,
                                        this );
            }

            if (cls == null) {
View Full Code Here

Examples of org.mokai.plugin.PluginMechanism.loadClass()

  }

  private PluginMechanism mockPluginMechanism() {
    PluginMechanism pluginMechanism = mock(PluginMechanism.class);

    when(pluginMechanism.loadClass(endsWith("MockConnector")))
      .thenAnswer(new Answer<Class<?>>() {

        @Override
        public Class<?> answer(InvocationOnMock invocation)
            throws Throwable {
View Full Code Here

Examples of org.mokai.plugin.jpf.JpfPluginMechanism.loadClass()

  public void testLoadNonExistentType() throws Exception {
    JpfPluginMechanism pluginMechanism = new JpfPluginMechanism(PLUGINS_PATH);
    pluginMechanism.configure();

    // check that null is returned when we try to load an unexistent class
    Class<?> nonExistentClass = pluginMechanism.loadClass("non.existent.class");
    Assert.assertNull(nonExistentClass);

    pluginMechanism.destroy();
  }
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.