Package groovy.lang.GroovyClassLoader

Examples of groovy.lang.GroovyClassLoader.ClassCollector


    CompilerConfiguration configuration = this.loader.getConfiguration();

    CompilationUnit compilationUnit = new CompilationUnit(configuration, null,
        this.loader);
    ClassCollector collector = this.loader.createCollector(compilationUnit, null);
    compilationUnit.setClassgenCallback(collector);

    for (String source : sources) {
      List<String> paths = ResourceUtils.getUrls(source, this.loader);
      for (String path : paths) {
        compilationUnit.addSource(new URL(path));
      }
    }

    addAstTransformations(compilationUnit);

    compilationUnit.compile(Phases.CLASS_GENERATION);
    for (Object loadedClass : collector.getLoadedClasses()) {
      classes.add((Class<?>) loadedClass);
    }
    ClassNode mainClassNode = getMainClass(compilationUnit);

    Class<?> mainClass = null;
View Full Code Here

TOP

Related Classes of groovy.lang.GroovyClassLoader.ClassCollector

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.