|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjif.visit.LabelChecker
public class LabelChecker
The LabelChecker class is used in the label checking of
Jif. Primarily it provides the method labelCheck(Node) which invokes the labelCheck
method on nodes, utility functions to help in the implementation of the
labelCheck methods, as well as references to the appropriate
Solver and JifContext.
LabelChecker is mostly imperative; however, the
JifContext is treated functionally, and whenever a
LabelChecker is given a new JifContext, a new
LabelChecker is created.
| Constructor Summary | |
|---|---|
LabelChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf,
boolean solvePerClassBody,
boolean solvePerMethod)
|
|
LabelChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf,
boolean solvePerClassBody,
boolean solvePerMethod,
boolean doLabelSubst)
|
|
| Method Summary | |
|---|---|
void |
constrain(LabelConstraint c)
|
JifContext |
context()
|
LabelChecker |
context(JifContext c)
|
java.lang.Object |
copy()
|
void |
enteringClassBody(polyglot.types.ClassType ct)
Called by JifClassDeclExt just before this label checker is used to check a class body. |
void |
enteringMethod(polyglot.types.MethodInstance mi)
Called by JifMethodDeclExt just before this label checker is used to check a method body. |
polyglot.ast.Node |
finishedLabelCheckPass(polyglot.ast.Node n)
This method should be called on the top level label checker once the label checking has finished. |
JifContext |
jifContext()
|
JifTypeSystem |
jifTypeSystem()
|
polyglot.ast.Node |
labelCheck(polyglot.ast.Node n)
|
JifClassDecl |
leavingClassBody(JifClassDecl n)
Called by JifClassDeclExt just after this label checker has been used to check a class body. |
JifMethodDecl |
leavingMethod(JifMethodDecl n)
Called by JifClassDeclExt just after this label checker has been used to check a class body. |
polyglot.ast.NodeFactory |
nodeFactory()
|
Solver |
solver()
|
JifTypeSystem |
typeSystem()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LabelChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf,
boolean solvePerClassBody,
boolean solvePerMethod)
public LabelChecker(polyglot.frontend.Job job,
polyglot.types.TypeSystem ts,
polyglot.ast.NodeFactory nf,
boolean solvePerClassBody,
boolean solvePerMethod,
boolean doLabelSubst)
| Method Detail |
|---|
public java.lang.Object copy()
copy in interface polyglot.util.Copypublic JifContext context()
public LabelChecker context(JifContext c)
public JifTypeSystem typeSystem()
public JifTypeSystem jifTypeSystem()
public polyglot.ast.NodeFactory nodeFactory()
public JifContext jifContext()
public Solver solver()
public polyglot.ast.Node labelCheck(polyglot.ast.Node n)
throws polyglot.types.SemanticException
polyglot.types.SemanticException
public void constrain(LabelConstraint c)
throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionpublic void enteringClassBody(polyglot.types.ClassType ct)
public void enteringMethod(polyglot.types.MethodInstance mi)
public JifClassDecl leavingClassBody(JifClassDecl n)
public JifMethodDecl leavingMethod(JifMethodDecl n)
public polyglot.ast.Node finishedLabelCheckPass(polyglot.ast.Node n)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||