com.townleyenterprises.trace
Class TraceMessage

java.lang.Object
  extended bycom.townleyenterprises.trace.TraceMessage

public class TraceMessage
extends java.lang.Object

This class encapsulates a message which is to be written to the trace log. It is mainly useful when you want to collect a set of data and then write it all at once rather than as individual lines. The main difference between this and just using a StringBuffer is that it will append Traceable messages if it can rather than toString() which can sometimes be quite expensive.

Since:
3.0

Constructor Summary
TraceMessage()
           
TraceMessage(java.lang.String message)
           
 
Method Summary
 java.lang.StringBuffer append(boolean arg)
           
 java.lang.StringBuffer append(char arg)
           
 java.lang.StringBuffer append(char[] arg)
           
 java.lang.StringBuffer append(char[] arg, int offset, int len)
           
 java.lang.StringBuffer append(double arg)
           
 java.lang.StringBuffer append(float arg)
           
 java.lang.StringBuffer append(int arg)
           
 java.lang.StringBuffer append(long arg)
           
 java.lang.StringBuffer append(java.lang.Object arg)
           
 java.lang.StringBuffer append(Traceable traceable)
          This method allows adding traceable contents via traceString() instead of toString().
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TraceMessage

public TraceMessage()

TraceMessage

public TraceMessage(java.lang.String message)
Method Detail

append

public java.lang.StringBuffer append(Traceable traceable)
This method allows adding traceable contents via traceString() instead of toString().

Parameters:
traceable - Traceable instance

toString

public java.lang.String toString()

append

public java.lang.StringBuffer append(boolean arg)

append

public java.lang.StringBuffer append(char arg)

append

public java.lang.StringBuffer append(char[] arg)

append

public java.lang.StringBuffer append(char[] arg,
                                     int offset,
                                     int len)

append

public java.lang.StringBuffer append(double arg)

append

public java.lang.StringBuffer append(float arg)

append

public java.lang.StringBuffer append(int arg)

append

public java.lang.StringBuffer append(long arg)

append

public java.lang.StringBuffer append(java.lang.Object arg)


Copyright © 2002-2004, Andrew S. Townley and Townley Enterprises. All Rights Reserved.
This project is hosted on http://te-code.sourceforge.net.