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