Examples of loadClass()


Examples of org.apache.cayenne.modeler.ClassLoadingService.loadClass()

    private void processSelect() {
        try {
            ClassLoadingService classLoader = Application.getInstance().getClassLoadingService();
            String strategyClass = (String) strategyCombo.getSelectedItem();
           
            this.strategy = (NamingStrategy) classLoader.loadClass(strategyClass).newInstance();
           
            /**
             * Be user-friendly and update preferences with specified strategy
             */
            NamingStrategyPreferences.getInstance().addToLastUsedStrategies(strategyClass);
View Full Code Here

Examples of org.apache.cayenne.modeler.FileClassLoadingService.loadClass()

                };

                classLoader.setPathFiles(CollectionUtils.collect(details, transformer));
            }

            Class<Driver> driverClass = classLoader.loadClass(
                    Driver.class,
                    currentDataSource.getJdbcDriver());
            Driver driver = driverClass.newInstance();

            // connect via Cayenne DriverDataSource - it addresses some driver issues...
View Full Code Here

Examples of org.apache.cocoon.components.classloader.ClassLoaderManager.loadClass()

        else {
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] using default mapping");
        }

        clazzLoader = (ClassLoaderManager) manager.lookup(ClassLoaderManager.ROLE);
        Class clazz = clazzLoader.loadClass(clazzName);
        setBean(clazz.newInstance());
      }
      catch (ComponentException e) {
        throw new ConfigurationException("", e);
      }
View Full Code Here

Examples of org.apache.cocoon.components.flow.java.ContinuationClassLoader.loadClass()

    public static void testSimpleContinuable() throws Exception {
        ContinuationClassLoader cl = new ContinuationClassLoader(Thread
                .currentThread().getContextClassLoader());
        Continuation continuation = new Continuation(null);
        continuation.registerThread();
        Class clazz = cl.loadClass("org.apache.cocoon.components.flow.java.test.SimpleContinuable");
        Object object = clazz.newInstance();
        clazz.getMethod("suspend", null).invoke(object, null);
        if (continuation.isCapturing())
            continuation.getStack().popReference();
        continuation = new Continuation(continuation, null);
View Full Code Here

Examples of org.apache.commons.discovery.ResourceClass.loadClass()

           
            // If it's set as a property.. it had better be there!
            if (classes.hasNext()) {
                ResourceClass info = classes.nextResourceClass();
                try {
                    return info.loadClass();
                } catch (Exception e) {
                    // ignore
                }
            }
        } else {
View Full Code Here

Examples of org.apache.commons.logging.PathableClassLoader.loadClass()

        parent.addLogicalLib("commons-logging");

        PathableClassLoader child = new PathableClassLoader(parent);
        child.addLogicalLib("testclasses");
       
        Class testClass = child.loadClass(CustomConfigFullTestCase.class.getName());
        return new PathableTestSuite(testClass, child);
    }
}
View Full Code Here

Examples of org.apache.commons.vfs.impl.VFSClassLoader.loadClass()

     */
    public void testLoadClass() throws Exception
    {
        final VFSClassLoader loader = createClassLoader();

        final Class testClass = loader.loadClass("code.ClassToLoad");
        final Package pack = testClass.getPackage();
        assertEquals("code", pack.getName());
        verifyPackage(pack, false);

        final Object testObject = testClass.newInstance();
View Full Code Here

Examples of org.apache.commons.vfs2.impl.VFSClassLoader.loadClass()

     */
    public void testLoadClass() throws Exception
    {
        final VFSClassLoader loader = createClassLoader();

        final Class<?> testClass = loader.loadClass("code.ClassToLoad");
        final Package pack = testClass.getPackage();
        assertEquals("code", pack.getName());
        verifyPackage(pack, false);

        final Object testObject = testClass.newInstance();
View Full Code Here

Examples of org.apache.cxf.common.util.ASMHelper.loadClass()

            mv.visitEnd();

            cw.visitEnd();

            byte bts[] = cw.toByteArray();
            cls = helper.loadClass(className,
                                   mcls, bts);
        }
        try {
            return cls.getConstructor(Map.class).newInstance(map);
        } catch (Throwable e) {
View Full Code Here

Examples of org.apache.directory.server.core.api.sp.LdapClassLoader.loadClass()

        // assert set up successfull
        assertNotNull( defaultContext.lookup( "fullyQualifiedJavaClassName=HelloWorld" ) );

        // load the class
        LdapClassLoader loader = new LdapClassLoader( getService() );
        Class<?> clazz = loader.loadClass( "HelloWorld" );

        // assert class loaded successfully
        assertEquals( clazz.getName(), "HelloWorld" );
    }
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.