Package org.drools.core.common

Examples of org.drools.core.common.ProjectClassLoader


            <field name="issue_date"       type="java.util.Date"   value="issueDate"/>
        </dimension>
*/

    private Class build(ClassBuilder builder, ClassDefinition classDef) throws Exception {
        ProjectClassLoader prjClassLoader = ProjectClassLoader.createProjectClassLoader();
        byte[] d = builder.buildClass( classDef, prjClassLoader );
        JavaDialectRuntimeData data = new JavaDialectRuntimeData();
        data.write( convertClassToResourcePath(classDef.getClassName()), d );
        ClassLoader classLoader = new PackageClassLoader(data, prjClassLoader);
       
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 = 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

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

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

                    if( fileCount > 0 ) {
                        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

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

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

                knowledgeBase.getRuleBase()
        ).thenReturn(
                internalRuleBase
        );

        ProjectClassLoader classLoader = ProjectClassLoader.createProjectClassLoader();

        when(
                internalRuleBase.getRootClassLoader()
        ).thenReturn(
                classLoader
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.