Package org.impalaframework.module.holder.graph

Examples of org.impalaframework.module.holder.graph.GraphClassLoaderFactory


        InternalModuleDefinitionSource source = new InternalModuleDefinitionSource(typeReaderRegistry, resolver, new String[]{"impala-core", "sample-module4", "sample-module6"});

        RootModuleDefinition rootDefinition = source.getModuleDefinition();
       
        DependencyManager dependencyManager = new DependencyManager(rootDefinition);
        GraphClassLoaderFactory factory = new GraphClassLoaderFactory();
        factory.setModuleLocationResolver(resolver);
       
        GraphClassLoader rootClassLoader = factory.newClassLoader(new GraphClassLoaderRegistry(), dependencyManager, rootDefinition);
        return rootClassLoader;
    }
View Full Code Here


        f depends on b, e
        g on c, d, f
         */
       
        dependencyManager = new TestDependencyManager(definitions);
        factory = new GraphClassLoaderFactory();
        classLoaderRegistry = new GraphClassLoaderRegistry();
        factory.setModuleLocationResolver(new TestClassResolver());
        dependencyManager.unfreeze();
    }
View Full Code Here

        InternalModuleDefinitionSource source = new InternalModuleDefinitionSource(typeReaderRegistry, resolver, new String[]{"impala-core", "sample-module4", "sample-module6"});

        RootModuleDefinition rootDefinition = source.getModuleDefinition();
       
        DependencyManager dependencyManager = new DependencyManager(rootDefinition);
        GraphClassLoaderFactory factory = new GraphClassLoaderFactory();
        factory.setModuleLocationResolver(resolver);
       
        GraphClassLoader rootClassLoader = factory.newClassLoader(classLoaderRegistry, dependencyManager, rootDefinition);
       
        System.out.println(rootClassLoader);
        String lineSeparator = System.getProperty("line.separator");
       
        assertEquals("Class loader for impala-core" + lineSeparator +
                "Options: ClassLoaderOptions [parentLoaderFirst=true, supportsModuleLibraries=true, exportsModuleLibraries=true, loadsModuleLibraryResources=true]" + lineSeparator, rootClassLoader.toString());
       
        ModuleDefinition moduleDefinition6 = rootDefinition.findChildDefinition("sample-module6", true);
       
        GraphClassLoader definition6Loader = factory.newClassLoader(classLoaderRegistry, dependencyManager, moduleDefinition6);
        System.out.println(definition6Loader);
       
        assertEquals(
                "Class loader for sample-module6" + lineSeparator +
                "Options: ClassLoaderOptions [parentLoaderFirst=true, supportsModuleLibraries=true, exportsModuleLibraries=true, loadsModuleLibraryResources=true]" + lineSeparator +
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        classLoaderRegistry = new GraphClassLoaderRegistry();
        factory = new GraphClassLoaderFactory();
        factory.setModuleLocationResolver(new TestClassResolver());
        factory.setOptions(new ClassLoaderOptions(true, true , true, true));
        factory.init();
        List<ModuleDefinition> definitions = new ArrayList<ModuleDefinition>();
       
View Full Code Here

TOP

Related Classes of org.impalaframework.module.holder.graph.GraphClassLoaderFactory

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.