Package fr.insalyon.citi.golo.compiler

Examples of fr.insalyon.citi.golo.compiler.GoloClassLoader


  }

  private static void golo(GoloGoloCommand gologolo) throws Throwable {
    URLClassLoader primaryClassLoader = primaryClassLoader(gologolo.classpath);
    Thread.currentThread().setContextClassLoader(primaryClassLoader);
    GoloClassLoader loader = new GoloClassLoader(primaryClassLoader);
    Class<?> lastClass = null;
    for (String goloFile : gologolo.files) {
      lastClass = loadGoloFile(goloFile, gologolo.module, loader);
    }
    if (lastClass == null && gologolo.module != null) {
View Full Code Here


    }
    return data.iterator();
  }

  public static Class<?> compileAndLoadGoloModule(String sourceFolder, String goloFile) throws IOException, ParseException, ClassNotFoundException {
    return compileAndLoadGoloModule(sourceFolder, goloFile, new GoloClassLoader(TestUtils.class.getClassLoader()));
  }
View Full Code Here

public class CodeLoader {

  private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();

  public MethodHandle golo(String file, String func, int argCount) {
    GoloClassLoader classLoader = new GoloClassLoader();
    String filename = "snippets/golo/" + file + ".golo";
    Class<?> module = classLoader.load(filename, CodeLoader.class.getResourceAsStream("/" + filename));
    try {
      return LOOKUP.findStatic(module, func, MethodType.genericMethodType(argCount));
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
View Full Code Here

   * Creates an evaluation environment using a parent classloader.
   *
   * @param parentClassLoader the parent classloader.
   */
  public EvaluationEnvironment(ClassLoader parentClassLoader) {
    goloClassLoader = new GoloClassLoader(parentClassLoader);
  }
View Full Code Here

TOP

Related Classes of fr.insalyon.citi.golo.compiler.GoloClassLoader

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.