Package com.intellij.ant

Examples of com.intellij.ant.PseudoClassLoader


  public JavaBuilder(ExecutorService tasksExecutor) {
    myJavacCompiler = new EmbeddedJavac(tasksExecutor);
    //add here class processors in the sequence they should be executed
    myJavacCompiler.addClassProcessor(new EmbeddedJavac.ClassPostProcessor() {
      public void process(CompileContext context, OutputFileObject out) {
        final PseudoClassLoader loader = PSEUDO_CLASSLOADER_KEY.get(context);
        if (loader != null) {
          final String className = out.getClassName();
          if (className != null) {
            //noinspection SynchronizationOnLocalVariableOrMethodParameter
            synchronized (loader) {
              loader.defineClass(className.replace('.', '/'), out.getContent().toByteArray());
            }
          }
        }
      }
    });
View Full Code Here


    for (Collection<File> cp : Arrays.asList(platformCp, classpath)) {
      for (File file : cp) {
        urls.add(file.toURI().toURL());
      }
    }
    final PseudoClassLoader pseudoLoader = new PseudoClassLoader(urls.toArray(new URL[urls.size()]));
    PSEUDO_CLASSLOADER_KEY.set(context, pseudoLoader);

    final DiagnosticSink diagnosticSink = new DiagnosticSink(context);
    final OutputFilesSink outputSink = new OutputFilesSink(context);
View Full Code Here

TOP

Related Classes of com.intellij.ant.PseudoClassLoader

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.