com.agimatec.annotations.jam
Class JAMTestGenerator

java.lang.Object
  extended by com.agimatec.annotations.jam.JAMTestGenerator

public class JAMTestGenerator
extends Object

Description: Tool to generate files per class or one file for all classes based on freemarker templates. Input is a collection of JClass, that has been parsed with JAM.
User: roman.stumm
Date: 08.06.2007
Time: 09:20:25
Copyright: Agimatec GmbH


Constructor Summary
JAMTestGenerator()
           
 
Method Summary
 JAMGenInstruction addInstruction(String templateBaseName, String outputDir, String outputFile)
           
 String capitalize(String string)
          replacement for the freemarker build-in ?
 void generate(Collection<org.codehaus.jam.JClass> classes)
          API - start all code generation.
static String getCurrentEntity()
           
static JAMGenInstruction getCurrentInstruction()
           
static JAMTestClass getJAMClass(String qualifiedName)
           
 String getTemplateDir()
           
 void setTemplateDir(String templateDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAMTestGenerator

public JAMTestGenerator()
Method Detail

getTemplateDir

public String getTemplateDir()

setTemplateDir

public void setTemplateDir(String templateDir)

capitalize

public String capitalize(String string)
replacement for the freemarker build-in ?capitalize: this creates a capatialized string according to java property standards. Freemarker instead lowers all characters expect the first one.

Parameters:
string -
Returns:

getCurrentInstruction

public static JAMGenInstruction getCurrentInstruction()

getCurrentEntity

public static String getCurrentEntity()

getJAMClass

public static JAMTestClass getJAMClass(String qualifiedName)

addInstruction

public JAMGenInstruction addInstruction(String templateBaseName,
                                        String outputDir,
                                        String outputFile)
Parameters:
templateBaseName -
outputDir -
outputFile -

generate

public void generate(Collection<org.codehaus.jam.JClass> classes)
              throws IOException,
                     freemarker.template.TemplateException
API - start all code generation.

Parameters:
classes - - the classes visible to the generator for processing, parsed with JAM
Throws:
IOException
freemarker.template.TemplateException


Copyright © 2008-2013. All Rights Reserved.