Examples of CeylonClassLoader


Examples of com.redhat.ceylon.launcher.CeylonClassLoader

    }
   
    public static CeylonClassLoader getCeylonClassLoaderCachedInProject(final Project project) throws ClassLoaderSetupException {
        Object classLoader = project.getReference(CEYLON_CLASSLOADER_REFERENCE);
        if(classLoader != null){
            CeylonClassLoader oldLoader = (CeylonClassLoader) classLoader;
            // make sure it's still valid
            try{
                List<File> classPath = CeylonClassLoader.getClassPath();
                if(oldLoader.hasSignature(CeylonClassLoader.getClassPathSignature(classPath))){
                    // compatible
                    return oldLoader;
                }else{
                    project.log("Needs a new class loader: cp changed!", Project.MSG_VERBOSE);
                    CeylonClassLoader loader = CeylonClassLoader.newInstance(classPath);
                    project.addReference(CEYLON_CLASSLOADER_REFERENCE, loader);
                    return loader;
                }
            }catch(FileNotFoundException x){
                throw new ClassLoaderSetupException(x);
            } catch (URISyntaxException x) {
                throw new ClassLoaderSetupException(x);
            } catch (MalformedURLException x) {
                throw new ClassLoaderSetupException(x);
            }
        }
        CeylonClassLoader loader = Launcher.getClassLoader();
        project.addReference(CEYLON_CLASSLOADER_REFERENCE, loader);
        // only add the build listed once, even if we change the class loader later
        project.addBuildListener(new BuildListener(){

            @Override
View Full Code Here

Examples of com.redhat.ceylon.launcher.CeylonClassLoader

    @Override
    public void execute() throws BuildException {
        Java7Checker.check();
        ModuleDescriptorReader reader;
        try{
            CeylonClassLoader loader = Util.getCeylonClassLoaderCachedInProject(getProject());
            try {
                reader = new ModuleDescriptorReader(loader, module.getName(), getSrc());
            } catch (NoSuchModuleException e) {
                throw new BuildException("Failed to load module", e);
            }
View Full Code Here

Examples of com.redhat.ceylon.launcher.CeylonClassLoader

        String[] files = ds.getIncludedFiles();
        log("<sourcemodules> found files " + Arrays.toString(files), Project.MSG_VERBOSE);
        URI base = dir.toURI();
        LinkedHashSet<Module> result = new LinkedHashSet<Module>();
        try{
            CeylonClassLoader loader = Util.getCeylonClassLoaderCachedInProject(getProject());
            for (String file : files) {
                URI uri = new File(this.dir, file).getParentFile().toURI();
                log("<sourcemodules> file " + file + "=> uri " + uri, Project.MSG_VERBOSE);
                String moduleName = base.relativize(uri).getPath().replace('/', '.');
                if (moduleName.endsWith(".")) {
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.