|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teatrove.tea.compiler.CompilationUnit
org.teatrove.tea.compiler.CompiledTemplate
public class CompiledTemplate
Pre-compiled templates implementation. Allows for the invocation of pre-compiled templates from other dynamically compiled or pre-compiled templates. Nested calls to other pre-compiled templates must be from within the same merged context interface.
| Constructor Summary | |
|---|---|
CompiledTemplate(String name,
Compiler compiler,
CompilationUnit caller)
This constructor is only invoked when the compiler cannot locate a source file for a template and a template class of the desired name and package exists. |
|
| Method Summary | |
|---|---|
static boolean |
exists(Compiler c,
String name,
CompilationUnit from)
Test to see of the template can be loaded before CompiledTemplate can be constructed. |
static String |
getFullyQualifiedName(String name)
|
String |
getName()
|
OutputStream |
getOutputStream()
Delegate to calling template. |
Template |
getParseTree()
This method is called by JavaClassGenerator during the compile phase. |
Reader |
getReader()
Delegate to calling template. |
Class<?> |
getRuntimeContext()
Get the runtime context of the compiled template. |
String |
getSourceFileName()
Source is not accessible for pre-compiled templates |
String |
getTargetPackage()
Return the package name that this CompilationUnit should be compiled into. |
boolean |
isValid()
Checks if the compiled template class is a precomiled template (i.e. |
void |
resetOutputStream()
Delegate to calling template. |
void |
setParseTree(Template tree)
|
boolean |
shouldCompile()
|
| Methods inherited from class org.teatrove.tea.compiler.CompilationUnit |
|---|
compileError, getCompiler, getErrorCount, getImportedPackages, getShortName, signatureEquals |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompiledTemplate(String name,
Compiler compiler,
CompilationUnit caller)
| Method Detail |
|---|
public String getName()
getName in class CompilationUnitpublic boolean isValid()
public static boolean exists(Compiler c,
String name,
CompilationUnit from)
public static String getFullyQualifiedName(String name)
public Class<?> getRuntimeContext()
getRuntimeContext in class CompilationUnitpublic Template getParseTree()
getParseTree in class CompilationUnitpublic void setParseTree(Template tree)
setParseTree in class CompilationUnitpublic String getTargetPackage()
getTargetPackage in class CompilationUnit
public boolean shouldCompile()
throws IOException
shouldCompile in class CompilationUnitIOException
public OutputStream getOutputStream()
throws IOException
getOutputStream in class CompilationUnitIOExceptionpublic void resetOutputStream()
resetOutputStream in class CompilationUnit
public Reader getReader()
throws IOException
getReader in class CompilationUnitIOExceptionpublic String getSourceFileName()
getSourceFileName in class CompilationUnit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||