com.go.tea.util
Class TestCompiler

java.lang.Object
  |
  +--com.go.tea.compiler.Compiler
        |
        +--com.go.tea.util.AbstractFileCompiler
              |
              +--com.go.tea.util.FileCompiler
                    |
                    +--com.go.tea.util.TestCompiler

public class TestCompiler
extends FileCompiler

A compiler implementation suitable for testing from a command console. The runtime context is a PrintStream so that template output can go to standard out.

Templates are read from files that must have the extension ".tea". The code generated are Java class files which are written in the same directory as the source files. Compilation error messages are sent to standard out.

Version:
19 , 9/07/00
Author:
Brian S O'Neill

Inner Class Summary
static class TestCompiler.Context
           
 
Inner classes inherited from class com.go.tea.util.FileCompiler
FileCompiler.Unit
 
Constructor Summary
TestCompiler(java.io.File rootSourceDir, java.lang.String rootPackage, java.io.File rootDestDir)
           
 
Method Summary
static void main(java.lang.String[] args)
          Entry point for a command-line tool suitable for compiling Tea templates to be bundled with a product.
 
Methods inherited from class com.go.tea.util.FileCompiler
compileAll, createCompilationUnit, getAllTemplateNames, setForceCompile, sourceExists
 
Methods inherited from class com.go.tea.util.AbstractFileCompiler
compileAll
 
Methods inherited from class com.go.tea.compiler.Compiler
addErrorListener, addStatusListener, compile, compile, createCodeGenerator, createParser, createScanner, createSourceReader, createTypeChecker, getClassLoader, getCompilationUnit, getErrorCount, getImportedPackages, getRuntimeContext, getRuntimeContextMethods, getRuntimeReceiver, getRuntimeStringConverter, getStringConverterMethods, isCodeGenerationEnabled, isExceptionGuardianEnabled, loadClass, preserveParseTree, removeErrorListener, removeStatusListener, setClassLoader, setCodeGenerationEnabled, setExceptionGuardianEnabled, setRuntimeContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCompiler

public TestCompiler(java.io.File rootSourceDir,
                    java.lang.String rootPackage,
                    java.io.File rootDestDir)
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Description copied from class: FileCompiler
Entry point for a command-line tool suitable for compiling Tea templates to be bundled with a product. Templates are read from files that must have the extension ".tea", and any compilation error messages are sent to standard out.
 Usage: java com.go.tea.util.FileCompiler {options} 
 <template root directory> {templates}

 where {options} includes:
 -context <class>     Specify a runtime context class to compile against.
 -dest <directory>    Specify where to place generated class files.
 -force               Compile all templates, even if up-to-date.
 -package <package>   Root package to compile templates into.
 -encoding <encoding> Specify character encoding used by source files.
 -guardian            Enable the exception guardian.