Package org.gradle.internal.classloader

Examples of org.gradle.internal.classloader.MutableURLClassLoader$Spec


    private final ClassLoader parent;

    public ScriptClassLoader(ClassLoader parent) {
        super(parent);
        this.parent = parent;
        this.mutableClassLoader = new MutableURLClassLoader(parent);
        addParent(mutableClassLoader);
    }
View Full Code Here


                    }
                }
                cachedClassPath.add(url);
            }

            return new MutableURLClassLoader(parents.get(0), cachedClassPath);
        }
        return delegate.getClassLoaderFor(spec, parents);
    }
View Full Code Here

        filteredWorkerClassLoader.allowClass(Action.class);
        filteredWorkerClassLoader.allowClass(WorkerContext.class);

        ClassLoader applicationClassLoader = workerContext.getApplicationClassLoader();
        FilteringClassLoader filteredApplication = new FilteringClassLoader(applicationClassLoader);
        MutableURLClassLoader implementationClassLoader = createImplementationClassLoader(filteredWorkerClassLoader,
                filteredApplication);

        // Configure classpaths
        for (String sharedPackage : sharedPackages) {
            filteredApplication.allowPackage(sharedPackage);
        }
        implementationClassLoader.addURLs(implementationClassPath);

        // Deserialize the worker action
        Action<WorkerContext> action;
        try {
            ObjectInputStream instr = new ClassLoaderObjectInputStream(new ByteArrayInputStream(serializedWorkerAction),
View Full Code Here

    LoggingManagerInternal createLoggingManager() {
        return LoggingServiceRegistry.newProcessLogging().newInstance(LoggingManagerInternal.class);
    }

    MutableURLClassLoader createImplementationClassLoader(ClassLoader system, ClassLoader application) {
        return new MutableURLClassLoader(new CachingClassLoader(new MultiParentClassLoader(application, system)));
    }
View Full Code Here

        // Wrap our real classloader in one that hides the parent.
        // TODO - move this into FilteringClassLoader
        MultiParentClassLoader parentObfuscatingClassLoader = new MultiParentClassLoader(classLoader);
        FilteringClassLoader filteringClassLoader = new FilteringClassLoader(parentObfuscatingClassLoader);
        filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
        return new MutableURLClassLoader(filteringClassLoader, implementationClasspath.getAsURLArray());
    }
View Full Code Here

        ClassPathRegistry classPathRegistry = new DefaultClassPathRegistry(new DefaultClassPathProvider(new DefaultModuleRegistry()));
        ClassLoaderFactory classLoaderFactory = new DefaultClassLoaderFactory();
        ClassPath antClasspath = classPathRegistry.getClassPath("ANT");
        ClassPath runtimeClasspath = classPathRegistry.getClassPath("GRADLE_RUNTIME");
        ClassLoader antClassLoader = classLoaderFactory.createIsolatedClassLoader(antClasspath);
        ClassLoader runtimeClassLoader = new MutableURLClassLoader(antClassLoader, runtimeClasspath);
        Thread.currentThread().setContextClassLoader(runtimeClassLoader);
        Class<?> mainClass = runtimeClassLoader.loadClass(mainClassName);
        Object entryPoint = mainClass.newInstance();
        Method mainMethod = mainClass.getMethod("run", String[].class);
        mainMethod.invoke(entryPoint, new Object[]{args});
    }
View Full Code Here

TOP

Related Classes of org.gradle.internal.classloader.MutableURLClassLoader$Spec

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.