edu.cmu.sei.aadl.modelsupport
Class UnparseText

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.UnparseText

public class UnparseText
extends java.lang.Object

This class provides a text buffer into which text can be placed that is formatted with indentation. Appropriate methods are provided for increasing and decreasing indentation. Indentation is automatically taken into account by the addOutput and addOutputNewline methods.


Field Summary
static java.lang.String copyright
           
 
Constructor Summary
UnparseText()
          constructor for an UnparseText object
UnparseText(boolean doCountOnly)
          constructor for an UnparseText object The doCount parameter indicates whether to only keep track of line numbers or actually build up a string buffer
UnparseText(java.lang.String tab)
          constructor for an UnparseText object The doCount parameter indicates whether to only keep track of line numbers or actually build up a string buffer
 
Method Summary
 void addOutput(java.lang.String more)
          add a string to the current line of the output
 void addOutputNewline(java.lang.String more)
          Add string to output and end with a new line
 void decrementIndent()
          decrement indentation
 java.lang.String getIndentString()
           
 int getLineCount()
          return the line count
 java.lang.String getParseOutput()
          returns the generated unparse string
 void incrementIndent()
          increment indentation
 void setDebug()
          Set debug to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values
Constructor Detail

UnparseText

public UnparseText()
constructor for an UnparseText object


UnparseText

public UnparseText(boolean doCountOnly)
constructor for an UnparseText object The doCount parameter indicates whether to only keep track of line numbers or actually build up a string buffer

Parameters:
doCountOnly - boolean

UnparseText

public UnparseText(java.lang.String tab)
constructor for an UnparseText object The doCount parameter indicates whether to only keep track of line numbers or actually build up a string buffer

Parameters:
tab - initial white space
Method Detail

setDebug

public void setDebug()
Set debug to true. Results in printing of output as it is generated


incrementIndent

public void incrementIndent()
increment indentation


decrementIndent

public void decrementIndent()
decrement indentation


getIndentString

public java.lang.String getIndentString()
Returns:
Returns the indentString.

getParseOutput

public java.lang.String getParseOutput()
returns the generated unparse string

Returns:
String

getLineCount

public int getLineCount()
return the line count

Returns:
int

addOutput

public void addOutput(java.lang.String more)
add a string to the current line of the output

Parameters:
more - String to be added

addOutputNewline

public void addOutputNewline(java.lang.String more)
Add string to output and end with a new line

Parameters:
more - String to be added