Package org.jruby.ast.visitor.rewriter.utils

Examples of org.jruby.ast.visitor.rewriter.utils.ReWriterContext


 
  protected final ReWriterContext config;
  protected final ReWriterFactory factory;
 
  public ReWriteVisitor(Writer out, String source) {
    this(new ReWriterContext(new PrintWriter(out), source, new DefaultFormatHelper()));
  }
View Full Code Here


  public ReWriteVisitor(Writer out, String source) {
    this(new ReWriterContext(new PrintWriter(out), source, new DefaultFormatHelper()));
  }

  public ReWriteVisitor(OutputStream out, String source) {
    this(new ReWriterContext(new PrintWriter(out, true), source, new DefaultFormatHelper()));
  }
View Full Code Here

    return createCodeFromNode(node, document, new DefaultFormatHelper());
  }
 
  public static String createCodeFromNode(Node node, String document, FormatHelper helper){
    StringWriter writer = new StringWriter();
    ReWriterContext ctx = new ReWriterContext(writer, document, helper);
    ReWriteVisitor rewriter = new ReWriteVisitor(ctx);
    rewriter.visitNode(node);
    return writer.toString();
  }
View Full Code Here

TOP

Related Classes of org.jruby.ast.visitor.rewriter.utils.ReWriterContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.