Package org.stjs.generator

Examples of org.stjs.generator.GenerationDirectory


      }

      ClassLoader builtProjectClassLoader = new URLClassLoader(classpathElements.toArray(new URL[classpathElements.size()]), Thread
          .currentThread().getContextClassLoader());
      File sourceFolder = new File(path);
      GenerationDirectory targetFolder = new GenerationDirectory(new File(outputDir), null, null);
      File generationFolder = targetFolder.getAbsolutePath();

      GeneratorConfigurationBuilder configBuilder = new GeneratorConfigurationBuilder();
      configBuilder.allowedPackage(builtProjectClassLoader.loadClass(className).getPackage().getName());
      GeneratorConfiguration configuration = configBuilder.build();
View Full Code Here


    File relativeToClasspath = new File("/");
    if (generatedSourcesDirectoryVar.getAbsolutePath().length() > artifactPath.getAbsolutePath().length()) {
      relativeToClasspath = new File(generatedSourcesDirectoryVar.getAbsolutePath().substring(
          artifactPath.getAbsolutePath().length() + 1));
    }
    GenerationDirectory gendir = new GenerationDirectory(generatedSourcesDirectoryVar, classpath,
        relativeToClasspath);
    return gendir;
  }
View Full Code Here

  protected GenerationDirectory getGeneratedSourcesDirectory() {
    File baseDir = project.getBasedir();
    File classpath = new File(generatedTestSourcesDirectory.getAbsolutePath().substring(
        baseDir.getAbsolutePath().length() + 1));

    GenerationDirectory gendir = new GenerationDirectory(generatedTestSourcesDirectory, classpath, new File(""));
    return gendir;
  }
View Full Code Here

   * @return the javascript code generator from the given class
   */
  private static Object executeOrGenerate(Class<?> clazz, boolean execute, boolean withSourceMap) {

    File generationPath = new File("target", TEMP_GENERATION_PATH);
    GenerationDirectory generationFolder = new GenerationDirectory(generationPath, new File(TEMP_GENERATION_PATH), new File(""));
    String sourcePath = "src/test/java";
    File resourcePath = new File("src/test/resources");
    ClassWithJavascript stjsClass = gen.generateJavascript(Thread.currentThread().getContextClassLoader(), clazz.getName(), new File(
        sourcePath), generationFolder, new File("target", "test-classes"),
        new GeneratorConfigurationBuilder().allowedPackage("org.stjs.javascript").allowedPackage("org.stjs.generator")
View Full Code Here

TOP

Related Classes of org.stjs.generator.GenerationDirectory

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.