本文整理汇总了Java中polyglot.util.CodeWriter.write方法的典型用法代码示例。如果您正苦于以下问题:Java CodeWriter.write方法的具体用法?Java CodeWriter.write怎么用?Java CodeWriter.write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyglot.util.CodeWriter
的用法示例。
在下文中一共展示了CodeWriter.write方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printAstMetric
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
public void printAstMetric(Node n, CodeWriter w) {
if (n instanceof Stmt) {
if (stmtToMetric.containsKey(n)) {
w.write(" // sum= "+stmtToMetric.get(n)+" : depth= "+stmtToMetricDepth.get(n)+"\t");
}
}
}
示例2: prettyPrint
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
/** Write the expression to an output file. */
@Override
public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
w.begin(0);
w.write("<");
w.write(this.securityString());
w.write(">");
w.allowBreak(2, " ");
printSubExpr(expr, w, tr);
w.end();
}
示例3: prettyPrint
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
@Override
public void prettyPrint(CodeWriter cw) {
if (this.kindPol != KindPolicy.OTHER) {
this.kindPol.prettyPrint(cw);
cw.write("{");
this.flowPol.prettyPrint(cw);
cw.write("}");
}
else {
this.flowPol.prettyPrint(cw);
}
}
示例4: prettyPrint
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
@Override
public void prettyPrint(CodeWriter cw) {
cw.write(isPublicKey ? "PUBKEY" : "PRIVKEY");
cw.write("(");
keyBound.prettyPrint(cw);
cw.write(")");
}
示例5: prettyPrint
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
@Override
public void prettyPrint(CodeWriter cw) {
cw.write("Other");
}
示例6: prettyPrint
import polyglot.util.CodeWriter; //导入方法依赖的package包/类
@Override
public void prettyPrint(CodeWriter cw) {
cw.write(this.toString());
}