com.gargoylesoftware.base.trace
Class TraceItem

java.lang.Object
  extended bycom.gargoylesoftware.base.trace.TraceItem
All Implemented Interfaces:
Cloneable

public class TraceItem
extends Object
implements Cloneable

An item of data to be written.

Version:
$Revision: 1.5 $
Author:
Mike Bowler

Constructor Summary
TraceItem()
          Create a new item.
 
Method Summary
protected  void assertNotNull(String fieldName, Object fieldValue)
          Verify that the specified value is not null.
 Object clone()
          Return a copy of this object.
 boolean containsText()
          Return true if this item contains any text.
 TraceChannel getChannel()
          Return the channel.
 Object getLock()
          Return the lock.
 String getMessage()
          Return the message.
 TraceItem getNextItem()
          Return the next item.
 TraceItem getPrevItem()
          Return the previous item.
 String getThreadName()
          Return the name of the thread that called Trace.
 Throwable getThrowable()
          Return the throwable.
 Date getTime()
          Return the time that the item was written to Trace
 String toString()
          Return a string representation of this object for testing purposes.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TraceItem

public TraceItem()
Create a new item.

Method Detail

toString

public String toString()
Return a string representation of this object for testing purposes.

Returns:
The string representation

containsText

public boolean containsText()
Return true if this item contains any text.

Returns:
true if this item contains any text.

getMessage

public String getMessage()
Return the message.

Returns:
the message.

getThrowable

public Throwable getThrowable()
Return the throwable.

Returns:
the throwable.

getTime

public Date getTime()
Return the time that the item was written to Trace

Returns:
the time.

getThreadName

public String getThreadName()
Return the name of the thread that called Trace.

Returns:
the name of the thread.

getLock

public Object getLock()
Return the lock.

Returns:
the lock.

getPrevItem

public TraceItem getPrevItem()
Return the previous item.

Returns:
the previous item.

getNextItem

public TraceItem getNextItem()
Return the next item.

Returns:
the next item.

getChannel

public TraceChannel getChannel()
Return the channel.

Returns:
the channel.

clone

public Object clone()
             throws CloneNotSupportedException
Return a copy of this object.

Returns:
A copy.
Throws:
CloneNotSupportedException - If this object is not cloneable.

assertNotNull

protected final void assertNotNull(String fieldName,
                                   Object fieldValue)
                            throws DetailedNullPointerException
Verify that the specified value is not null. If it is then throw an exception

Parameters:
fieldName - The name of the field to check
fieldValue - The value of the field to check
Throws:
DetailedNullPointerException - If fieldValue is null


Copyright © 1998-2005 Gargoyle Software Inc.. All Rights Reserved.