Package com.dragome.compiler

Examples of com.dragome.compiler.DragomeJsCompiler


      assembly.setEntryPointClassName(mainClass.getName());
      assembly.setTargetLocation(new File(target));

      DragomeConfigurator configurator= ServiceLocator.getInstance().getConfigurator();
     
      DragomeJsCompiler compiler= new DragomeJsCompiler(configurator.getDefaultCompilerType());
      //      compiler.setBasedir(basedir);
      compiler.addClasspathElements(classpathElements);
      compiler.addClasspathFilter(new FileFilter()
      {
        public boolean accept(File pathname)
        {
          return !pathname.toString().contains("/serverside");
        }
      });

      if (configurator != null)
        compiler.setBytecodeTransformer(configurator.getBytecodeTransformer());

      compiler.addAssembly(assembly);
      compiler.setGenerateLineNumbers(false);
      compiler.setCompression(false);
      compiler.execute();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here


  }

  public static void main(String[] args) throws Exception
  {
    String className= args[0];
    DragomeJsCompiler.compiler= new DragomeJsCompiler(CompilerType.Standard);

    Project.createSingleton(null);
    ClassUnit classUnit= new ClassUnit(Project.singleton, Project.singleton.getSignature(className));
    classUnit.setClassFile(new FileObject(new File(args[1])));
    Parser parser= new Parser(classUnit);
View Full Code Here

      assembly.setEntryPointClassName(mainClass.getName());
      assembly.setTargetLocation(new File(target));

      DragomeConfigurator configurator= ServiceLocator.getInstance().getConfigurator();

      DragomeJsCompiler compiler= new DragomeJsCompiler(configurator.getDefaultCompilerType());
      //      compiler.setBasedir(basedir);
      compiler.addClasspathElements(classpathElements);
      compiler.addClasspathFilter(new FileFilter()
      {
        public boolean accept(File pathname)
        {
          return !pathname.toString().contains(File.separator + "serverside");
        }
      });

      if (configurator != null)
        compiler.setBytecodeTransformer(configurator.getBytecodeTransformer());

      compiler.addAssembly(assembly);
      compiler.setGenerateLineNumbers(false);
      compiler.setCompression(false);
      compiler.execute();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of com.dragome.compiler.DragomeJsCompiler

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.