Examples of loadClass()


Examples of org.apache.drill.exec.compile.QueryClassLoader.loadClass()

    DrillConfig c = DrillConfig.createClient();
    SystemOptionManager m = new SystemOptionManager(c, new LocalPStoreProvider(c));
    m.init();
    QueryClassLoader ql = new QueryClassLoader(DrillConfig.create(), m);
    ql.injectByteCode("org.apache.drill.Pickle$OutgoingBatch", output);
    Class<?> clz = ql.loadClass("org.apache.drill.Pickle$OutgoingBatch");
    clz.getMethod("x").invoke(null);

  }

View Full Code Here

Examples of org.apache.maven.bootstrap.util.IsolatedClassLoader.loadClass()

        if ( toolsJar.exists() )
        {
            cl.addURL( toolsJar.toURL() );
        }

        Class c = cl.loadClass( "com.sun.tools.javac.Main" );

        ByteArrayOutputStream err = new ByteArrayOutputStream();

        Method compile = c.getMethod( "compile", new Class[]{String[].class} );
View Full Code Here

Examples of org.apache.openejb.core.TemporaryClassLoader.loadClass()

        for (Container container : standardContext.findChildren()) {
            if (container instanceof Wrapper) {
                Wrapper wrapper = (Wrapper) container;
                String servletClass = wrapper.getServletClass();
                try {
                    Class<?> clazz = tempClassLoader.loadClass(servletClass);
                    if (JaxWsUtils.isWebService(clazz)) {
                        wrapper.setServletClass(WsServlet.class.getName());
                        if (getServlet(wrapper) != null) {
                            wrapper.load();
                            wrapper.unload();
View Full Code Here

Examples of org.apache.roller.util.StandaloneWebappClassLoader.loadClass()

      
        // We're using the new classloader from here on out
        Thread.currentThread().setContextClassLoader(cl);

        // Go!
        Class taskClass = cl.loadClass(taskClassName);
        Runnable task = (Runnable)taskClass.newInstance();
        task.run();
    }
}
View Full Code Here

Examples of org.apache.roller.weblogger.util.StandaloneWebappClassLoader.loadClass()

      
        // We're using the new classloader from here on out
        Thread.currentThread().setContextClassLoader(cl);

        // Go!
        Class taskClass = cl.loadClass(taskClassName);
        Runnable task = (Runnable)taskClass.newInstance();
        task.run();
    }
}
View Full Code Here

Examples of org.apache.s4.base.util.S4RLoader.loadClass()

            String appClassName = s4rFile.getManifest().getMainAttributes().getValue(MANIFEST_S4_APP_CLASS);
            logger.info("App class name is: " + appClassName);
            App app = null;

            try {
                Object o = (cl.loadClass(appClassName)).newInstance();
                app = (App) o;
                injector.injectMembers(app);
            } catch (Exception e) {
                logger.error("Could not load s4 application form s4r file [{" + s4r.getAbsolutePath() + "}]", e);
                return null;
View Full Code Here

Examples of org.apache.tools.ant.AntClassLoader.loadClass()

      try {
        class_file = getClassNameFromClassFile(class_file);
        System.out.println(class_file);
//        if (class_file.endsWith(".class") == true) {
          logMsgIfVerbose(I18N_PROCESSING_CLASS, class_file);
          Class clazz = classloader.loadClass(class_file);
          logMsgIfVerbose(I18N_LOADED_CLASS, clazz);

          if (processI18NClass(clazz) == false) {
            logMsgIfVerbose(I18N_CLASS_IGNORED, clazz);
          }
View Full Code Here

Examples of org.apache.tuscany.common.resource.ResourceLoader.loadClass()

            ResourceLoader resourceLoader = loaderContext.getResourceLoader();
            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
            try {
                // set TCCL as SDO needs it
                Thread.currentThread().setContextClassLoader(resourceLoader.getClassLoader());
                Class<?> factoryClass = resourceLoader.loadClass(factoryName);
                SDOUtil.registerStaticTypes(factoryClass);
            } catch (ClassNotFoundException e) {
                throw new ConfigurationLoadException(e.getMessage(), e);
            } finally {
                Thread.currentThread().setContextClassLoader(oldCL);
View Full Code Here

Examples of org.apache.tuscany.sca.contribution.util.ServiceDeclaration.loadClass()

            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
View Full Code Here

Examples of org.apache.tuscany.sca.extensibility.ServiceDeclaration.loadClass()

            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
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.