|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.objectweb.fractal.adl.error.ErrorTemplateValidator
public final class ErrorTemplateValidator
Helper class that provides static methods to validate ErrorTemplate.
In particular it checks that each ErrorTemplate has a unique
groupId,
errorId pair. These methods can be used in
ErrorTemplate constructors in an assertion statement.
| Method Summary | |
|---|---|
static boolean |
validErrorEnum(java.lang.Class<? extends java.lang.Enum<?>> enumClass)
Returns true if the given enumeration class is valid. |
static boolean |
validErrorTemplate(ErrorTemplate template)
Validates that the given template has a unique groupId,
errorId pair. |
static boolean |
validErrorTemplate(ErrorTemplate template,
java.lang.Object... args)
Validates the given ErrorTemplate and checks that itf
format is valid with the given
args (i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean validErrorEnum(java.lang.Class<? extends java.lang.Enum<?>> enumClass)
true if the given enumeration class is valid.
enumClass - an enumeration class. This class must implement
ErrorTemplate.
true if the given enumeration class is valid.validErrorTemplate(ErrorTemplate)
public static boolean validErrorTemplate(ErrorTemplate template,
java.lang.Object... args)
ErrorTemplate and checks that itf
format is valid with the given
args (i.e. checks that
template.getFormatedMessage(args) do not throw a
IllegalFormatException).
template - a template.args - the format arguments.
true if the given ErrorTemplate is valid.validErrorTemplate(ErrorTemplate)public static boolean validErrorTemplate(ErrorTemplate template)
groupId,
errorId pair.
template - a template.
true if the given ErrorTemplate is valid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||