jltools.ext.jl.ast
Class Node_c.StringCodeWriter

java.lang.Object
  |
  +--jltools.util.CodeWriter
        |
        +--jltools.ext.jl.ast.Node_c.StringCodeWriter
Enclosing class:
Node_c

public class Node_c.StringCodeWriter
extends CodeWriter


Fields inherited from class jltools.util.CodeWriter
debug, precompute
 
Constructor Summary
Node_c.StringCodeWriter(java.io.CharArrayWriter w)
           
 
Method Summary
 void allowBreak(int n)
          Allow a newline.
 void allowBreak(int n, java.lang.String alt)
          Allow a newline.
 void newline(int n)
          Force a newline.
 java.lang.String toString()
          Return a readable representation of all the structured input given to the CodeWriter since the last flush.
 
Methods inherited from class jltools.util.CodeWriter
begin, end, flush, newline, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node_c.StringCodeWriter

public Node_c.StringCodeWriter(java.io.CharArrayWriter w)
Method Detail

newline

public void newline(int n)
Description copied from class: CodeWriter
Force a newline. Indentation will be preserved. This method should be used sparingly; usually a call to allowBreak is preferable because forcing a newline also causes all breaks in containing blocks to be broken.
Overrides:
newline in class CodeWriter

allowBreak

public void allowBreak(int n)
Description copied from class: CodeWriter
Allow a newline. Indentation will be preserved. If no newline is inserted, a single space character is output instead.
Overrides:
allowBreak in class CodeWriter
Following copied from class: jltools.util.CodeWriter
Parameters:
n - the amount of increase in indentation if the newline is inserted.

allowBreak

public void allowBreak(int n,
                       java.lang.String alt)
Description copied from class: CodeWriter
Allow a newline. Indentation will be preserved.
Overrides:
allowBreak in class CodeWriter
Following copied from class: jltools.util.CodeWriter
Parameters:
n - the amount of increase in indentation if the newline is inserted.
alt - if no newline is inserted, the string alt is output instead.

toString

public java.lang.String toString()
Description copied from class: CodeWriter
Return a readable representation of all the structured input given to the CodeWriter since the last flush.
Overrides:
toString in class CodeWriter