|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.common.ExceptionUtils
public class ExceptionUtils
Contains Exception handling utilities.
| Constructor Summary | |
|---|---|
ExceptionUtils()
|
|
| Method Summary | |
|---|---|
static void |
checkAssignable(java.lang.Class assignableToClass,
java.lang.String argumentName,
java.lang.Class argumentClass)
Checks if the argumentClass is assignable to assignableToClass, and if not throws an IllegalArgumentException, otherwise does nothing. |
static void |
checkAssignable(java.lang.String methodExecuteName,
java.lang.Class assignableToClass,
java.lang.String argumentName,
java.lang.Class argumentClass)
Deprecated. use checkAssignable(Class, String, Class) since we can detect the method name. |
static void |
checkEmpty(java.lang.String argumentName,
java.lang.String argument)
Checks if the argument is null or an empty String throws an IllegalArgumentException if it is, does nothing if not. |
static void |
checkEmpty(java.lang.String methodExecuteName,
java.lang.String argumentName,
java.lang.String argument)
Deprecated. use checkEmpty(String, String) instead since we can detect the method name. |
static void |
checkNull(java.lang.String argumentName,
java.lang.Object argument)
Checks if the argument is null, and if so, throws an IllegalArgumentException, does nothing if not. |
static void |
checkNull(java.lang.String methodExecuteName,
java.lang.String argumentName,
java.lang.Object argument)
Deprecated. used checkNull(String, Object) instead since we can detect the method name. |
static java.lang.Throwable |
getRootCause(java.lang.Throwable throwable)
Attempts to retrieve the root cause of the exception, if it can not be found, the throwable itself is returned. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExceptionUtils()
| Method Detail |
|---|
public static void checkNull(java.lang.String methodExecuteName,
java.lang.String argumentName,
java.lang.Object argument)
checkNull(String, Object) instead since we can detect the method name.
methodExecuteName - the name of the method we are currently executingargumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkNull(java.lang.String argumentName,
java.lang.Object argument)
argumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkEmpty(java.lang.String methodExecuteName,
java.lang.String argumentName,
java.lang.String argument)
checkEmpty(String, String) instead since we can detect the method name.
methodExecuteName - the name of the method we are currently executingargumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkEmpty(java.lang.String argumentName,
java.lang.String argument)
argumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkAssignable(java.lang.String methodExecuteName,
java.lang.Class assignableToClass,
java.lang.String argumentName,
java.lang.Class argumentClass)
checkAssignable(Class, String, Class) since we can detect the method name.
methodExecuteName - the method name of the method, this method is being executed withinassignableToClass - the Class that argumentClass must be assignable toargumentClass - the argumentClass we are checkingargumentName - the name of the argument we are checking
public static void checkAssignable(java.lang.Class assignableToClass,
java.lang.String argumentName,
java.lang.Class argumentClass)
assignableToClass - the Class that argumentClass must be assignable toargumentClass - the argumentClass we are checkingargumentName - the name of the argument we are checkingpublic static java.lang.Throwable getRootCause(java.lang.Throwable throwable)
throwable itself is returned.
throwable - the exception from which to retrieve the root cause.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||