org.nakedobjects.metamodel.commons.debug
Class DebugString

java.lang.Object
  extended by org.nakedobjects.metamodel.commons.debug.DebugString

public class DebugString
extends java.lang.Object


Constructor Summary
DebugString()
           
 
Method Summary
 void append(int number, int width)
          Append the specified number within a space (number of spaces) specified by the width.
 void append(java.lang.Object object)
          Append the specified object by calling it toString() method.
 void append(java.lang.Object object, int width)
          Append the specified object by calling its toString() method, placing it within specified space.
 void appendAsHexln(java.lang.String label, long value)
          Append the specified number, displayed in hexadecimal notation, with the specified label, then start a new line.
 void appendException(java.lang.Exception e)
          Append the message and trace of the specified exception.
 void appendln()
          Start a new line.
 void appendln(java.lang.String text)
          Append the specified text, then start a new line.
 void appendln(java.lang.String label, boolean value)
          Append the specified value, displayed as true or false, with the specified label, then start a new line.
 void appendln(java.lang.String label, double value)
          Append the specified number with the specified label, then start a new line.
 void appendln(java.lang.String label, long value)
          Append the specified number, displayed in hexadecimal notation, with the specified label, then start a new line.
 void appendln(java.lang.String label, java.lang.Object object)
          Append the specified object with the specified label, then start a new line.
 void appendln(java.lang.String label, java.lang.Object[] object)
          Append the elements of the specified array with the specified label.
 void appendTitle(java.lang.String title)
          Append the specified title, then start a new line.
 void blankLine()
          Append a blank line only if there are existing lines and the previous line is not blank.
 void endSection()
           
 void indent()
          Increase indent used when appending.
 void startSection(java.lang.String title)
           
 java.lang.String toString()
          Return the String representation of this debug string.
 void unindent()
          Decrease indent used when appending.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DebugString

public DebugString()
Method Detail

append

public void append(int number,
                   int width)
Append the specified number within a space (number of spaces) specified by the width. E.g. "15 " where number is 15 and width is 4.


append

public void append(java.lang.Object object)
Append the specified object by calling it toString() method.


append

public void append(java.lang.Object object,
                   int width)
Append the specified object by calling its toString() method, placing it within specified space.


appendAsHexln

public void appendAsHexln(java.lang.String label,
                          long value)
Append the specified number, displayed in hexadecimal notation, with the specified label, then start a new line.


appendException

public void appendException(java.lang.Exception e)
Append the message and trace of the specified exception.


appendln

public void appendln()
Start a new line.

See Also:
blankLine()

appendln

public void appendln(java.lang.String text)
Append the specified text, then start a new line.


appendln

public void appendln(java.lang.String label,
                     boolean value)
Append the specified value, displayed as true or false, with the specified label, then start a new line.


appendln

public void appendln(java.lang.String label,
                     double value)
Append the specified number with the specified label, then start a new line.


appendln

public void appendln(java.lang.String label,
                     long value)
Append the specified number, displayed in hexadecimal notation, with the specified label, then start a new line.


appendln

public void appendln(java.lang.String label,
                     java.lang.Object object)
Append the specified object with the specified label, then start a new line.


appendln

public void appendln(java.lang.String label,
                     java.lang.Object[] object)
Append the elements of the specified array with the specified label. Each element is appended on its own line, and a new line is added after the last element.


appendTitle

public void appendTitle(java.lang.String title)
Append the specified title, then start a new line. A title is shown on two lines with the text on the first line and dashes on the second.


startSection

public void startSection(java.lang.String title)

endSection

public void endSection()

blankLine

public void blankLine()
Append a blank line only if there are existing lines and the previous line is not blank.


indent

public void indent()
Increase indent used when appending.


toString

public java.lang.String toString()
Return the String representation of this debug string.

Overrides:
toString in class java.lang.Object

unindent

public void unindent()
Decrease indent used when appending.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.