public class LabelSubstitutionVisitor
extends polyglot.visit.NodeVisitor
LabelSubstitution to all labels
that occur in the AST. The LabelSubstitution is not allowed
to throw any SemanticExceptions.| 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.NodeVisitorpublic polyglot.ast.Node leave(polyglot.ast.Node old,
polyglot.ast.Node n,
polyglot.visit.NodeVisitor v)
leave in class polyglot.visit.NodeVisitorpublic polyglot.ast.TypeNode rewriteTypeNode(polyglot.ast.TypeNode tn)
throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionpublic polyglot.ast.Expr rewriteExpr(polyglot.ast.Expr e)
throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected <P extends ActsForParam> P rewriteActsForParam(P param) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected Label rewriteLabel(Label L) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected Principal rewritePrincipal(Principal p) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected java.util.List<Principal> rewritePrincipals(java.util.List<Principal> principals) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected void rewriteFieldInstance(JifFieldInstance fi) throws polyglot.types.SemanticException
polyglot.types.SemanticExceptionprotected <Actor extends ActsForParam,Granter extends ActsForParam> ActsForConstraint<Actor,Granter> rewriteActsForConstraint(ActsForConstraint<Actor,Granter> afc) throws polyglot.types.SemanticException
polyglot.types.SemanticException