org.teatrove.tea.compiler
Class JavaClassGenerator
java.lang.Object
org.teatrove.tea.compiler.CodeGenerator
org.teatrove.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();
- Author:
- Brian S O'Neill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXECUTE_METHOD_NAME
public static final String EXECUTE_METHOD_NAME
- See Also:
- Constant Field Values
PARAMETER_METHOD_NAME
public static final String PARAMETER_METHOD_NAME
- See Also:
- Constant Field Values
JavaClassGenerator
public JavaClassGenerator(CompilationUnit unit)
writeTo
public void writeTo(OutputStream out)
throws IOException
- Specified by:
writeTo in class CodeGenerator
- Throws:
IOException
generateTemplateParameters
protected void generateTemplateParameters(Template t,
ClassFile classFile)
generateTemplate
protected void generateTemplate(Template t,
String className,
ClassFile classFile)
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.