Package org.jboss.weld.exceptions
Class WeldExceptionStringMessage
- java.lang.Object
-
- org.jboss.weld.exceptions.WeldExceptionStringMessage
-
- All Implemented Interfaces:
Serializable,WeldExceptionMessage
public class WeldExceptionStringMessage extends Object implements Serializable, WeldExceptionMessage
Simple message object that just contains a String already formatted and localized.- Author:
- David Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WeldExceptionStringMessage(String message)Creates a new exception message initialized to a static message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAsString()Generates the localized message for the exception.
-
-
-
Constructor Detail
-
WeldExceptionStringMessage
public WeldExceptionStringMessage(String message)
Creates a new exception message initialized to a static message. Use this only for messages generated by third-party software, i.e., those which do not use enumerated message keys.
- Parameters:
message- the static message
-
-
Method Detail
-
getAsString
public String getAsString()
Description copied from interface:WeldExceptionMessageGenerates the localized message for the exception.- Specified by:
getAsStringin interfaceWeldExceptionMessage- Returns:
- exception message as a string
-
-