Esempio n. 1
0
  public String getSource() {
    if (introductions.size() == 0 && adviceList.size() == 0) return "";

    StringBuffer result = new StringBuffer();
    if (aspectName != null) result.append("// aspect " + aspectName.toString() + ";\n\n");

    AspectJPrettyPrinter printer = new AspectJPrettyPrinter();
    this.accept(printer);

    return result.append(printer.getResult()).toString();
  }
Esempio n. 2
0
  void accept(AspectJPrettyPrinter visitor) {
    boolean visitChildren = visitor.visit(this);
    if (visitChildren) {

      System.out.println("Failure: Pretty printer not supported for Aspects");
      // for (ASTNode node : introductions)
      // node.accept(visitor);
      // for (AspectJExecutionAdvice node : adviceList)
      // node.accept(visitor);
    }
    visitor.endVisit(this);
  }