|
||||||||||
| 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(Class assignableToClass,
String argumentName,
Class argumentClass)
Checks if the argumentClass is assignable to assignableToClass, and if not throws an IllegalArgumentException, otherwise does nothing. |
static void |
checkAssignable(String methodExecuteName,
Class assignableToClass,
String argumentName,
Class argumentClass)
Deprecated. use checkAssignable(Class, String, Class) since we can detect the method name. |
static void |
checkEmpty(String argumentName,
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(String methodExecuteName,
String argumentName,
String argument)
Deprecated. use checkEmpty(String, String) instead since we can detect the method name. |
static void |
checkNull(String argumentName,
Object argument)
Checks if the argument is null, and if so, throws an IllegalArgumentException, does nothing if not. |
static void |
checkNull(String methodExecuteName,
String argumentName,
Object argument)
Deprecated. used checkNull(String, Object) instead since we can detect the method name. |
static Throwable |
getRootCause(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(String methodExecuteName,
String argumentName,
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(String argumentName,
Object argument)
argumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkEmpty(String methodExecuteName,
String argumentName,
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(String argumentName,
String argument)
argumentName - the name of the argument we are checking for nullargument - the argument we are checking
public static void checkAssignable(String methodExecuteName,
Class assignableToClass,
String argumentName,
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(Class assignableToClass,
String argumentName,
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 Throwable getRootCause(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 | |||||||||