Package org.impalaframework.classloader

Examples of org.impalaframework.classloader.URLClassRetriever


  }
 
    ClassRetriever newResourceLoader(ModuleDefinition moduleDefinition) {
    final List<Resource> classLocations = moduleLocationResolver.getApplicationModuleClassLocations(moduleDefinition.getName());
    final File[] files = ResourceUtils.getFiles(classLocations);
    URLClassRetriever classLoader = new URLClassRetriever(files);
    return classLoader;
  }
View Full Code Here


  }
 
    ClassRetriever newResourceLoader(ModuleDefinition moduleDefinition) {
    final List<Resource> classLocations = moduleLocationResolver.getApplicationModuleClassLocations(moduleDefinition.getName());
    final File[] files = ResourceUtils.getFiles(classLocations);
    URLClassRetriever classLoader = new URLClassRetriever(files);
    return classLoader;
  }
View Full Code Here

    }
   
    ClassRetriever newResourceLoader(ModuleDefinition moduleDefinition) {
        final List<Resource> classLocations = moduleLocationResolver.getApplicationModuleClassLocations(moduleDefinition.getName());
        final File[] files = ResourceUtils.getFiles(classLocations);
        URLClassRetriever classLoader = new URLClassRetriever(files);
        return classLoader;
    }
View Full Code Here

            boolean loadLibraryResources) {
        ClassLoader defaultClassLoader = ClassUtils.getDefaultClassLoader();
        ModuleDefinition definition = null;
        ClassLoaderOptions loadParentFirst = new ClassLoaderOptions(true, true, true, true);
        DelegateClassLoader delegateClassLoader = null;
        ClassRetriever moduleResourceRetriever = new URLClassRetriever(new File[0]);
        LibraryAwareGraphClassLoader cl = new LibraryAwareGraphClassLoader(defaultClassLoader, delegateClassLoader, moduleResourceRetriever, moduleLibraryRetriever, definition, loadParentFirst);
        return cl;
    }
View Full Code Here

        LibraryAwareGraphClassLoader cl = new LibraryAwareGraphClassLoader(defaultClassLoader, delegateClassLoader, moduleResourceRetriever, moduleLibraryRetriever, definition, loadParentFirst);
        return cl;
    }
   
    public void testFindLibraryResources() throws Exception {
        ClassRetriever libraryRetriever = new URLClassRetriever(new File[]{new File("../sample-module3/lib/ant-launcher-1.7.0.jar")});
        LibraryAwareGraphClassLoader cl = newClassLoader(libraryRetriever, true);
        assertNotNull(cl.getLocalResource("org/apache/tools/ant/launch/Locator.class"));
    }
View Full Code Here

        LibraryAwareGraphClassLoader cl = newClassLoader(libraryRetriever, true);
        assertNotNull(cl.getLocalResource("org/apache/tools/ant/launch/Locator.class"));
    }
   
    public void testNotFindResources() throws Exception {
        ClassRetriever libraryRetriever = new URLClassRetriever(new File[]{new File("../sample-module3/lib/ant-launcher-1.7.0.jar")});
        LibraryAwareGraphClassLoader cl = newClassLoader(libraryRetriever, false);
        assertNotNull(cl.getLocalResource("org/apache/tools/ant/launch/Locator.class"));
    }
View Full Code Here

        if (classLoader instanceof GraphClassLoader) {
            GraphClassLoader gcl = (GraphClassLoader) classLoader;
            final ClassRetriever classRetriever = gcl.getClassRetriever();
           
            if (classRetriever instanceof URLClassRetriever) {
                URLClassRetriever retriever = (URLClassRetriever) classRetriever;
                final URLClassLoader urlClassLoader = retriever.getUrlClassLoader();
                final ClassLoader parent = gcl.getParent();
               
                return new JasperClassLoader(urlClassLoader.getURLs(), parent);
            }
        }
View Full Code Here

    }
   
    ClassRetriever newResourceLoader(ModuleDefinition moduleDefinition) {
        final List<Resource> classLocations = moduleLocationResolver.getApplicationModuleClassLocations(moduleDefinition.getName());
        final File[] files = ResourceUtils.getFiles(classLocations);
        URLClassRetriever classLoader = new URLClassRetriever(files);
        return classLoader;
    }
View Full Code Here

        }
        return null;
    }

    private ClassRetriever newResourcesRetriever(List<Resource> classLocations) {
        return new URLClassRetriever(ResourceUtils.getFiles(classLocations));
    }
View Full Code Here

    }
   
    ClassRetriever newResourceLoader(ModuleDefinition moduleDefinition) {
        final List<Resource> classLocations = moduleLocationResolver.getApplicationModuleClassLocations(moduleDefinition.getName());
        final File[] files = ResourceUtils.getFiles(classLocations);
        URLClassRetriever classLoader = new URLClassRetriever(files);
        return classLoader;
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.classloader.URLClassRetriever

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.