|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ocltf.utils.ExceptionUtils
Contains Exception handling utilities.
Constructor Summary | |
ExceptionUtils()
|
Method Summary | |
static void |
checkAssignable(java.lang.String methodExecuteName,
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 |
checkEmpty(java.lang.String methodExecuteName,
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 |
checkNull(java.lang.String methodExecuteName,
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 java.lang.Integer |
checkValidInteger(java.lang.String methodExecuteName,
java.lang.String argumentName,
java.lang.String argument)
Checks if the passed in String argument is a valid Integer, if not throws an IllegalArgumentException, otherwise returns the converted argument to a converted Integer |
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)
methodExecuteName
- the name of the method we are currently executingargumentName
- - the name of the argument we are checking for nullargument
- - the argument we are checkingpublic static void checkEmpty(java.lang.String methodExecuteName, java.lang.String argumentName, java.lang.String argument)
methodExecuteName
- the name of the method we are currently executingargumentName
- the name of the argument we are checking for nullargument
- the argument we are checkingpublic static void checkAssignable(java.lang.String methodExecuteName, java.lang.Class assignableToClass, java.lang.String argumentName, java.lang.Class argumentClass)
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 checkingpublic static java.lang.Integer checkValidInteger(java.lang.String methodExecuteName, java.lang.String argumentName, java.lang.String argument)
methodExecuteName
- - the method name of the method,
this method is being executed withinargumentName
- - the name of the argument we are checkingargument
- - the actual argument we are checking to see if its a valid Integer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |