org.teatrove.tea.util
Class TestCompiler

java.lang.Object
  extended by org.teatrove.tea.compiler.Compiler
      extended by org.teatrove.tea.util.AbstractCompiler
          extended by org.teatrove.tea.util.FileCompiler
              extended by org.teatrove.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.

Author:
Brian S O'Neill

Nested Class Summary
static class TestCompiler.Context
           
 
Nested classes/interfaces inherited from class org.teatrove.tea.util.FileCompiler
FileCompiler.FileUnit, FileCompiler.JarredUnit, FileCompiler.Unit
 
Nested classes/interfaces inherited from class org.teatrove.tea.util.AbstractCompiler
AbstractCompiler.AbstractUnit
 
Field Summary
 
Fields inherited from class org.teatrove.tea.util.AbstractCompiler
mEncoding, mForce, mInjector, mPrecompiledTolerance, mRootDestDir, mRootPackage
 
Constructor Summary
TestCompiler(File rootSourceDir, String rootPackage, File rootDestDir)
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class org.teatrove.tea.util.FileCompiler
compile, compileAll, createCompilationUnit, getAllTemplateNames, setForceCompile, sourceExists
 
Methods inherited from class org.teatrove.tea.util.AbstractCompiler
compileAll, getRootPackage
 
Methods inherited from class org.teatrove.tea.compiler.Compiler
addErrorListener, addImportedPackage, addImportedPackages, addStatusListener, compile, createCodeGenerator, createParser, createScanner, createSourceReader, createTypeChecker, getClassLoader, getCompilationUnit, getErrorCount, getImportedPackages, getParseTree, 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(File rootSourceDir,
                    String rootPackage,
                    File rootDestDir)
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.