jif.visit
Class LabelSubstitutionVisitor
java.lang.Object
polyglot.visit.NodeVisitor
jif.visit.LabelSubstitutionVisitor
- All Implemented Interfaces:
- java.lang.Cloneable, polyglot.util.Copy
public class LabelSubstitutionVisitor
- extends polyglot.visit.NodeVisitor
Visits an AST, and applies a LabelSubsitution
to all labels
that occur in the AST. The LabelSubsitution
is not allowed
to throw any SemanticException
s.
Methods inherited from class polyglot.visit.NodeVisitor |
begin, copy, enter, enter, finish, finish, leave, override, toString, visitEdge, visitEdgeNoOverride |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LabelSubstitutionVisitor
public LabelSubstitutionVisitor(LabelSubstitution substitution,
boolean skipBody)
- Parameters:
substitution
- the LabelSubstitution to use.skipBody
- skip over the body of method/constructor decls?
LabelSubstitutionVisitor
public LabelSubstitutionVisitor(LabelSubstitution substitution,
TypeSubstitutor typeSubst,
boolean skipBody)
override
public polyglot.ast.Node override(polyglot.ast.Node n)
- Overrides:
override
in class polyglot.visit.NodeVisitor
leave
public polyglot.ast.Node leave(polyglot.ast.Node old,
polyglot.ast.Node n,
polyglot.visit.NodeVisitor v)
- Overrides:
leave
in class polyglot.visit.NodeVisitor
rewriteTypeNode
public polyglot.ast.TypeNode rewriteTypeNode(polyglot.ast.TypeNode tn)
throws polyglot.types.SemanticException
- Replace the args in the label of type nodes.
- Throws:
polyglot.types.SemanticException
rewriteExpr
public polyglot.ast.Expr rewriteExpr(polyglot.ast.Expr e)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
rewriteLabel
protected Label rewriteLabel(Label L)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
rewritePrincipal
protected Principal rewritePrincipal(Principal p)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException