org.jboss.weld.exceptions
Class WeldExceptionKeyMessage

java.lang.Object
  extended by org.jboss.weld.exceptions.WeldExceptionKeyMessage
All Implemented Interfaces:
Serializable, WeldExceptionMessage

public class WeldExceptionKeyMessage
extends Object
implements WeldExceptionMessage, Serializable

Exception message based on an enumerated key and optional object arguments. This includes localization of the message based on the settings in the JVM when the Throwable.getMessage() or Throwable.getLocalizedMessage() methods are invoked on a Weld exception.

Author:
David Allen
See Also:
Serialized Form

Constructor Summary
WeldExceptionKeyMessage(E key, Object... args)
           Creates a new exception message based on an enumerated message key.
 
Method Summary
 String getAsString()
          Generates the localized message for the exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeldExceptionKeyMessage

public WeldExceptionKeyMessage(E key,
                               Object... args)

Creates a new exception message based on an enumerated message key. This message will not be localized until it is actually logged or other software invokes the #getMessage() method.

Type Parameters:
E - the message key enumeration
Parameters:
key - the message key from the above enumeration
args - optional arguments for the message
Method Detail

getAsString

public String getAsString()
Description copied from interface: WeldExceptionMessage
Generates the localized message for the exception.

Specified by:
getAsString in interface WeldExceptionMessage
Returns:
exception message as a string


Copyright © 2013 Seam Framework. All Rights Reserved.