Examples of loadClass()


Examples of org.drools.rule.CompositeClassLoader.loadClass()

        CompositeClassLoader rootClassloader = new CompositeClassLoader( Thread.currentThread().getContextClassLoader() );
        JavaDialectRuntimeData dialectData = (JavaDialectRuntimeData) bp.getDialectRuntimeRegistry().getDialectData( "java" );
        dialectData.onAdd( bp.getDialectRuntimeRegistry(),
                           rootClassloader );

        Class newBean = rootClassloader.loadClass( "org.test.NewBean" );
        assertNotNull( newBean );
    }

    public void testPackageMerge() throws Exception {
        final PackageBuilder builder = new PackageBuilder();
View Full Code Here

Examples of org.drools.rule.DroolsCompositeClassLoader.loadClass()

                                                                                     false );
        JavaDialectRuntimeData dialectData = (JavaDialectRuntimeData) bp.getDialectRuntimeRegistry().getDialectData( "java" );
        dialectData.onAdd( bp.getDialectRuntimeRegistry(),
                           rootClassloader );

        Class newBean = rootClassloader.loadClass( "org.test.NewBean" );
        assertNotNull( newBean );
    }

    public void testPackageMerge() throws Exception {
        final PackageBuilder builder = new PackageBuilder();
View Full Code Here

Examples of org.drools.rule.JavaDialectRuntimeData.PackageClassLoader.loadClass()

       
        ClassFieldAccessorStore store = new ClassFieldAccessorStore();
        store.setClassFieldAccessorCache( new ClassFieldAccessorCache( classLoader ) );
        store.setEagerWire( true );
       
        Class clazz = classLoader.loadClass( classDef.getClassName() );
        classDef.setDefinedClass( clazz );
       
        return clazz;
       
    }
View Full Code Here

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

                                                                               false );
        JavaDialectRuntimeData dialectData = (JavaDialectRuntimeData) bp.getDialectRuntimeRegistry().getDialectData( "java" );
        dialectData.onAdd( bp.getDialectRuntimeRegistry(),
                           rootClassloader );

        Class newBean = rootClassloader.loadClass( "org.test.NewBean" );
        assertNotNull( newBean );
    }

    @Test
    public void testPackageMerge() throws Exception {
View Full Code Here

Examples of org.eclipse.osgi.internal.loader.BundleLoader.loadClass()

    }
    BundleLoader loader = checkLoader();
    if (loader == null)
      throw new ClassNotFoundException(NLS.bind(Msg.BUNDLE_CNFE_NOT_RESOLVED, name, getBundleData().getLocation()));
    try {
      return (loader.loadClass(name));
    } catch (ClassNotFoundException e) {
      // this is to support backward compatibility in eclipse
      // we always attempted to start a bundle even if the class was not found
      if (!(e instanceof StatusException) && (bundledata.getStatus() & Constants.BUNDLE_LAZY_START) != 0 && !testStateChanging(Thread.currentThread()))
        try {
View Full Code Here

Examples of org.eclipse.persistence.sdo.helper.SDOClassLoader.loadClass()

        if ((javaClass == null) && (javaClassName != null)) {
            try {
                SDOClassLoader loader = ((SDOXMLHelper)aHelperContext.getXMLHelper()).getLoader();
                if (!isDataType() && (javaImplClass == null)) {
                    //Class interfaceClass = loader.loadClass(getInstanceClassName(), this);
                    javaImplClass = loader.loadClass(getImplClassName(), this);
                    getXmlDescriptor().setJavaClass(javaImplClass);
                }
                javaClass = loader.loadClass(javaClassName, this);
            } catch (ClassNotFoundException e) {
                throw SDOException.classNotFound(e, getURI(), getName());
View Full Code Here

Examples of org.entityfs.util.lang.EntityClassLoader.loadClass()

  {
    compileClass("HeliDBDocTest", s, targetDir);
    ClassLoader cl = new EntityClassLoader(targetDir.getFileSystem().getLogAdapterHolder(), Thread.currentThread().getContextClassLoader(), Collections.singletonList(targetDir));
    try
    {
      Class<?> c = cl.loadClass("HeliDBDocTest");
      Object o = c.newInstance();
      return c.getMethod("runTest", new Class[] { Object[].class }).invoke(o, new Object[] { args });
    }
    catch (Exception e)
    {
View Full Code Here

Examples of org.gatein.common.classloader.DelegatingClassLoader.loadClass()

        if (enabled) {
            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
            ClassLoader oauth = OAuthProviderType.class.getClassLoader();
            ClassLoader delegating = new DelegatingClassLoader(tccl, oauth);
            Class<OAuthProviderProcessor<T>> processorClass = (Class<OAuthProviderProcessor<T>>)delegating.loadClass(oauthProviderProcessorClass);
            OAuthProviderProcessor<T> oauthProviderProcessor = containerContext.getContainer().getComponentInstanceOfType(processorClass);

            OAuthPrincipalProcessor principalProcessor = null;
            Class<OAuthPrincipalProcessor> principalProcessorClass = (Class<OAuthPrincipalProcessor>) (principalProcessorClassName != null ? delegating
                    .loadClass(principalProcessorClassName) : DefaultPrincipalProcessor.class);
View Full Code Here

Examples of org.glassfish.hk2.api.HK2Loader.loadClass()

        if (loader == null) {
            return getClass().getClassLoader().loadClass(type);
        }
       
        try {
            return loader.loadClass(type);
        }
        catch (MultiException me) {
            for (Throwable th : me.getErrors()) {
                if (th instanceof ClassNotFoundException) {
                    throw (ClassNotFoundException) th;
View Full Code Here

Examples of org.gocha.jvm.MemoryClassLoader.loadClass()

        try{
            byte[] data = FileUtil.readAllData(new FileInputStream(bytecodeClassFile), true);
            MemoryByteCode byteCode = new MemoryByteCode(clsName, data);
            MemoryClassLoader memClassLoader = new MemoryClassLoader();
            memClassLoader.getClassDataMap().put(clsName, byteCode);
            Class cls = memClassLoader.loadClass(clsName);
           
            Constructor constr = cls.getConstructor(Map.class);
            Object inst = constr.newInstance(mmap);
           
            TemplateCompiler.CompileResult res = new CompileResult(
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.