ExceptionContext interface.
All Commons Math exceptions delegate the interface's methods to this class.
| Modifier and Type | Field and Description |
|---|---|
| private Map | context
Arbitrary context information. |
| private List | msgArguments
Various informations that enrich the informative message. |
| private List | msgPatterns
Various informations that enrich the informative message. |
| private static final long | serialVersionUID
Serializable version Id. |
| private Throwable | throwable
The throwable to which this context refers to. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addMessage(Localizable
Message pattern. pattern, Object... Values for replacing the placeholders in the message
pattern. arguments)Adds a message. |
| private String | Returns: a localized message string.Locale in which the message should be translated. locale, String Message separator. separator)Builds a message string. |
| private void | |
| private void | |
| public Set | |
| public String | |
| public String | |
| public String | Returns: the localized message.Locale in which the message should be translated. locale)Gets the message in a specified locale. |
| public String | Returns: the localized message.Locale in which the message should be translated. locale, final String Separator inserted between the message parts. separator)Gets the message in a specified locale. |
| public Throwable | Returns: a reference to the exception to which the context relatesGet a reference to the exception to which the context relates. |
| public Object | |
| private String | Returns: a string that mentions which class could not be serialized.Object that does not implement the obj)Serializable
interface.Replaces a non-serializable object with an error message string. |
| private void | |
| private void | |
| private void | |
| public void | |
| private void |
| context | back to summary |
|---|---|
| private Map<String, Object> context Arbitrary context information. | |
| msgArguments | back to summary |
|---|---|
| private List<Object[]> msgArguments Various informations that enrich the informative message.
The arguments will replace the corresponding place-holders in
| |
| msgPatterns | back to summary |
|---|---|
| private List<Localizable> msgPatterns Various informations that enrich the informative message. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version Id. | |
| throwable | back to summary |
|---|---|
| private Throwable throwable The throwable to which this context refers to. | |
| ExceptionContext | back to summary |
|---|---|
| public ExceptionContext(final Throwable throwable) Simple constructor.
| |
| addMessage | back to summary |
|---|---|
| public void addMessage(Localizable pattern, Object... arguments) Adds a message.
| |
| buildMessage | back to summary |
|---|---|
| private String buildMessage(Locale locale, String separator) Builds a message string. | |
| deSerializeContext | back to summary |
|---|---|
| private void deSerializeContext(ObjectInputStream in) throws IOException, ClassNotFoundException Deserialize
| |
| deSerializeMessages | back to summary |
|---|---|
| private void deSerializeMessages(ObjectInputStream in) throws IOException, ClassNotFoundException Deserialize
| |
| getKeys | back to summary |
|---|---|
| public Set Gets all the keys stored in the exception | |
| getLocalizedMessage | back to summary |
|---|---|
| public String getLocalizedMessage() Gets the message in the default locale.
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Gets the default message.
| |
| getMessage | back to summary |
|---|---|
| public String getMessage(final Locale locale) Gets the message in a specified locale. | |
| getMessage | back to summary |
|---|---|
| public String getMessage(final Locale locale, final String separator) Gets the message in a specified locale. | |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Get a reference to the exception to which the context relates.
| |
| getValue | back to summary |
|---|---|
| public Object getValue(String key) Gets the value associated to the given context key. | |
| nonSerializableReplacement | back to summary |
|---|---|
| private String nonSerializableReplacement(Object obj) Replaces a non-serializable object with an error message string. | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Deserialize this object from the given stream.
| |
| serializeContext | back to summary |
|---|---|
| private void serializeContext(ObjectOutputStream out) throws IOException Serialize
| |
| serializeMessages | back to summary |
|---|---|
| private void serializeMessages(ObjectOutputStream out) throws IOException Serialize
| |
| setValue | back to summary |
|---|---|
| public void setValue(String key, Object value) Sets the context (key, value) pair. Keys are assumed to be unique within an instance. If the same key is assigned a new value, the previous one will be lost. | |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException Serialize this object to the given stream.
| |