multex
Interface MultexException

All Known Implementing Classes:
Exc, Failure

public interface MultexException

Marks an exception as to be handled especially by MsgText. A MultexException has indexed parameters as a polymorphic Object[], which can be inserted into the message text pattern by directives {0} to {9}. General purpose subclasses should provide a constructor with an Object[] of up to 10 elements and convenience constructors with up to 10 individual parameters of type Object, as well as a convenience constructor with a Collection of Throwable objects for the parameters. See java.text.MessageFormat.


Method Summary
 java.lang.Throwable getCause()
          Returns the cause given to this exception.
 java.lang.String getDefaultMessageTextPattern()
          Returns the default message text pattern for this exception object or null.
 java.lang.String getMessage()
          Returns all user-provided information contained in the exception object in an internal, but human readable format.
 java.lang.Object[] getParameters()
          Returns a copy of the positional exception parameter array, or null if the exception does not have parameters.
 boolean hasParameters()
          Returns true, if the exception parameter array exists and has at least one element.
 

Method Detail

getDefaultMessageTextPattern

public java.lang.String getDefaultMessageTextPattern()
Returns the default message text pattern for this exception object or null. Inserting the exception parameters into the message text pattern is done by class MsgText. Locale specific message text patterns are handled by MsgText, too.


getCause

public java.lang.Throwable getCause()
Returns the cause given to this exception. In the case of a list exception, that is an exception, which has Throwable-objects as parameters, it does not return any of these parameters. They have to be retrieved by #getParameters.

Returns:
The direct main cause of this exception. Overrides the same method of java.lang.Throwable

hasParameters

public boolean hasParameters()
Returns true, if the exception parameter array exists and has at least one element.


getParameters

public java.lang.Object[] getParameters()
Returns a copy of the positional exception parameter array, or null if the exception does not have parameters.


getMessage

public java.lang.String getMessage()
Returns all user-provided information contained in the exception object in an internal, but human readable format. The information are the default message text pattern and the exception parameters of this object or null if none of these is provided. E.g.:
Unable to create file {0} in directory {1}
    {0}='myfile.dat'
    {1}='C:\temp\data'
  
Overrides the same method of java.lang.Throwable