Package org.drools.core.common

Examples of org.drools.core.common.ProjectClassLoader


                            CompositeKnowledgeBuilder ckbuilder) {
        Set<String> modifiedPackages = new HashSet<String>();
        if (!modifiedClasses.isEmpty()) {
            ClassLoader rootClassLoader = pkgbuilder.getRootClassLoader();
            if ( rootClassLoader instanceof ProjectClassLoader) {
                ProjectClassLoader projectClassLoader = (ProjectClassLoader) rootClassLoader;
                projectClassLoader.reinitTypes();
                for (String resourceName : modifiedClasses) {
                    String className = convertResourceToClassName( resourceName );
                    byte[] bytes = newKM.getBytes(resourceName);
                    Class<?> clazz = projectClassLoader.defineClass(className, resourceName, bytes);
                    modifiedPackages.add(clazz.getPackage().getName());
                }
                pkgbuilder.setAllRuntimesDirty(modifiedPackages);
            }
        }
View Full Code Here


                            CompositeKnowledgeBuilder ckbuilder) {
        Set<String> modifiedPackages = new HashSet<String>();
        if (!modifiedClasses.isEmpty()) {
            ClassLoader rootClassLoader = kbuilder.getRootClassLoader();
            if ( rootClassLoader instanceof ProjectClassLoader) {
                ProjectClassLoader projectClassLoader = (ProjectClassLoader) rootClassLoader;
                projectClassLoader.reinitTypes();
                for (String resourceName : modifiedClasses) {
                    String className = convertResourceToClassName( resourceName );
                    byte[] bytes = newKM.getBytes(resourceName);
                    Class<?> clazz = projectClassLoader.defineClass(className, resourceName, bytes);
                    modifiedPackages.add(clazz.getPackage().getName());
                }
                kbuilder.setAllRuntimesDirty(modifiedPackages);
            }
        }
View Full Code Here

    public ClassLoader getClassLoader() {
        return this.cl;
    }

    public ClassLoader getClonedClassLoader() {
        ProjectClassLoader clonedCL = createProjectClassLoader( cl.getParent() );
        initClassLoader( clonedCL );
        return clonedCL;
    }
View Full Code Here

                            CompositeKnowledgeBuilder ckbuilder) {
        Set<String> modifiedPackages = new HashSet<String>();
        if (!modifiedClasses.isEmpty()) {
            ClassLoader rootClassLoader = kbuilder.getRootClassLoader();
            if ( rootClassLoader instanceof ProjectClassLoader) {
                ProjectClassLoader projectClassLoader = (ProjectClassLoader) rootClassLoader;
                projectClassLoader.reinitTypes();
                for (String resourceName : modifiedClasses) {
                    String className = convertResourceToClassName( resourceName );
                    byte[] bytes = newKM.getBytes(resourceName);
                    Class<?> clazz = projectClassLoader.defineClass(className, resourceName, bytes);
                    modifiedPackages.add(clazz.getPackage().getName());
                }
                kbuilder.setAllRuntimesDirty(modifiedPackages);
            }
        }
View Full Code Here

                ksession.getKieBase()
        ).thenReturn(
                knowledgeBase
        );

        ProjectClassLoader classLoader = ProjectClassLoader.createProjectClassLoader();
        when(
                knowledgeBase.getRootClassLoader()
        ).thenReturn(
                classLoader
        );
View Full Code Here

    public ClassLoader getClassLoader() {
        return this.cl;
    }

    public ClassLoader getClonedClassLoader() {
        ProjectClassLoader clonedCL = createProjectClassLoader( cl.getParent(), createKieModuleResourceProvider(kieModule) );
        initClassLoader( clonedCL );
        return clonedCL;
    }
View Full Code Here

    public ClassLoader getClassLoader() {
        return this.cl;
    }

    public ClassLoader getClonedClassLoader() {
        ProjectClassLoader clonedCL = createProjectClassLoader(cl.getParent());
        initClassLoader(clonedCL);
        return clonedCL;
    }
View Full Code Here

                            CompositeKnowledgeBuilder ckbuilder) {
        Set<String> modifiedPackages = new HashSet<String>();
        if (!modifiedClasses.isEmpty()) {
            ClassLoader rootClassLoader = kbuilder.getRootClassLoader();
            if ( rootClassLoader instanceof ProjectClassLoader) {
                ProjectClassLoader projectClassLoader = (ProjectClassLoader) rootClassLoader;
                projectClassLoader.reinitTypes();
                for (String resourceName : modifiedClasses) {
                    String className = convertResourceToClassName( resourceName );
                    byte[] bytes = newKM.getBytes(resourceName);
                    Class<?> clazz = projectClassLoader.defineClass(className, resourceName, bytes);
                    modifiedPackages.add(clazz.getPackage().getName());
                }
                kbuilder.setAllRuntimesDirty(modifiedPackages);
            }
        }
View Full Code Here

    public ClassLoader getClassLoader() {
        return this.cl;
    }

    public ClassLoader getClonedClassLoader() {
        ProjectClassLoader clonedCL = createProjectClassLoader( cl.getParent() );
        initClassLoader( clonedCL );
        return clonedCL;
    }
View Full Code Here

    private StandaloneTraitFactory factory;

    @Before
    public void init() {
        ProjectClassLoader loader = ProjectClassLoader.createProjectClassLoader();
        factory = new StandaloneTraitFactory( loader );
    }
View Full Code Here

TOP

Related Classes of org.drools.core.common.ProjectClassLoader

Copyright © 2018 www.massapicom. 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.