com.go.tea.compiler
Class JavaClassGenerator

java.lang.Object
  |
  +--com.go.tea.compiler.CodeGenerator
        |
        +--com.go.tea.compiler.JavaClassGenerator

public class JavaClassGenerator
extends CodeGenerator

The JavaClassGenerator compiles a template into a single Java class file. A template is compiled such that it has two static methods, execute and getTemplateParameterNames. The signatures are:

     public static void execute(RuntimeContext, params ...) throws Exception;

     public static String[] getTemplateParameterNames();
 

Version:
105 , 01/05/31
Author:
Brian S O'Neill

Field Summary
static java.lang.String EXECUTE_METHOD_NAME
           
static java.lang.String PARAMETER_METHOD_NAME
           
 
Constructor Summary
JavaClassGenerator(CompilationUnit unit)
           
 
Method Summary
 void writeTo(java.io.OutputStream out)
           
 
Methods inherited from class com.go.tea.compiler.CodeGenerator
getParseTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXECUTE_METHOD_NAME

public static final java.lang.String EXECUTE_METHOD_NAME

PARAMETER_METHOD_NAME

public static final java.lang.String PARAMETER_METHOD_NAME
Constructor Detail

JavaClassGenerator

public JavaClassGenerator(CompilationUnit unit)
Method Detail

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException
Overrides:
writeTo in class CodeGenerator