com.agimatec.annotations.jam
Class JAMDtoGenerator

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

public class JAMDtoGenerator
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
JAMDtoGenerator()
           
 
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 JAMDtoClass 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

JAMDtoGenerator

public JAMDtoGenerator()
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 JAMDtoClass 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.