Package groovy.lang

Examples of groovy.lang.GroovyClassLoader$ClassCollector


    }

    public GroovyScriptEngineImpl() {
        classMap = Collections.synchronizedMap(new HashMap<String, Class>());
        globalClosures = Collections.synchronizedMap(new HashMap<String, Closure>());
        loader = new GroovyClassLoader(getParentLoader(),
                new CompilerConfiguration());
    }
View Full Code Here


            savedLoader = thread.getContextClassLoader();
            thread.setContextClassLoader(GroovyShell.class.getClassLoader());
        }

        final String scriptName = computeScriptName();
        final GroovyClassLoader classLoader = new GroovyClassLoader(baseClassLoader);
        addClassPathes(classLoader);

        final GroovyShell groovy = new GroovyShell(classLoader, new Binding(), configuration);
        try {
            parseAndRunScript(groovy, txt, mavenPom, scriptName, null, new AntBuilder(this));
View Full Code Here

    private final GroovyClassLoader loader;

    @Inject public GroovyScriptEngineService(Settings settings) {
        super(settings);
        this.loader = new GroovyClassLoader(settings.getClassLoader());
    }
View Full Code Here

        return beanDefineHandler;
    }
   
    protected ClassLoader getClassLoader() {
      if (loader == null) {
        loader = new ClasspathGroovyLoader(new GroovyClassLoader());
      }
      return loader;
    }
View Full Code Here

      return loader;
    }
   
    protected ClassLoader getClassLoader(ClassLoader parent) {
      if (loader == null) {
        loader = new ClasspathGroovyLoader(new GroovyClassLoader(parent));
      }
      return loader;
    }
View Full Code Here

    }
   
    @Override
    public void setClassLoader(ClassLoader loader) {
        this.loader = loader;
      groovyLoader = new ClasspathGroovyLoader(new GroovyClassLoader(loader));
    }
View Full Code Here

      groovyLoader = new ClasspathGroovyLoader(new GroovyClassLoader(loader));
    }
   
    protected ClassLoader getGroovyLoader() {
      if (groovyLoader == null) {
        groovyLoader = new ClasspathGroovyLoader(new GroovyClassLoader(loader));
      }
      return groovyLoader;
    }
View Full Code Here

public class GroovyClassLoaderCache_test {

  public static void main(String[] args) throws Exception {
    ClasspathGroovyLoader loader = new ClasspathGroovyLoader();
    @SuppressWarnings("unused")
    GroovyClassLoader loader2 = new GroovyClassLoader();
    long start = System.currentTimeMillis();
    for (int i=0; i<100; i++) {
      //Thread.sleep(5000);
      Class<?> c = loader.loadClass("org/tamacat/groovy/test/Hello");
      System.out.println(ClassUtils.newInstance(c));
View Full Code Here

 
  /**
   * <p.default constructor
   */
  public ClasspathGroovyLoader() {
    this(new GroovyClassLoader());
  }
View Full Code Here

    // }
    // }
    // }

    // RootLoader loader = new RootLoader( config.getClassPathUrls(), );
    GroovyClassLoader groovyClassLoader = new GroovyClassLoader( SoapUI.class.getClassLoader() );
    SoapUIGroovyShell groovyShell = binding == null ? new SoapUIGroovyShell( groovyClassLoader )
        : new SoapUIGroovyShell( groovyClassLoader, binding );

    return groovyShell;
  }
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.