org.teatrove.tea.compiler
Class TypeChecker
java.lang.Object
org.teatrove.tea.compiler.TypeChecker
public class TypeChecker
- extends Object
A TypeChecker operates on a template's parse tree, created by a
Parser, filling in type information while it checks the validity of
the whole template. After a template has been type-checked and there are no
errors, the template is ready for code generation. Add an
ErrorListener to capture any semantic errors detected by the
TypeChecker.
- Author:
- Brian S O'Neill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mUnit
protected CompilationUnit mUnit
TypeChecker
public TypeChecker(CompilationUnit unit)
addErrorListener
public void addErrorListener(ErrorListener listener)
removeErrorListener
public void removeErrorListener(ErrorListener listener)
setClassLoader
public void setClassLoader(ClassLoader loader)
- Sets the ClassLoader to use to load classes with. If set to null,
then classes are loaded using Class.forName.
setExceptionGuardianEnabled
public void setExceptionGuardianEnabled(boolean enabled)
- Enabling Exception Guardian causes statements that might throw a
exception to be guarded. By default, this feature is off. If a guarded
statement throws a RuntimeException, it is caught and handed off to
ThreadGroup.uncaughtException. Execution then proceeds to the
next statement. If the guarded statement is an assignment, then the
variable is assigned null if an exception is caught.
typeCheck
public void typeCheck()
typeCheck
public void typeCheck(TypeChecker.Visitor visitor)
getErrorCount
public int getErrorCount()
Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.