com.octagroup.foregej.java.lang
Class JavaNodeWriter

java.lang.Object
  |
  +--com.octagroup.foregej.antlr.NodeWriter
        |
        +--com.octagroup.foregej.java.lang.JavaNodeWriter

public class JavaNodeWriter
extends NodeWriter


Field Summary
protected  boolean writeComments_
          should comments be written?
 
Fields inherited from class com.octagroup.foregej.antlr.NodeWriter
canWrapLines_, lastAST_, lastLineWrapPos_, latestWrapProspectIndent_, latestWrapProspectPos_, latestWrapProspectType_, parents_, WRAP_AFTER, WRAP_BEFORE, WRAP_NOT, WRAP_ON, writtenTokens_
 
Constructor Summary
JavaNodeWriter()
           
 
Method Summary
protected  boolean canWrapBetween(antlr.collections.AST firstAst, antlr.collections.AST secondAst)
          Adds wrapping spec. for java code asts.
protected  int canWrapOn(char c)
          Adds wrapping spec. for java code tokens.
 java.lang.String popIndentationAndWrite(java.lang.String s)
          Write comments before popping indentation
 void setWriteComments(boolean b)
          Signals if comments should not be written or not.
 void write(antlr.collections.AST ast)
          Writes the comments before and after.
 void write(java.lang.String s)
          If we write text that matches the first separator - write all the comments up to that separator.
 void writeComment(Comment comment)
          Helper method that writes a comment to this node writer.
 void writeComment(TOK_JAVA_COMMENT comment)
          Helper method that writes a java comment to this node writer.
 
Methods inherited from class com.octagroup.foregej.antlr.NodeWriter
copyThisStateTo, enableWrapping, getIndentation, getPreviousAST, getPreviousAST, isLastLineEmpty, isWritten, markAsWritten, newLine, popIndentation, pushIndentation, pushIndentation, pushIndentation, pushIndentationCurrentPos, removeSpacesAfter, toString, write, write, writeInParenthesis, writeStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

writeComments_

protected boolean writeComments_
should comments be written?
Constructor Detail

JavaNodeWriter

public JavaNodeWriter()
Method Detail

canWrapOn

protected int canWrapOn(char c)
Adds wrapping spec. for java code tokens.
Overrides:
canWrapOn in class NodeWriter
Parameters:
c -  
Returns:
 

canWrapBetween

protected boolean canWrapBetween(antlr.collections.AST firstAst,
                                 antlr.collections.AST secondAst)
Adds wrapping spec. for java code asts.
Overrides:
canWrapBetween in class NodeWriter
Parameters:
firstAst -  
secondAst -  
Returns:
 

setWriteComments

public void setWriteComments(boolean b)
Signals if comments should not be written or not.
Parameters:
b - should comments be written

write

public void write(antlr.collections.AST ast)
Writes the comments before and after.
Overrides:
write in class NodeWriter
Parameters:
ast -  

popIndentationAndWrite

public java.lang.String popIndentationAndWrite(java.lang.String s)
Write comments before popping indentation
Overrides:
popIndentationAndWrite in class NodeWriter
Parameters:
s -  
Returns:
 

write

public void write(java.lang.String s)
If we write text that matches the first separator - write all the comments up to that separator.
Overrides:
write in class NodeWriter
Parameters:
s -  

writeComment

public void writeComment(Comment comment)
Helper method that writes a comment to this node writer.
Parameters:
comment - the comment to write.

writeComment

public void writeComment(TOK_JAVA_COMMENT comment)
Helper method that writes a java comment to this node writer.
Parameters:
comment - the comment to write.


Copyright © 2003 El Icognito des Noboby. All Rights Reserved.