de.smartics.exceptions.i18n
Class DefaultI18nCodeMessageFormatter

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

public class DefaultI18nCodeMessageFormatter
     
     
extends DefaultCodeMessageFormatter
implements I18nCodeMessageFormatter

Default implementation to format code messages in the context of I18N.

See Also:
Serialized Form

Constructor Summary
DefaultI18nCodeMessageFormatter()
          Default constructor.
 
Method Summary
 String format(CoreException exception, Object message)
          Formats the given core exception.
 String format(LocalizedException exception)
          Formats the given exception.
 String format(LocalizedException exception, MessageBean message)
          Formats the given message.
 String format(MessageBean message)
          Formats the given message.
 
Methods inherited from class de.smartics.exceptions.core.DefaultCodeMessageFormatter
format, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.smartics.exceptions.core.CodeMessageFormatter
format
 

Constructor Detail

DefaultI18nCodeMessageFormatter

public DefaultI18nCodeMessageFormatter()
Default constructor.

Method Detail

format

public final String format(LocalizedException exception)
Description copied from interface: I18nCodeMessageFormatter
Formats the given 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 I18nCodeMessageFormatter
Parameters:
exception - the exception to transform to its string representation.
Returns:
the string representation of the exception.

format

public final 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
Overrides:
format in class DefaultCodeMessageFormatter
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.

format

public final String format(LocalizedException exception,
                           MessageBean message)
Description copied from interface: I18nCodeMessageFormatter
Formats the given message.

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

Specified by:
format in interface I18nCodeMessageFormatter
Parameters:
exception - the exception to transform to its string representation.
message - the message to transform to be added to the string representation.
Returns:
the string representation of the exception.

format

public final String format(MessageBean message)
Description copied from interface: I18nCodeMessageFormatter
Formats the given message.

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

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


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