本文整理匯總了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;
}