jif.ast
Class JifUtil
java.lang.Object
jif.ast.JifUtil
public class JifUtil
- extends java.lang.Object
An implementation of the Jif
interface.
Method Summary |
static java.lang.String |
accessPathDescrip(AccessPath path,
java.lang.String kind)
|
static polyglot.ast.Expr |
effectiveExpr(polyglot.ast.Expr expr)
Returns the "effective expression" for expr. |
static AccessPath |
exprToAccessPath(polyglot.ast.Expr e,
JifContext context)
|
static Label |
exprToLabel(JifTypeSystem ts,
polyglot.ast.Expr e,
JifContext context)
|
static Principal |
exprToPrincipal(JifTypeSystem ts,
polyglot.ast.Expr e,
JifContext context)
|
static boolean |
isFinalAccessExprOrConst(JifTypeSystem ts,
polyglot.ast.Expr e)
|
static AccessPath |
varInstanceToAccessPath(polyglot.types.VarInstance vi,
polyglot.util.Position pos)
|
static AccessPath |
varInstanceToAccessPath(polyglot.types.VarInstance vi,
java.lang.String name,
polyglot.util.Position pos)
|
static PathMap |
X(polyglot.ast.Node n)
|
static polyglot.ast.Node |
X(polyglot.ast.Node n,
PathMap X)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JifUtil
public JifUtil()
X
public static PathMap X(polyglot.ast.Node n)
X
public static polyglot.ast.Node X(polyglot.ast.Node n,
PathMap X)
varInstanceToAccessPath
public static AccessPath varInstanceToAccessPath(polyglot.types.VarInstance vi,
polyglot.util.Position pos)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
varInstanceToAccessPath
public static AccessPath varInstanceToAccessPath(polyglot.types.VarInstance vi,
java.lang.String name,
polyglot.util.Position pos)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
exprToAccessPath
public static AccessPath exprToAccessPath(polyglot.ast.Expr e,
JifContext context)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
isFinalAccessExprOrConst
public static boolean isFinalAccessExprOrConst(JifTypeSystem ts,
polyglot.ast.Expr e)
exprToLabel
public static Label exprToLabel(JifTypeSystem ts,
polyglot.ast.Expr e,
JifContext context)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
exprToPrincipal
public static Principal exprToPrincipal(JifTypeSystem ts,
polyglot.ast.Expr e,
JifContext context)
throws polyglot.types.SemanticException
- Throws:
polyglot.types.SemanticException
accessPathDescrip
public static java.lang.String accessPathDescrip(AccessPath path,
java.lang.String kind)
effectiveExpr
public static polyglot.ast.Expr effectiveExpr(polyglot.ast.Expr expr)
- Returns the "effective expression" for expr. That is, it strips
away casts and downgrade expressiions.