当前位置: 首页>>代码示例>>Java>>正文


Java Local类代码示例

本文整理汇总了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;
}
 
开发者ID:HarvardPL,项目名称:cryptoerase,代码行数:17,代码来源:CEDataFlow.java

示例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());
}
 
开发者ID:HarvardPL,项目名称:cryptoerase,代码行数:24,代码来源:CESecurityPolicyFactory.java

示例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;
}
 
开发者ID:HarvardPL,项目名称:cryptoerase,代码行数:30,代码来源:SetConditionsVisitor.java


注:本文中的polyglot.ast.Local类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。