|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ErrorTemplate
An error template defines a type of error that can be reported by the
FractalADL tool-chain. It is identified by a groupId
which identifies a group of related error types and a
errorId which must be unique in a given group. An error
template contains a #getFormat() string that defines the
message to be issued for the type of error. This string is a "printf like"
string as defined in the Formatter class.
It is recommended to implement this interface only in enumeration classes
that regroup every ErrorTemplate of the same group (see package description for
details)
| Method Summary | |
|---|---|
int |
getErrorId()
Returns the number that identify this ErrorTemplate in its group. |
java.lang.String |
getFormat()
Returns the format of the error message that will be issued for errors of that type. |
java.lang.String |
getFormatedMessage(java.lang.Object... args)
Returns a formated error message using the given arguments. |
java.lang.String |
getGroupId()
Returns the identifier of the error group this ErrorTemplate belongs. |
| Method Detail |
|---|
int getErrorId()
group. This number must be unique in the error group
this ErrorTemplate belongs. It is recommended for this identifier not to be
greater that 999.
group.java.lang.String getGroupId()
AC, BC for instance) since it
will be issued in the error message as a prefix.
java.lang.String getFormat()
Formatter class.
java.lang.String getFormatedMessage(java.lang.Object... args)
args - the format arguments.
String.format(String, Object...)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||