org.teatrove.tea.util
Class StringCompiler
java.lang.Object
org.teatrove.tea.compiler.Compiler
org.teatrove.tea.util.AbstractCompiler
org.teatrove.tea.util.StringCompiler
public class StringCompiler
- extends AbstractCompiler
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.
- Author:
- Brian S O'Neill
| 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 |
StringCompiler
public StringCompiler(ClassInjector injector)
- Parameters:
injector - ClassInjector to feed generated classes into
StringCompiler
public StringCompiler(ClassInjector injector,
String packagePrefix)
- Parameters:
injector - ClassInjector to feed generated classes intopackagePrefix - The target package for the compiled templates
sourceExists
public boolean sourceExists(String name)
- Specified by:
sourceExists in class Compiler
- Returns:
- true if source exists for the given qualified name
getAllTemplateNames
public String[] getAllTemplateNames()
throws IOException
- Description copied from class:
AbstractCompiler
- Returns all sources (template names) available from the source
directory and in all sub-directories.
- Specified by:
getAllTemplateNames in class AbstractCompiler
- Throws:
IOException
createCompilationUnit
protected CompilationUnit createCompilationUnit(String name)
- Specified by:
createCompilationUnit in class Compiler
setTemplateSource
public void setTemplateSource(String name,
String source)
- Parameters:
name - The name of the templatesource - The source code for the template
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.