de.smartics.exceptions.core
Class DefaultCodeMessageFormatter

Package class diagram package DefaultCodeMessageFormatter
java.lang.Object
  extended by de.smartics.exceptions.core.DefaultCodeMessageFormatter
All Implemented Interfaces:
CodeMessageFormatter, Serializable
Direct Known Subclasses:
DefaultI18nCodeMessageFormatter

public class DefaultCodeMessageFormatter
     
     
extends Object
implements CodeMessageFormatter

Default implementation to format code messages.

See Also:
Serialized Form

Constructor Summary
DefaultCodeMessageFormatter()
          Default constructor.
 
Method Summary
 String format(CoreException exception)
          Formats the given core exception.
 String format(CoreException exception, Object message)
          Formats the given core exception.
protected  String toString(CoreException exception)
          Standard implementation of formatting ID, code and time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCodeMessageFormatter

public DefaultCodeMessageFormatter()
Default constructor.

Method Detail

format

public final String format(CoreException exception)
Description copied from interface: CodeMessageFormatter
Formats the given core exception.

Implementations must not use the toString method of the given exception since the instance delegates its toString method call to this instance.

Specified by:
format in interface CodeMessageFormatter
Parameters:
exception - the exception to transform to its string representation.
Returns:
the string representation of the exception.

format

public String format(CoreException exception,
                     Object message)
Description copied from interface: CodeMessageFormatter
Formats the given core exception.

Implementations must not use the toString method of the given exception since the instance delegates its toString method call to this instance.

Specified by:
format in interface CodeMessageFormatter
Parameters:
exception - the exception to transform to its string representation.
message - to message to include into the representation.
Returns:
the string representation of the exception.

toString

protected final String toString(CoreException exception)
Standard implementation of formatting ID, code and time.

Parameters:
exception - the exception to format.
Returns:
the string representation of the exception.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.