當前位置: 首頁>>代碼示例>>Java>>正文


Java CodeWriter類代碼示例

本文整理匯總了Java中polyglot.util.CodeWriter的典型用法代碼示例。如果您正苦於以下問題:Java CodeWriter類的具體用法?Java CodeWriter怎麽用?Java CodeWriter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CodeWriter類屬於polyglot.util包,在下文中一共展示了CodeWriter類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

import polyglot.util.CodeWriter; //導入依賴的package包/類
public final void execute(){
	astNode.visit(this);
	// Testing testing testing
	System.out.println("\n\n\n PRETTY P{RINTING");
	if (this instanceof StmtSumWeightedByDepth) {
	  metricPrettyPrinter p = new metricPrettyPrinter(this);
	  p.printAst(astNode, new CodeWriter(System.out, 80));
	}
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:10,代碼來源:ASTMetric.java

示例2: 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");
    }
  }
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:8,代碼來源:StmtSumWeightedByDepth.java

示例3: 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();
}
 
開發者ID:HarvardPL,項目名稱:cryptoerase,代碼行數:12,代碼來源:CESecurityCast.java

示例4: 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);
    }
}
 
開發者ID:HarvardPL,項目名稱:cryptoerase,代碼行數:13,代碼來源:CESecurityPolicy.java

示例5: prettyPrint

import polyglot.util.CodeWriter; //導入依賴的package包/類
@Override
public void prettyPrint(CodeWriter cw) {
    cw.write(isPublicKey ? "PUBKEY" : "PRIVKEY");
    cw.write("(");
    keyBound.prettyPrint(cw);
    cw.write(")");
}
 
開發者ID:HarvardPL,項目名稱:cryptoerase,代碼行數:8,代碼來源:KeyKind.java

示例6: print

import polyglot.util.CodeWriter; //導入依賴的package包/類
public void print(Node parent, Node child, CodeWriter w) {
  astMetric.printAstMetric(child,w);
  super.print(parent,child,w);
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:5,代碼來源:metricPrettyPrinter.java

示例7: prettyPrint

import polyglot.util.CodeWriter; //導入依賴的package包/類
@Override
public void prettyPrint(CodeWriter cw) {
    cw.write("Other");
}
 
開發者ID:HarvardPL,項目名稱:cryptoerase,代碼行數:5,代碼來源:KindPolicy.java

示例8: prettyPrint

import polyglot.util.CodeWriter; //導入依賴的package包/類
@Override
public void prettyPrint(CodeWriter cw) {
    cw.write(this.toString());
}
 
開發者ID:HarvardPL,項目名稱:cryptoerase,代碼行數:5,代碼來源:LevelPolicy.java

示例9: printAstMetric

import polyglot.util.CodeWriter; //導入依賴的package包/類
public void printAstMetric(Node n, CodeWriter w) {
  
}
 
開發者ID:flankerhqd,項目名稱:JAADAS,代碼行數:4,代碼來源:ASTMetric.java


注:本文中的polyglot.util.CodeWriter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。