public abstract class LocalizedMessage extends Object
Constructor and Description |
---|
LocalizedMessage(String errorCode)
Constructor for error code and non-parameterized message.
|
LocalizedMessage(String errorCode, Object parameter)
Constructor for error code and one-parameter message.
|
LocalizedMessage(String errorCode, Object[] parameterArray)
Constructor for error code and many-parameter message.
|
LocalizedMessage(String errorCode, Object parameter1, Object parameter2)
Constructor for error code and two-parameter message.
|
LocalizedMessage(String errorCode, Object parameter1, Object parameter2, Object parameter3)
Constructor for error code and three-parameter message.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Returns the error code number as an String.
|
Locale |
getLocale()
Gets the Locale that will be used to deliver this message.
|
String |
getMessage()
Returns the localized message using the Locale set in the setLocale() method (or the default Locale if not applicable) and substituting any parameters passed into the constructor.
|
void |
setLocale(Locale l)
Sets the Locale that will be used to deliver this message.
|
String |
toString()
Returns the string representation of the message
|
public LocalizedMessage(String errorCode)
public LocalizedMessage(String errorCode, Object parameter)
public LocalizedMessage(String errorCode, Object[] parameterArray)
public LocalizedMessage(String errorCode, Object parameter1, Object parameter2)
public String getErrorCode()
public Locale getLocale()
public String getMessage()
public void setLocale(Locale l)
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.