logahawk.formatters
Class ThrowableArgFormatter.ThrowablePlusMessage

java.lang.Object
  extended by logahawk.formatters.ThrowableArgFormatter.ThrowablePlusMessage
Enclosing class:
ThrowableArgFormatter

@Immutable
public static class ThrowableArgFormatter.ThrowablePlusMessage
extends Object

This is a specialized class that contains an Throwable and a user String message. This class will be formatted with the user String message first, followed by the Throwable's message, then the rest of the Throwable's data. This class is designed to be used by "StandardThrowableSigFormatter" to bind a message to a Throwable as a single logical argument rather than formatting them as two separate arguments.


Constructor Summary
ThrowableArgFormatter.ThrowablePlusMessage(Object userMessage, Throwable throwable)
           
 
Method Summary
 Throwable getThrowable()
          This is the Throwable.
 Object getUserMessage()
          This is the user specified message, separate from the Throwable's message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrowableArgFormatter.ThrowablePlusMessage

public ThrowableArgFormatter.ThrowablePlusMessage(Object userMessage,
                                                  Throwable throwable)
Method Detail

getUserMessage

public Object getUserMessage()
This is the user specified message, separate from the Throwable's message. This is an "Object" because the creator of this class does not want to perform an improper cast, and so leaves this up to the "ThrowableArgFormatter" class.


getThrowable

public Throwable getThrowable()
This is the Throwable. This is an "Object" because the creator of this class does not want to perform an improper cast, and so leaves this up to the "ThrowableArgFormatter" class.