com.go.tea.util
Class StringCompiler

java.lang.Object
  |
  +--com.go.tea.compiler.Compiler
        |
        +--com.go.tea.util.StringCompiler

public class StringCompiler
extends Compiler

Simple compiler implementation that compiles a Tea template whose source is in a String. Call setTemplateSource to supply source code for templates before calling compile.

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

Constructor Summary
StringCompiler(ClassInjector injector)
           
 
Method Summary
protected  CompilationUnit createCompilationUnit(java.lang.String name)
           
 void setTemplateSource(java.lang.String name, java.lang.String source)
           
 boolean sourceExists(java.lang.String name)
           
 
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

StringCompiler

public StringCompiler(ClassInjector injector)
Parameters:
injector - ClassInjector to feed generated classes into
Method Detail

sourceExists

public boolean sourceExists(java.lang.String name)
Overrides:
sourceExists in class Compiler
Following copied from class: com.go.tea.compiler.Compiler
Returns:
true if source exists for the given qualified name

createCompilationUnit

protected CompilationUnit createCompilationUnit(java.lang.String name)
Overrides:
createCompilationUnit in class Compiler

setTemplateSource

public void setTemplateSource(java.lang.String name,
                              java.lang.String source)
Parameters:
name - The name of the template
source - The source code for the template