本文整理汇总了Java中polyglot.ast.ConstructorDecl类的典型用法代码示例。如果您正苦于以下问题:Java ConstructorDecl类的具体用法?Java ConstructorDecl怎么用?Java ConstructorDecl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ConstructorDecl类属于polyglot.ast包,在下文中一共展示了ConstructorDecl类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructorCall
import polyglot.ast.ConstructorDecl; //导入依赖的package包/类
/**
* Process a constructor call to this() or super(), i.e., from within a constructor.
* @param ci
* @return
*/
public SetConditionsAbsVal constructorCall(ConstructorInstance ci,
ConstructorCall n) {
ConstructorDecl cd =
(ConstructorDecl) this.currentAnalysisUnit().codeNode();
ExtConstructorDecl ext = (ExtConstructorDecl) AccrueExt_c.ext(cd);
Set<HContext> pointsTo =
pointsTo(ext.getThisNode(), this.currentContext(), this.extInfo);
if (pointsTo.isEmpty()) {
System.err.println("WARNING: constructor invocation doesn't point to anything!");
System.err.println("ci " + ci);
System.err.println("n " + n);
System.err.println("cd " + cd);
System.err.println("ext " + ext);
System.err.println("pointsTo " + pointsTo);
System.err.println("ext.getThisNode() " + ext.getThisNode());
System.err.println("this.currentContext() " + this.currentContext());
System.err.println("this.extInfo " + this.extInfo);
/*throw new InternalCompilerError("Constructor invocation doesn't point to anything!",
n.position());*/
return new SetConditionsAbsVal(new HashSet<AbstractLocation>());
}
else {
Set<AbstractLocation> setConds = new HashSet<AbstractLocation>();
for (HContext o : pointsTo) {
SetConditionsAbsVal dfi =
callNonVirtual(ci,
workQueue.factory()
.createAnalysisContext(this,
ci,
o,
n));
setConds.addAll(dfi.setConditions());
}
return new SetConditionsAbsVal(setConds);
}
}