本文整理汇总了Java中polyglot.ast.Local类的典型用法代码示例。如果您正苦于以下问题:Java Local类的具体用法?Java Local怎么用?Java Local使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Local类属于polyglot.ast包,在下文中一共展示了Local类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: flowLocal
import polyglot.ast.Local; //导入依赖的package包/类
@Override
public Map<EdgeKey, VarContext<SecurityPolicy>> flowLocal(Local n,
VarContext<SecurityPolicy> dfIn,
FlowGraph<VarContext<SecurityPolicy>> graph,
Peer<VarContext<SecurityPolicy>> peer) {
dfIn = copyAndConstrain((IFConsContext)dfIn, peer, "local-no-top-condition");
Map<EdgeKey, VarContext<SecurityPolicy>> ret = super.flowLocal(n, dfIn, graph, peer);
VarContext<SecurityPolicy> df = ret.values().iterator().next();
SecurityPolicyVariable localVar = (SecurityPolicyVariable) df.getLocalAbsVal(n.name(), n.type());
factory.addConstraint(new NoTopConstraint(localVar, peer.node().position()));
return ret;
}
示例2: exprToAccessPath
import polyglot.ast.Local; //导入依赖的package包/类
public AccessPath exprToAccessPath(Expr e) {
if (e instanceof Local) {
Local l = (Local) e;
return exprToAccessPath(l);
}
else if (e instanceof Field) {
Field f = (Field) e;
CETypeSystem ts = (CETypeSystem) f.type().typeSystem();
FieldInstance fi = f.fieldInstance();
if (!fi.isCanonical()) {
Goal g = ts.extensionInfo().scheduler().currentGoal();
g.setUnreachableThisRun();
}
else if (!fi.type().equals(ts.Condition())) {
throw new InternalCompilerError("Not a condition! ");
}
return new AccessPathField(fi, e.toString(), f.position());
}
throw new InternalCompilerError("Expression " + e
+ " not suitable for an access path.", e.position());
}
示例3: leave
import polyglot.ast.Local; //导入依赖的package包/类
@Override
public Node leave(Node old, Node n, NodeVisitor v) {
if (CEExt_c.ext(n).isConditionSet()) {
// it's a set condition!
Call c = (Call) n;
if (c.target() instanceof Local) {
// ignore local conditions, we're only interested in fields
}
else if (c.target() instanceof Field) {
Field f = (Field) c.target();
this.setConds.addAll(autil.abstractLocations(f));
}
else {
throw new InternalCompilerError("Can't handle " + n);
}
}
if (n instanceof Call) {
process((Call) n);
}
else if (n instanceof New) {
process((New) n);
}
else if (n instanceof ConstructorCall) {
process((ConstructorCall) n);
}
return n;
}