public class LabelSubstitutionVisitor
extends polyglot.visit.NodeVisitor
LabelSubstitution
to all labels
that occur in the AST. The LabelSubstitution
is not allowed
to throw any SemanticException
s.Constructor and Description |
---|
LabelSubstitutionVisitor(LabelSubstitution substitution,
boolean skipBody) |
LabelSubstitutionVisitor(LabelSubstitution substitution,
TypeSubstitutor typeSubst,
boolean skipBody) |
Modifier and Type | Method and Description |
---|---|
polyglot.ast.Node |
leave(polyglot.ast.Node old,
polyglot.ast.Node n,
polyglot.visit.NodeVisitor v) |
polyglot.ast.Node |
override(polyglot.ast.Node n) |
protected <Actor extends ActsForParam,Granter extends ActsForParam> |
rewriteActsForConstraint(ActsForConstraint<Actor,Granter> afc) |
protected <P extends ActsForParam> |
rewriteActsForParam(P param) |
protected Assertion |
rewriteConstraint(Assertion c) |
polyglot.ast.Expr |
rewriteExpr(polyglot.ast.Expr e) |
protected void |
rewriteFieldInstance(JifFieldInstance fi)
Imperatively rewrites the given field instance.
|
protected Label |
rewriteLabel(Label L) |
protected Principal |
rewritePrincipal(Principal p) |
protected java.util.List<Principal> |
rewritePrincipals(java.util.List<Principal> principals) |
polyglot.ast.TypeNode |
rewriteTypeNode(polyglot.ast.TypeNode tn)
Replace the args in the label of type nodes.
|
public LabelSubstitutionVisitor(LabelSubstitution substitution, boolean skipBody)
substitution
- the LabelSubstitution to use.skipBody
- skip over the body of method/constructor decls?public LabelSubstitutionVisitor(LabelSubstitution substitution, TypeSubstitutor typeSubst, boolean skipBody)
public polyglot.ast.Node override(polyglot.ast.Node n)
override
in class polyglot.visit.NodeVisitor
public polyglot.ast.Node leave(polyglot.ast.Node old, polyglot.ast.Node n, polyglot.visit.NodeVisitor v)
leave
in class polyglot.visit.NodeVisitor
public polyglot.ast.TypeNode rewriteTypeNode(polyglot.ast.TypeNode tn) throws polyglot.types.SemanticException
polyglot.types.SemanticException
public polyglot.ast.Expr rewriteExpr(polyglot.ast.Expr e) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected <P extends ActsForParam> P rewriteActsForParam(P param) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected Label rewriteLabel(Label L) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected Principal rewritePrincipal(Principal p) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected java.util.List<Principal> rewritePrincipals(java.util.List<Principal> principals) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected void rewriteFieldInstance(JifFieldInstance fi) throws polyglot.types.SemanticException
polyglot.types.SemanticException
protected <Actor extends ActsForParam,Granter extends ActsForParam> ActsForConstraint<Actor,Granter> rewriteActsForConstraint(ActsForConstraint<Actor,Granter> afc) throws polyglot.types.SemanticException
polyglot.types.SemanticException